Text Generation
Transformers
Safetensors
nemotron_h
compressed-tensors
w8a16
int8
vllm
nemotron-3.5
mamba
Mixture of Experts
conversational
Instructions to use GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16") model = AutoModelForCausalLM.from_pretrained("GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16", device_map="auto") 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 GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16
- SGLang
How to use GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 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 "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16" \ --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": "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16", "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 "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16" \ --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": "GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 with Docker Model Runner:
docker model run hf.co/GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16
File size: 10,715 Bytes
3a1734b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | ---
license: other
license_name: openmdw-1.1
license_link: https://openmdw.ai/license/1-1/
base_model: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
base_model_relation: quantized
pipeline_tag: text-generation
library_name: transformers
language:
- en
- es
- fr
- de
- it
- ja
tags:
- compressed-tensors
- w8a16
- int8
- vllm
- nemotron-3.5
- mamba
- moe
---
# NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16
Int8 weight-only quantization of
[nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16),
in compressed-tensors format for vLLM. **35.93 GB**, down from 65.83 GB — a 45% reduction.
Its KV cache is unusually cheap, so a 48 GB card serves it at the full native 256k context.
This is the fidelity-first build. Int8 round-to-nearest stays far closer to the bfloat16
weights than int4 does, at ~1.8x the footprint of the
[int4 W4A16 sibling](https://huggingface.co/GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W4A16)
(20.49 GB). If you are targeting a 24 or 32 GB card, use that one; use this one when you
have the VRAM and want the least quality loss quantization can give without calibration.
The gap matters more than usual here — see [Evaluation](#evaluation).
Unofficial and unaffiliated with NVIDIA. All model capabilities, evaluations and
limitations belong to the original model card — see the base model for those.
NVIDIA's own optimized deployment build is
[NVFP4](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4), which
needs a **Blackwell** GPU. This repository is for everything else: int8 W8A16 runs on
Marlin kernels from compute capability 7.5 up, so Ampere, Ada and Hopper cards get a
weight-quantized build too. The base model card lists "building quantized variants" as one
of the BF16 repo's intended uses; this is that.
## What was changed
Weights were quantized from bfloat16 to **int8, group size 64, symmetric, weight-only**
(activations stay 16-bit) using `llmcompressor.model_free_ptq`. No calibration data was
used and the model was never loaded — the quantizer operates directly on the safetensors.
Architecture, tokenizer and chat template are the vendor's, unmodified.
6,004 Linear modules were converted, covering 88.6% of the output's bytes:
| component | precision | source | quantized |
|---|---|---|---|
| routed experts (128 per MoE layer × 23 layers) | int8 g64 | 58.75 GB | **30.29 GB** |
| Mamba in/out projections + attention (70 modules) | int8 g64 | 2.06 GB | 1.06 GB |
| shared expert (46 modules) | int8 g64 | 0.92 GB | 0.47 GB |
| MTP head (`mtp.*`) | bfloat16 | 2.67 GB | 2.67 GB |
| `backbone.embeddings` + `lm_head` (untied) | bfloat16 | 1.41 GB | 1.41 GB |
| MoE routers (`.gate`) | bfloat16 / fp32 | 0.02 GB | 0.02 GB |
| Mamba `conv1d`, norms, SSM params | bfloat16 | 0.001 GB | 0.001 GB |
| **total** | | **65.83 GB** | **35.93 GB** |
Of the quantized share, 30.86 GB is packed int8 and 0.96 GB is bf16 group scales. The
scales are the same count as in the W4A16 sibling — both builds use group size 64 and
convert the same 6,004 modules — so the int8 payload is almost exactly twice the int4 one
and everything else is unchanged.
**Group size 64, not the usual 128.** The expert `down_proj` takes an 1856-wide input, and
128 does not divide it. At the default group size 2,944 expert tensors cannot be
quantized; at 64 nothing is misaligned.
Left at bfloat16:
- **`mtp.*`** — the multi-token-prediction head (one `attention` + one `moe` block,
`num_nextn_predict_layers: 1`). vLLM loads it through the speculative-decoding path
rather than the main stack. At 2.67 GB it is the largest 16-bit component here, so
there is real headroom for anyone who measures that vLLM accepts a quantized one.
- **`.gate`** — the 23 MoE routers plus their fp32 `e_score_correction_bias`. Routing
decides which experts run at all; 0.02 GB is not worth the risk.
- **`backbone.embeddings` and `lm_head`** — precision-sensitive, and untied in this model.
- **`conv1d`** — Mamba causal-convolution kernels, shape `(6144, 1, 4)`. Not Linear
layers, and quantizers reject them outright.
- **`backbone.norm_f`** and the Mamba `A_log` / `dt_bias` / `D` state-space parameters —
1-D, never quantizable.
The architecture is a 52-block hybrid: **23 Mamba-2 blocks, 23 MoE blocks and 6 attention
blocks**. Only 6 blocks carry a KV cache, which is what makes long context cheap here (see
below). Of ~30B total parameters, ~3B are active per token — 6 of 128 routed experts plus
one shared expert.
### Checkpoint layout
Experts ship as per-expert 2-D weights in the source already
(`…mixer.experts.{id}.up_proj`, `down_proj`), so no fused-3-D splitting was involved and
the naming carries straight through as `…experts.{id}.up_proj.weight_packed`. vLLM's
NemotronH loader builds its expert mapping with `ckpt_gate_proj_name="up_proj"` and
`ckpt_down_proj_name="down_proj"`, matching this layout.
## Usage
Requires **vLLM >= 0.25.1**, where `NemotronHForCausalLM` and the `nemotron_v3` reasoning
parser are both present. No nightly build needed.
```bash
vllm serve GotoAI-Inc/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16 \
--max-model-len 262144 \
--mamba-backend flashinfer \
--reasoning-parser nemotron_v3 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder
```
Do not pass `--quantization`; compressed-tensors is detected from `config.json`. The int8
W8A16 scheme uses Marlin kernels and runs on compute capability 7.5 and above.
- **`--tool-call-parser qwen3_coder`** is what the base model card specifies — Nemotron 3.5
emits the same XML tool-call framing as Qwen3-Coder. `qwen3_xml` is an alias for the same
parser class in current vLLM.
- **`--reasoning-parser nemotron_v3`** splits thinking into `reasoning_content`.
- **`--mamba-ssm-cache-dtype float16`** halves the Mamba state cache if you are tight on
memory; the base card pairs it with
`--enable-mamba-cache-stochastic-rounding --mamba-cache-philox-rounds 5`.
- **Speculative decoding**: the base card uses a separate DSpark checkpoint. This build
also still carries the vendor's MTP head, which vLLM can route through its
`nemotron_h_mtp` path — `--speculative-config '{"method": "mtp", "num_speculative_tokens": 1}'`.
Neither path is smoke-tested here.
### Fitting the card
Only **6 of 52 blocks use attention**, with 2 KV heads at `head_dim` 128 — about
**6 KB/token**, an order of magnitude cheaper than a conventional 30B. The 23 Mamba blocks
hold a fixed-size recurrent state instead, roughly **48 MB per concurrent sequence** at the
default fp32 SSM cache (half that at float16), independent of sequence length.
| context | KV cache | + weights |
|---|---|---|
| 32k | ~0.2 GB | ~36.1 GB |
| 128k | ~0.8 GB | ~36.7 GB |
| 256k (native max) | ~1.6 GB | ~37.5 GB |
The weights, not the context, are the binding constraint on this build: going from 32k to
the full 256k costs only ~1.4 GB. A 48 GB card is comfortable at the native maximum with
room for concurrency. A 40 GB card fits but with little slack once activations and CUDA
graphs are counted — lower `--max-model-len` before lowering
`--gpu-memory-utilization`. On 32 GB or less, use the W4A16 sibling instead.
`max_position_embeddings` is 262144 — the base card's validated 1M-token configurations use
`VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 --max-model-len 1048576` on 8×H100 or GB200, which is not
what this single-card build is for. This is arithmetic from `config.json`, not a measured
deployment.
## Reproducing this checkpoint
Built with [llm-quantizer](https://github.com/gotoai/llm-quantizer):
```bash
./llmq.py run --profile nemotron-3.5-lightning-30b-a3b --scheme W8A16
```
which is equivalent to:
```python
# llmcompressor==0.13.1a20260814, compressed-tensors==0.18.1a20260818,
# transformers==5.15.1, torch==2.13.0
from llmcompressor import model_free_ptq
model_free_ptq(
model_stub="NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16",
save_directory="NVIDIA-Nemotron-3.5-Lightning-30B-A3B-W8A16",
scheme="W8A16",
group_size=64,
ignore=["re:.*\\.gate$", "re:.*\\.conv1d$", "re:.*mtp.*",
"lm_head", "re:.*\\.embeddings$", "re:.*\\.norm_f$"],
device="cuda:0",
)
```
The source ships as 14 shards of ~5 GB and a job holds one shard at a time, so no
re-sharding is needed and the build peaks at a few GB of VRAM — it took about a minute on
one consumer GPU.
Two of those ignore patterns are easy to miss. `re:.*\.embeddings$` is needed because this
model calls its embedding table `backbone.embeddings`, not `embed_tokens`. And
`re:.*\.norm_f$` is needed because compressed-tensors auto-skips norms with a literal
`module_name.endswith("norm")` test, which the final norm — `backbone.norm_f`, 1-D
`(2688,)` — misses; without it the run aborts with `expected 2D linear weight`.
## Evaluation
**No benchmarks have been run.** Data-free round-to-nearest quantization degrades quality
more than a calibrated (GPTQ/AWQ) or QAT build; how much, for your task, is unmeasured
here. Int8 degrades far less than int4 — that is the reason this build exists — but "less"
is not "none". Treat the published Nemotron 3.5 Lightning numbers as describing the
bfloat16 model, not this one.
Two properties of this architecture are why the int8 build is worth its extra 15 GB. The
routers stay 16-bit, so expert *selection* is identical in both builds, but all 2,944
routed experts are quantized without calibration and rarely-activated experts get no more
attention than hot ones — with only 6 of 128 experts active per token, a cold expert's
error is never averaged away. And Mamba blocks carry state across the whole sequence, so
projection error has a longer path to accumulate than in a pure attention stack. Both are
error-accumulation stories, and int8's smaller per-weight error compounds less. Long-context
behaviour on your own traffic is still the thing worth checking.
## License
**OpenMDW License Agreement, version 1.1**, inherited from the base model — the vendor's
`LICENSE` is included unmodified. OpenMDW is permissive: it grants use without restriction
and places no conditions on model outputs. It does require that any distribution retain a
copy of the agreement and all notices of origin, so NVIDIA's `LICENSE` and its
accompanying `safety.md`, `bias.md`, `privacy.md` and `explainability.md` are carried
through here. It also terminates the grant for anyone who brings patent or copyright
litigation over the model. Read it before redistributing a derivative.
"Nemotron" and "NVIDIA" are NVIDIA's marks; this repository is not endorsed by or
affiliated with NVIDIA.
|