NavigationContentFooter
Jump toSuggest an edit

Understanding the Llama-3.1-8b-instruct model

Reviewed on 31 August 2024Published on 31 August 2024

Model overview

AttributeDetails
ProviderMeta
LicenseLlama 3.1 community
Compatible InstancesL4, H100, H100-2 (FP8, BF16)
Context Lengthup to 128k tokens

Model names

meta/llama-3.1-8b-instruct:fp8
meta/llama-3.1-8b-instruct:bf16

Compatible Instances

Instance typeMax context length
L496k (FP8), 27k (BF16)
H100128k (FP8, BF16)
H100-2128k (FP8, BF16)

Model introduction

Released July 23, 2024, Meta’s Llama 3.1 is an iteration of the open-access Llama family. Llama 3.1 was designed to match the best proprietary models, outperform many of the available open source on common industry benchmarks.

Why is it useful?

It is great to see Meta continuing its commitment to open(weight) AI, and we are excited to fully support their mission with integration in the Scaleway ecosystem.

  • Llama 3.1 was optimized for multilingual dialogue use cases, with many supported languages: English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai.
  • Llama 3.1 brings a context window up to 128K tokens, a sharp increase compared to its predecessor (Llama 3 was 8192).
  • Llama 3.1 supports tool calling, enabling the model to answer a given prompt using tool(s) it knows about, making it possible to interact with the outside world.

How to use it

Sending Managed Inference requests

To perform inference tasks with your Llama-3.1 deployed at Scaleway, use the following command:

curl -s \
-H "Authorization: Bearer <IAM API key>" \
-H "Content-Type: application/json" \
--request POST \
--url "https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/chat/completions" \
--data '{"model":"meta/llama-3.1-8b-instruct:fp8", "messages":[{"role": "user","content": "There is a llama in my garden, what should I do?"}], "max_tokens": 500, "temperature": 0.7, "stream": false}'

Make sure to replace <IAM API key> and <Deployment UUID> with your actual IAM API key and the Deployment UUID you are targeting.

Tip

The model name allows Scaleway to put your prompts in the expected format.

Note

Ensure that the messages array is properly formatted with roles (system, user, assistant) and content.

Receiving Inference responses

Upon sending the HTTP request to the public or private endpoints exposed by the server, you will receive inference responses from the managed Managed Inference server. Process the output data according to your application’s needs. The response will contain the output generated by the LLM model based on the input provided in the request.

Note

Despite efforts for accuracy, the possibility of generated text containing inaccuracies or hallucinations exists. Always verify the content generated independently.

Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway