NavigationContentFooter
Jump toSuggest an edit

Understanding the Llama-3-8b-instruct model

Reviewed on 06 March 2024

Model overview

AttributeDetails
ProviderMeta
Model Namellama-3-8b-instruct
Compatible InstancesL4 (BF16)
Context size8192 tokens

Model names

meta/llama-3-8b-instruct:bf16

Compatible Instances

  • L4 (BF16)

Model introduction

Meta’s Llama 3 is an iteration of the open-access Llama family. Llama 3 was designed to match the best proprietary models, enhanced by community feedback for greater utility and responsibly spearheading the deployment of LLMs. With a commitment to open source principles, this release marks the beginning of a multilingual, multimodal future for Llama 3, pushing the boundaries in reasoning and coding capabilities.

Why is it useful?

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

Llama 3 marks a significant advancement over Llama 2 and other available models due to several enhancements:

  • It was trained on a dataset that is seven times larger than that used for Llama 2.
  • It offers a doubled context length of 8,192 tokens, compared to its predecessor.
  • The model uses a more extensive token vocabulary, featuring 128,000 tokens, allowing for more efficient language encoding.
  • It demonstrates a reduction in false “refusals” by less than one-third compared to Llama 2.

How to use it

Sending Managed Inference requests

To perform inference tasks with your Llama-3 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.scw.cloud/v1/chat/completions" \
--data '{"model":"llama-3-8b-instruct", "messages":[{"role": "user","content": "There is a llama in my garden, what should I do?"}], "max_tokens": 500, "top_p": 1, "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.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway