Instructions to use nvidia/Nemotron-H-8B-Base-8K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-H-8B-Base-8K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Nemotron-H-8B-Base-8K") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Nemotron-H-8B-Base-8K", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Nemotron-H-8B-Base-8K with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Nemotron-H-8B-Base-8K" # 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-8B-Base-8K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Nemotron-H-8B-Base-8K
- SGLang
How to use nvidia/Nemotron-H-8B-Base-8K 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-8B-Base-8K" \ --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-8B-Base-8K", "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-8B-Base-8K" \ --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-8B-Base-8K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Nemotron-H-8B-Base-8K with Docker Model Runner:
docker model run hf.co/nvidia/Nemotron-H-8B-Base-8K
What’s the Pre-training Data Strategy Behind Nemotron-H?
I understand that the Nemotron-H-56B-Base model was pre-trained on a dataset of 20T tokens, while the Nemotron-H-8B-Base model was trained on 15T tokens. However, the publicly available nemotronCC dataset is 6.3T tokens.
Could anyone provide insights into how this 6.3T dataset is expanded or supplemented to reach the required sizes of 15T and 20T tokens? Are there additional datasets used, or are there specific methods for augmenting the existing nemotronCC dataset?
Looking forward to any information or guidance.
Thank you very much!