rodrigoramosrs commited on
Commit
137dbc8
·
verified ·
1 Parent(s): 179ebf1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +7 -5
README.md CHANGED
@@ -58,18 +58,20 @@ Quantized by [Rodrigo Ramos](https://github.com/rodrigoramosrs).
58
 
59
  ## Quantization Approach
60
 
61
- Produced with [NVIDIA Model Optimizer](https://github.com/NVIDIA/Model-Optimizer) using the canonical **`NVFP4_W4A4_WEIGHT_LOCAL_HESSIAN_CFG`** recipe, verbatim: static per-block 4-bit weights (group size 16) + dynamic 4-bit activations, FP8 attention, local-Hessian calibration with MSE and fp8 scale sweep.
 
 
62
 
63
  Calibration ran on **512 samples × 512 tokens** (262144 tokens) of competitive-programming code from `nvidia/Nemotron-Competitive-Programming-v1`, keeping quantization faithful on the distributions that matter most for coding tasks.
64
 
65
- The result retains the original model's strong software-engineering capabilities at roughly one third of the BF16 footprint, ready for NVFP4-capable inference stacks on Blackwell GPUs.
66
 
67
  ## Files
68
 
69
  | File | Size | Notes |
70
  |---|---|---|
71
- | `model-00001-of-00005.safetensors` … `model-00005-of-00005.safetensors` | ~17.5 GB total | NVFP4 weights (packed U8 + FP8 block scales) |
72
- | `model.safetensors.index.json` | — | Shard index (2051 tensors) |
73
  | `hf_quant_config.json` | — | `quant_algo: NVFP4`, group size 16 |
74
  | `config.json`, `tokenizer.*`, `merges.txt`, `vocab.json` | — | Config + tokenizer from the base model |
75
  | `scripts/quantize_veriloop.py` | — | Full reproduction script (multi-GPU PTQ) |
@@ -79,7 +81,7 @@ The result retains the original model's strong software-engineering capabilities
79
 
80
  This checkpoint targets **NVFP4-capable runtimes** (Blackwell GPUs). Plain `transformers` cannot load modelopt NVFP4 checkpoints directly.
81
 
82
- > **Compatibility note:** per the NVIDIA recipe, a small set of projections (`linear_attn.in_proj_a/b`, `conv1d`), plus the embeddings and `lm_head`, intentionally ship in BF16. The `exclude_modules` list in `hf_quant_config.json` (mirrored in `config.json`) declares exactly which modules those are — inference loaders must honor it and serve those modules unquantized. If a loader errors with *"weight is torch.bfloat16 but the quant config declares NVFP4"*, it is ignoring the exclusion list, not a checkpoint defect.
83
 
84
  ### vLLM
85
 
 
58
 
59
  ## Quantization Approach
60
 
61
+ Produced with [NVIDIA Model Optimizer](https://github.com/NVIDIA/Model-Optimizer) using the canonical **`NVFP4_W4A4_WEIGHT_LOCAL_HESSIAN_CFG`** recipe: static per-block 4-bit weights (group size 16) + dynamic 4-bit activations, FP8 attention, local-Hessian calibration with MSE and fp8 scale sweep.
62
+
63
+ The `linear_attn` (Gated Delta Net) blocks ship in BF16 on purpose — the same granularity as NVIDIA's official NVFP4 releases (e.g. `nvidia/Qwen3.5-397B-A17B-NVFP4`, which excludes `linear_attn*` per layer). Only self-attention, MLP and output projections are NVFP4. Embeddings, `lm_head` and small projections stay BF16 per the recipe.
64
 
65
  Calibration ran on **512 samples × 512 tokens** (262144 tokens) of competitive-programming code from `nvidia/Nemotron-Competitive-Programming-v1`, keeping quantization faithful on the distributions that matter most for coding tasks.
66
 
67
+ The result retains the original model's strong software-engineering capabilities at roughly half of the BF16 footprint, ready for NVFP4-capable inference stacks on Blackwell GPUs.
68
 
69
  ## Files
70
 
71
  | File | Size | Notes |
72
  |---|---|---|
73
+ | `model-00001-of-00007.safetensors` … `model-00007-of-00007.safetensors` | ~26.8 GB total | NVFP4 weights (packed U8 + FP8 block scales) + BF16 `linear_attn`/embeddings/head |
74
+ | `model.safetensors.index.json` | — | Shard index (1619 tensors) |
75
  | `hf_quant_config.json` | — | `quant_algo: NVFP4`, group size 16 |
76
  | `config.json`, `tokenizer.*`, `merges.txt`, `vocab.json` | — | Config + tokenizer from the base model |
77
  | `scripts/quantize_veriloop.py` | — | Full reproduction script (multi-GPU PTQ) |
 
81
 
82
  This checkpoint targets **NVFP4-capable runtimes** (Blackwell GPUs). Plain `transformers` cannot load modelopt NVFP4 checkpoints directly.
83
 
84
+ > **Compatibility note:** per the NVIDIA recipe, the `linear_attn` blocks, a small set of projections (`linear_attn.in_proj_a/b`, `conv1d`), plus the embeddings and `lm_head`, intentionally ship in BF16. The `exclude_modules` list in `hf_quant_config.json` (mirrored in `config.json`, including fused names such as `in_proj_ba`/`in_proj_qkvz` that some loaders synthesize) declares exactly which modules those are — inference loaders must honor it and serve those modules unquantized. If a loader errors with *"weight is torch.bfloat16 but the quant config declares NVFP4"*, it is ignoring the exclusion list, not a checkpoint defect.
85
 
86
  ### vLLM
87