Text Generation
Transformers
Safetensors
English
llama
nvidia
llama3.1
conversational
text-generation-inference
Instructions to use nvidia/Llama-3.1-Nemotron-70B-Instruct-HF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Llama-3.1-Nemotron-70B-Instruct-HF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Llama-3.1-Nemotron-70B-Instruct-HF") 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-Nemotron-70B-Instruct-HF") model = AutoModelForCausalLM.from_pretrained("nvidia/Llama-3.1-Nemotron-70B-Instruct-HF") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use nvidia/Llama-3.1-Nemotron-70B-Instruct-HF 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-Nemotron-70B-Instruct-HF" # 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-Nemotron-70B-Instruct-HF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF
- SGLang
How to use nvidia/Llama-3.1-Nemotron-70B-Instruct-HF 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-Nemotron-70B-Instruct-HF" \ --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-Nemotron-70B-Instruct-HF", "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-Nemotron-70B-Instruct-HF" \ --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-Nemotron-70B-Instruct-HF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Llama-3.1-Nemotron-70B-Instruct-HF with Docker Model Runner:
docker model run hf.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF
Install & run this model easily using llmpm
#68 opened 2 months ago
by
sarthak-saxena
Default parameters for the model
1
#67 opened 6 months ago
by
skylord
Does the RL lead to this model to prefer to give answers in a certain length scope?
#65 opened about 1 year ago
by
tonyaw
mistakes, inserts Chinese characters and flood
๐ 1
1
#64 opened over 1 year ago
by
Markobes
Hfjfjf
#60 opened over 1 year ago
by
Abdelillah059
Request: DOI
#56 opened over 1 year ago
by
Akosayo
ู ุฐูุฑุฉ ุชุฎุฑุฌ ูุชููู ุณุงู ู ุชุชุถู ู ุจุฑูุงู ุฌ ู ุฎุงุฒูaccses
1
#55 opened over 1 year ago
by
katibdz
plan de travail master
#54 opened over 1 year ago
by
Ijabelm
Air algerie
1
#52 opened over 1 year ago
by
aissani
ู ุดุฑูุน ุจูุฏุงุบูุฌู
#51 opened over 1 year ago
by
HatimovDZ
how to update temperature and top_p?
#50 opened over 1 year ago
by
bearcool
Deaf dancer
#47 opened over 1 year ago
by
Samoney
Taxi
#45 opened over 1 year ago
by
Billionfstars
Getting context deadline exceeded in Ollama Windows
๐ 1
2
#43 opened over 1 year ago
by
DesertCookie
can we convertt 8b model also to HF
#42 opened over 1 year ago
by
pulkitmehtametacube
my model
#41 opened over 1 year ago
by
MohammeDImth
How to run tis model please help me
4
#40 opened over 1 year ago
by
Agoogleuser
project_bb
1
#39 opened over 1 year ago
by
salunkesayali
Update README.md
#37 opened over 1 year ago
by
leonsas14
AssertionError: Torch not compiled with CUDA enabled
1
#35 opened over 1 year ago
by
gokul9
Upload 4 files
#34 opened over 1 year ago
by
amberfelts890
FP8 Quantized model now available! (only requires half the original model's VRAM)
#33 opened over 1 year ago
by
mysticbeing
Reparaciรณn de Gadgets
#32 opened over 1 year ago
by
gvilchis
Update README.md
#31 opened over 1 year ago
by
MarcosMT
Request: DOI
1
#30 opened over 1 year ago
by
Natwar
Update README.md
#27 opened over 1 year ago
by
jinyongkenny
Is there an AWQ quant version?
#26 opened over 1 year ago
by
imonsoon
Request: DOI
#25 opened over 1 year ago
by
Arslanbey123
Suitable hardware config for usage this model
10
#22 opened over 1 year ago
by
nimatoghiri
Templete Prompt
2
#20 opened over 1 year ago
by
sadra
Any way I can run it on my low-mid tier HP Desktop? specs attached as a .png, btw i know its probably a long shot.
6
#18 opened over 1 year ago
by
vgrowhouse
How to inference it on a 40 GB A100 and 80 GB Ram of Colab PRO?
1
#17 opened over 1 year ago
by
SadeghPouriyanZadeh
nvdiallm
#16 opened over 1 year ago
by
jhaavinash
Update README.md
#12 opened over 1 year ago
by
Delcos
[EVALS] Metrics compared to 3.1-70b Instruct by Meta
๐๐ 6
2
#11 opened over 1 year ago
by
ID0M
Congrats to the Nvidia team!
๐ 4
#10 opened over 1 year ago
by
nickandbro
Will quantised version be available?
4
#9 opened over 1 year ago
by
angerhang
Adding Evaluation Results
#8 opened over 1 year ago
by
leaderboard-pr-bot
the model is not optimize in term of inference
1
#7 opened over 1 year ago
by
Imran1
there are 3 "r"s in the playful "strawrberry"?
๐ง 2
5
#6 opened over 1 year ago
by
JieYingZhang
405B version
2
#5 opened over 1 year ago
by
nonetrix
Other lanuage ablity
2
#4 opened over 1 year ago
by
nonetrix