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 lines78910101112136 unmodified lines "single_word": false }, "eos_token": { "content": "</s>", "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false,12323version https://git-lfs.github.com/spec/v1oid sha256:3277c00fe5fb3963b3cb7c07b7f183722d2af4d775a4aea7cfb3684d7cccbc2fsize 17078330oid sha256:623c34567aebb18582765289fbe23d901c62704d6518d71866e0e58db892b5b7size 1707748412234578 unmodified lines84858687878889901 unmodified line92939495959697981 unmodified line1001011021031031041051061071081081091101111111121131141151161161171181191191201211221231241241251261271271281291301311321321331341351351361371381391401401411421431431441451461471481481491501517854 unmodified lines800680078008800980098010801180128013801480158015801680178018{ "add_bos_token": true, "add_bos_token": false, "add_eos_token": false, "add_prefix_space": false, "added_tokens_decoder": {78 unmodified lines "special": true }, "10": { "content": "<SPECIAL_10>", "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false,1 unmodified line "special": true }, "11": { "content": "<SPECIAL_11>", "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false,1 unmodified line "special": true }, "12": { "content": "<SPECIAL_12>", "content": "<think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "13": { "content": "<SPECIAL_13>", "content": "</think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "14": { "content": "<SPECIAL_14>", "content": "<tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "15": { "content": "<SPECIAL_15>", "content": "</tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "16": { "content": "<SPECIAL_16>", "content": "<tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "17": { "content": "<SPECIAL_17>", "content": "</tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true "special": false }, "18": { "content": "<SPECIAL_18>",7854 unmodified lines }, "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "</s>", "eos_token": "<|im_end|>", "extra_special_tokens": {}, "model_input_names": [ "input_ids", "attention_mask" ], "model_max_length": 8192, "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