Text Generation
Transformers
Safetensors
PyTorch
nemotron_h
nvidia
nemotron-3
latent-moe
mtp
conversational
custom_code
Instructions to use nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat", trust_remote_code=True, device_map="auto") 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/NVIDIA-Nemotron-Labs-Teacher-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat" # 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/NVIDIA-Nemotron-Labs-Teacher-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat
- SGLang
How to use nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat 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/NVIDIA-Nemotron-Labs-Teacher-Chat" \ --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/NVIDIA-Nemotron-Labs-Teacher-Chat", "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/NVIDIA-Nemotron-Labs-Teacher-Chat" \ --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/NVIDIA-Nemotron-Labs-Teacher-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat with Docker Model Runner:
docker model run hf.co/nvidia/NVIDIA-Nemotron-Labs-Teacher-Chat
Add files using upload-large-folder tool
Browse files- model-00003-of-00225.safetensors +3 -0
- model-00045-of-00225.safetensors +3 -0
- model-00056-of-00225.safetensors +3 -0
- model-00060-of-00225.safetensors +3 -0
- model-00097-of-00225.safetensors +3 -0
- model-00098-of-00225.safetensors +3 -0
- model-00101-of-00225.safetensors +3 -0
- model-00103-of-00225.safetensors +3 -0
- model-00187-of-00225.safetensors +3 -0
- model-00196-of-00225.safetensors +3 -0
- model-00218-of-00225.safetensors +3 -0
model-00003-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41d397ec217b9ac5c0880651ba6405e3b3842c7ebff23b0a36e9749e7c63661d
|
| 3 |
+
size 4991252600
|
model-00045-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39a8191d7455ec5d82d0fdf460f9df16d12aec787f93ed14934cdee74762f091
|
| 3 |
+
size 4991252840
|
model-00056-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ffff5ee11a3d38d55c49d3c7ab8c4715afba21f907357c83295b7633ff6cfa83
|
| 3 |
+
size 4987305808
|
model-00060-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8d30e1d79911eeb00b6e70574b4aad3df676f17890cd59ba3f658cb81914785
|
| 3 |
+
size 4987305952
|
model-00097-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bbbd2f5e94b56c584160feca8706fb7f902af3fd35e10a60df6550e276563ab8
|
| 3 |
+
size 4991515400
|
model-00098-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d482678304cbc12253f83fad82f84bb844cdf20397ad1827e873c8996d449fef
|
| 3 |
+
size 4991252736
|
model-00101-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0c526116efc87b5419c1e067aab2d555b65c8e2fd908616d5e21cbc7f75f4c6
|
| 3 |
+
size 4941123984
|
model-00103-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3d4a97bee6e990795d724c8c0f0d6a3e65996e0f3f86107837453386b826073
|
| 3 |
+
size 4991252840
|
model-00187-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c56c3ad7bfbcf60976a235234f73dd31329e685df034b5f5d70697dbe43356c
|
| 3 |
+
size 4991252840
|
model-00196-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b373619cf79d60801c6ada74a99bf4476538917ef547f179694e36bc711e2a6c
|
| 3 |
+
size 4991252840
|
model-00218-of-00225.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2012a7f5965bc8d92afb39c3cac147c44116a29eacd8978806ae82ef3fd84538
|
| 3 |
+
size 4991253080
|