Text Generation
Transformers
Safetensors
nemotron_h
nemotron
nemotron-h
sft
example
deepspeed
Mixture of Experts
conversational
custom_code
Instructions to use tzchen07/Nemotron-Super-120B-sft-example with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tzchen07/Nemotron-Super-120B-sft-example with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tzchen07/Nemotron-Super-120B-sft-example", 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("tzchen07/Nemotron-Super-120B-sft-example", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("tzchen07/Nemotron-Super-120B-sft-example", trust_remote_code=True) 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 tzchen07/Nemotron-Super-120B-sft-example with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tzchen07/Nemotron-Super-120B-sft-example" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tzchen07/Nemotron-Super-120B-sft-example", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tzchen07/Nemotron-Super-120B-sft-example
- SGLang
How to use tzchen07/Nemotron-Super-120B-sft-example 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 "tzchen07/Nemotron-Super-120B-sft-example" \ --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": "tzchen07/Nemotron-Super-120B-sft-example", "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 "tzchen07/Nemotron-Super-120B-sft-example" \ --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": "tzchen07/Nemotron-Super-120B-sft-example", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tzchen07/Nemotron-Super-120B-sft-example with Docker Model Runner:
docker model run hf.co/tzchen07/Nemotron-Super-120B-sft-example
Nemotron-3-Super-120B - Example SFT
This is an example supervised fine-tune (SFT) of NVIDIA's Nemotron-3-Super-120B
(NemotronHForCausalLM, a Mamba-2 / MoE hybrid with 512 routed experts, top-22).
It was produced as an end-to-end pipeline validation run, not a production model.
Training summary
- Base: Nemotron-3-Super-120B (~120.7B params, bf16)
- Method: Full-parameter SFT (no LoRA), DeepSpeed ZeRO-3, 24x H200 over RDMA
- Data: Alpaca (2,000 examples), chat format
- Steps: 84 (one full epoch; 2000 / 24 ranks)
- Loss: 2.88 -> best 0.3534
- Key fix:
set_z3_leaf_modules(model, [NemotronHMoE])to avoid a ZeRO-3 parameter-gather deadlock caused by data-dependent MoE expert routing.
Notes / caveats
- This checkpoint omits the auxiliary
mtp(multi-token-prediction) head (dropped bysave_16bit_model); it is not required for standard generation. - Behaviour: shifts the base reasoning model toward concise, Alpaca-style direct answers.
- Use
trust_remote_code=Truewhen loading (custom Nemotron-H modeling code is included).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained('tzchen07/Nemotron-Super-120B-sft-example',
trust_remote_code=True, torch_dtype='bfloat16', device_map='auto')
t = AutoTokenizer.from_pretrained('tzchen07/Nemotron-Super-120B-sft-example', trust_remote_code=True)
- Downloads last month
- 21