Instructions to use nvidia/Nemotron-H-47B-Reasoning-128K-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-H-47B-Reasoning-128K-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Nemotron-H-47B-Reasoning-128K-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Nemotron-H-47B-Reasoning-128K-FP8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Nemotron-H-47B-Reasoning-128K-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Nemotron-H-47B-Reasoning-128K-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/Nemotron-H-47B-Reasoning-128K-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Nemotron-H-47B-Reasoning-128K-FP8
- SGLang
How to use nvidia/Nemotron-H-47B-Reasoning-128K-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/Nemotron-H-47B-Reasoning-128K-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/Nemotron-H-47B-Reasoning-128K-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/Nemotron-H-47B-Reasoning-128K-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/Nemotron-H-47B-Reasoning-128K-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Nemotron-H-47B-Reasoning-128K-FP8 with Docker Model Runner:
docker model run hf.co/nvidia/Nemotron-H-47B-Reasoning-128K-FP8
Value error, The checkpoint you are trying to load has model type `nemotron_h` but Transformers does not recognize this architecture.
Thank you for your hard work to release such a great model!!
Unfortunately, the following error occurred when using this FP8 model with vllm.
Value error, The checkpoint you are trying to load has model type `nemotron_h` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
Even though I have updated transformers up to 4.52.4 following the error statement, the error can not be resolved.
Is this error due to the missing 'modeling_nemotron_h.py', which Nemotron-H-47B-Reasoning-128K (non-FP8 version) has?
I could successfully use Nemotron-H-47B-Reasoning-128K (non-FP8 version) with vllm.
This error occurred with the following environment.
- vllm == 0.9.1
- transformers == 4.52.4
- CUDA == 12.6
- torch == 2.7.0
Thank you for your support in advance.