Instructions to use nvidia/Llama-3.1-70B-Instruct-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Llama-3.1-70B-Instruct-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Llama-3.1-70B-Instruct-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nvidia/Llama-3.1-70B-Instruct-FP8") model = AutoModelForCausalLM.from_pretrained("nvidia/Llama-3.1-70B-Instruct-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Llama-3.1-70B-Instruct-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Llama-3.1-70B-Instruct-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Llama-3.1-70B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Llama-3.1-70B-Instruct-FP8
- SGLang
How to use nvidia/Llama-3.1-70B-Instruct-FP8 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 "nvidia/Llama-3.1-70B-Instruct-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Llama-3.1-70B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "nvidia/Llama-3.1-70B-Instruct-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Llama-3.1-70B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Llama-3.1-70B-Instruct-FP8 with Docker Model Runner:
docker model run hf.co/nvidia/Llama-3.1-70B-Instruct-FP8
License incompatibility
Hi , I’d like to report a potential license conflict in nvidia/Llama-3.1-70B-Instruct-FP8. This model appears to be fine-tuned frommeta-llama/Llama-3.1-70B-Instruct, which is governed by the LLaMA 3.1 Community License.
However, the fine-tuned model is currently being distributed under the NVIDIA Open Model License, which may not comply with the restrictions and redistribution clauses in the original Meta license.
⚠️ Key violations of META LLAMA 3.1 COMMUNITY LICENSE AGREEMENT:
Clause 1.b – Redistribution and Use:
• All derivatives must retain the original license
• You may not sublicense under a different license
• You must include the LLaMA license and its usage restrictions
Clause 1.c – Acceptable Use:
• Downstream usage must follow Meta’s Acceptable Use Policy
• Redistribution must not relax these obligations
Clause 2 – No Additional Grant:
• No extra permissions or terms beyond what Meta grants are allowed
Clause 3 – Commercial Restrictions:
• Use at commercial scale (e.g. >700M MAU) requires additional license
Your NVIDIA Open Model License includes:
• Broad commercial rights
• Right to sublicense and add terms for derivative models
• No requirement to retain the LLaMA license text
• NVIDIA branding and redistribution conditions (e.g., “Built on NVIDIA Cosmos”)
To align with the upstream LLaMA 3.1 license:
1. Restore the LLaMA 3.1 Community License as the primary license in the model card
2. Include this NOTICE in a file or the model card:
> "This model is based on LLaMA 3.1 and is licensed under the LLaMA 3.1 Community License, Copyright © Meta Platforms, Inc."
3. Remove or clarify NVIDIA-specific terms that conflict with Meta’s redistribution limits
4. Make clear that any downstream use must comply with Meta’s Acceptable Use Policy
Hope this helps! 😊 Let me know if you have any questions or need more info.
Thanks for your attention!
Would love to hear your view on this!