Text Generation
Transformers
Safetensors
PyTorch
nemotron_labs_diffusion
feature-extraction
nvidia
conversational
custom_code
Run this model with HF Jobs
Run nvidia/Nemotron-Labs-Diffusion-8B-Base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/nvidia/Nemotron-Labs-Diffusion-8B-Base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nvidia/Nemotron-Labs-Diffusion-8B-Base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/nvidia/Nemotron-Labs-Diffusion-8B-Base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/nvidia/Nemotron-Labs-Diffusion-8B-Base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use nvidia/Nemotron-Labs-Diffusion-8B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-Labs-Diffusion-8B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Nemotron-Labs-Diffusion-8B-Base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Nemotron-Labs-Diffusion-8B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Nemotron-Labs-Diffusion-8B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Nemotron-Labs-Diffusion-8B-Base" # 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-Labs-Diffusion-8B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Nemotron-Labs-Diffusion-8B-Base
- SGLang
How to use nvidia/Nemotron-Labs-Diffusion-8B-Base 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-Labs-Diffusion-8B-Base" \ --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-Labs-Diffusion-8B-Base", "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-Labs-Diffusion-8B-Base" \ --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-Labs-Diffusion-8B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Nemotron-Labs-Diffusion-8B-Base with Docker Model Runner:
docker model run hf.co/nvidia/Nemotron-Labs-Diffusion-8B-Base
Sync tokenizer to the instruct variant (vocab + special tokens for chat template)
Browse filesFiles changed (3)
6 unmodified lines789101112136 unmodified lines"single_word": false},"eos_token": {"content": "</s>","lstrip": false,"normalized": false,"rstrip": false,6 unmodified lines789101112136 unmodified lines"single_word": false},"eos_token": {"content": "<|im_end|>","lstrip": false,"normalized": false,"rstrip": false,
123version https://git-lfs.github.com/spec/v1oid sha256:3277c00fe5fb3963b3cb7c07b7f183722d2af4d775a4aea7cfb3684d7cccbc2fsize 17078330123version https://git-lfs.github.com/spec/v1oid sha256:623c34567aebb18582765289fbe23d901c62704d6518d71866e0e58db892b5b7size 17077484
1234578 unmodified lines848586878889901 unmodified line929394959697981 unmodified line1001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501517854 unmodified lines8006800780088009801080118012801380148015801680178018{"add_bos_token": true,"add_eos_token": false,"add_prefix_space": false,"added_tokens_decoder": {78 unmodified lines"special": true},"10": {"content": "<SPECIAL_10>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"11": {"content": "<SPECIAL_11>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"12": {"content": "<SPECIAL_12>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"13": {"content": "<SPECIAL_13>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"14": {"content": "<SPECIAL_14>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"15": {"content": "<SPECIAL_15>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"16": {"content": "<SPECIAL_16>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"17": {"content": "<SPECIAL_17>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"18": {"content": "<SPECIAL_18>",7854 unmodified lines},"bos_token": "<s>","clean_up_tokenization_spaces": false,"eos_token": "</s>","extra_special_tokens": {},"model_input_names": ["input_ids","attention_mask"],"model_max_length": 8192,"tokenizer_class": "PreTrainedTokenizerFast","unk_token": "<unk>"}1234578 unmodified lines848586878889901 unmodified line929394959697981 unmodified line1001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501517854 unmodified lines8006800780088009801080118012801380148015801680178018{"add_bos_token": false,"add_eos_token": false,"add_prefix_space": false,"added_tokens_decoder": {78 unmodified lines"special": true},"10": {"content": "<|im_start|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"11": {"content": "<|im_end|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"12": {"content": "<think>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"13": {"content": "</think>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"14": {"content": "<tool_call>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"15": {"content": "</tool_call>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"16": {"content": "<tool_response>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"17": {"content": "</tool_response>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": false},"18": {"content": "<SPECIAL_18>",7854 unmodified lines},"bos_token": "<s>","clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","extra_special_tokens": {},"model_input_names": ["input_ids","attention_mask"],"model_max_length": 262144,"tokenizer_class": "PreTrainedTokenizerFast","unk_token": "<unk>"}
special_tokens_map.json+1-1
tokenizer.json+2-2
tokenizer_config.json+17-17