Instructions to use meta-llama/Meta-Llama-3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Meta-Llama-3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3-8B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B") model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Meta-Llama-3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meta-llama/Meta-Llama-3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meta-llama/Meta-Llama-3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/meta-llama/Meta-Llama-3-8B
- SGLang
How to use meta-llama/Meta-Llama-3-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "meta-llama/Meta-Llama-3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meta-llama/Meta-Llama-3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "meta-llama/Meta-Llama-3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meta-llama/Meta-Llama-3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use meta-llama/Meta-Llama-3-8B with Docker Model Runner:
docker model run hf.co/meta-llama/Meta-Llama-3-8B
[READ IF YOU DO NOT HAVE ACCESS] Getting access to the model
Hey all! If you do not have access to the model yet, please follow the next steps
- Go to the model page
- Read the Llama 3 Community License Agreement
- At the bottom of the agreement, there's an Accept License button, click it
Meta reviews the applications approximately once an hour. Please wait.
When loading the model, make sure you're using a token with read access to be able to load it. You can also login by using huggingface_hub login() or notebook_login() methods, or huggingface-cli login.
Do not request a DOI, that's unrelated to getting access to the model
Thanks!
Hi, I requested access to the model over a week ago, and still do not have access. Could you please help me check it? Thanks!
why I had been rejected to access the model?Can you help me?
Thank you for making this post. It is good to know the requests are checked hourly.
It has been several weeks since I have submitted a request for access and it is still under review.
Can you please see what the reason is for the delay?
I think everyone knows how to follow these basic instructions. The issue is after clicking the Accept button it throws this error: Sorry, we could not process your request at this moment.
Request ID: 1375369499823076 @osanseviero
please accept me
I got rejected too, but had other ways to access the model, so why bother rejecting?
Hello, my access request was rejected and I cannot find a way to re-apply. I need access for local research/development use to run NVIDIA Kimodo’s default text encoder. Could you please advise whether my request can be reconsidered or how I should re-submit it?
My access had been rejected :(; Is there a way to resubmit the request?
Hello, I am writing my thesis. Please accept my application. Thank you very much for your time!
My access request for Meta-Llama-3-8B-Instruct was rejected. I'm an independent researcher using Llama-3 as a text encoder for NVIDIA Kimodo (open-source motion diffusion, non-commercial, local inference only). I believe my initial form may have been incomplete. Could you please reconsider? My HF username:ming19851025 . Thank you.
Hello Meta Llama team,
My access request to the Meta Llama 3 Gating Group was rejected.I need Meta-Llama-3-8B-Instruct as the LLM2Vec text encoder required by NVIDIA ARDY for local research and testing of real-time human motion generation.
I will comply with the Meta Llama 3 Community License and will not redistribute the model weights. Could you please reset my request to pending or reconsider it?
Hello Meta Llama team. My access request is still pending. I need Meta-Llama-3-8B-Instruct as the LLM2Vec text encoder required by NVIDIA ARDY for local testing of real-time human-motion generation. I will comply with the Llama 3 Community License and will not redistribute the weights. Hugging Face username: BlueStudios. Could you please review my request?
Hello,
My access request for Meta-Llama-3-8B is still pending.
I am requesting access for academic research, specifically to reproduce the experiments from a published research paper.
Could you please review my access request?
Thank you.
