Text Generation
Transformers
Safetensors
PyTorch
llama
facebook
meta
llama-3
Eval Results
text-generation-inference
Instructions to use meta-llama/Llama-3.1-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Llama-3.1-70B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meta-llama/Llama-3.1-70B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-70B") model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-70B", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meta-llama/Llama-3.1-70B 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-70B" # 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-70B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/meta-llama/Llama-3.1-70B
- SGLang
How to use meta-llama/Llama-3.1-70B 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-70B" \ --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-70B", "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-70B" \ --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-70B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use meta-llama/Llama-3.1-70B with Docker Model Runner:
docker model run hf.co/meta-llama/Llama-3.1-70B
Access request FAQ
pinned#12 opened about 2 years ago
by
samuelselvan
Add EvalEval community eval results
#35 opened 4 months ago
by
EvalEvalBot
fix: set `clean_up_tokenization_spaces` to `false`
#34 opened 7 months ago
by
maxsloef
Can't Download Llama-3.1-70B Base Weights via Git LFS (Approved Access)
#33 opened 9 months ago
by
karynann
Assistance Downloading Files from Hugging Face
#32 opened 11 months ago
by
restupi
Request: DOI
😔 1
#31 opened over 1 year ago
by
snapplecrumble
Is the tokenizer.model the same for 8B/70B/405B?
#30 opened over 1 year ago
by
kyle-amd-dev
Access denied to model after agreeing to TOU
#29 opened over 1 year ago
by
ntoscano
Access Request: Rejected, Reason: ?
1
#28 opened over 1 year ago
by
anehama
Request access
#27 opened over 1 year ago
by
MaryNAzari
Request: DOI
#26 opened over 1 year ago
by
pablowilczynski
woulnt run on kobold??
3
#25 opened almost 2 years ago
by
Keionsa
set "pad_token" to "<|finetune_right_pad_id|>"
#24 opened almost 2 years ago
by
wukaixingxp
Does not run on CPU
#22 opened almost 2 years ago
by
andmed
Why can this program successfully predict the next word by only passing in the token generated last time? No complete prompt token was passed in
1
#21 opened almost 2 years ago
by
LJUN9988
does not start
4
#20 opened almost 2 years ago
by
Verzull
ValueError: Must flatten tensors with uniform dtype but got torch.bfloat16 and torch.float32
4
#19 opened about 2 years ago
by
Srinivas777
Request: DOI
#18 opened about 2 years ago
by
Howl1226
what is the meaning of number in each model
#17 opened about 2 years ago
by
martinKH
gguf versions needed
👍 4
#14 opened about 2 years ago
by
Keionsa
Tainted Training Data?
#13 opened about 2 years ago
by
mrjackspade
Questions on ARC-C accuracy
#10 opened about 2 years ago
by
damoict
How long will it take for the request to be accepted?
2
#7 opened about 2 years ago
by
aaditya