Text Generation
Transformers
Safetensors
PyTorch
llama
facebook
meta
llama-3
Eval Results
text-generation-inference
Instructions to use meta-llama/Llama-3.1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Llama-3.1-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meta-llama/Llama-3.1-8B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B") model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Llama-3.1-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meta-llama/Llama-3.1-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/Llama-3.1-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/meta-llama/Llama-3.1-8B
- SGLang
How to use meta-llama/Llama-3.1-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/Llama-3.1-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/Llama-3.1-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/Llama-3.1-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/Llama-3.1-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use meta-llama/Llama-3.1-8B with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-3.1-8B
Access request FAQ
pinned#21 opened about 2 years ago
by
samuelselvan
Request to reset rejected access request for Llama-3.1-8B
2
#213 opened 6 days ago
by
ShunshunWang
Request for Reconsideration of Access to Llama 3.1 8B
#212 opened 16 days ago
by
winter129
Request still pending
#211 opened 26 days ago
by
amongia
Request to Reset Llama 3.1 8B Access
#210 opened about 1 month ago
by
lipmark
Access Request for Llama-3.1-8B Please
#209 opened about 2 months ago
by
Rocky5502
Request for manual review of rejected Llama 3.1 access
#208 opened 2 months ago
by
isurueshan
Request to reset model access - Typo / Region mismatch
#205 opened 3 months ago
by
M00NSH1NEER
Request to reset gated access status / typo in form
#204 opened 3 months ago
by deleted
TemporalMesh Transformer: 29.4 PPL at 48% compute — dynamic graph attention + adaptive exit gates (open-source, 226 tests)
#202 opened 4 months ago
by
vigneshwar234
Add EvalEval community eval results
#201 opened 4 months ago
by
EvalEvalBot
Access Request
2
#200 opened 4 months ago
by
cosmo808
Need access
#199 opened 4 months ago
by
jamekuma
Request for clarification on repeated rejection of access request
#198 opened 5 months ago
by
zhanhuatao
Need access
#197 opened 5 months ago
by
hjt15574089453
need access
#196 opened 6 months ago
by
blue-blue
Request: DOI
#195 opened 6 months ago
by
Daniyalatta
Request: DOI
#194 opened 6 months ago
by
Skowek
Request: DOI
#193 opened 6 months ago
by
AshishPatel4886
Request: DOI
#192 opened 6 months ago
by
Himanshu6692
Access Request
#191 opened 6 months ago
by deleted
Reset my access request
#190 opened 6 months ago
by deleted
Update README.md
#189 opened 6 months ago
by
JoeFunny30
Access Request
#188 opened 6 months ago
by
Xotiic-Official
Request for Access: Academic Research Purpose
#186 opened 7 months ago
by
evantsao
Request Wanted
#185 opened 7 months ago
by
yixuzh
Request : DOI
#184 opened 7 months ago
by
tuandebu
Request : DOI
#183 opened 7 months ago
by
tuandebu
fix: set `clean_up_tokenization_spaces` to `false`
#182 opened 7 months ago
by
maxsloef
Request: DOI
#181 opened 7 months ago
by
maka350
Request to reopen access request for Llama 3.1-8B
#180 opened 7 months ago
by deleted
Access Request
#178 opened 7 months ago
by deleted
PetAI
#177 opened 7 months ago
by
chipkkang9
Access request
#174 opened 8 months ago
by
Zocotroco12
Request Access
#172 opened 8 months ago
by
Rebecca0876
Request: DOI
#171 opened 9 months ago
by
phil089
Re-evaluation for model access.
#170 opened 9 months ago
by
Qz07
Request for Re-evaluation: Llama 3.1 Access
#169 opened 9 months ago
by
Shotaro7
Request: DOI
#167 opened 9 months ago
by
nrusso18
Delay Giving Permission
#162 opened 11 months ago
by
ahmedjameel
Request: DOI
#161 opened 11 months ago
by
Angular27
sdff
#160 opened 12 months ago
by
Vitalya1604
my request to access LLama 3.1 model has been rejected , i want to re-apply
8
#159 opened 12 months ago
by
Michel-George
Need model for Learning
#157 opened about 1 year ago
by
wasiqmahmood93
Request: DOI
#156 opened about 1 year ago
by
darshanAnghan