Text Generation
Transformers
Safetensors
English
Chinese
qwen3_5_text
veriloop
veriloop-coder
code
coding-agent
software-engineering
mathematical-reasoning
nvfp4
modelopt
tensorrt-llm
vllm
sglang
code-optimized
quantization
open-source
apache-2.0
qwen3_5
self-harness
harness-engineering
surface-host-adapter
evidence-binding
rollback
uncertainty-calibration
long-context
vertical-code-model
recursive-improvement
conversational
Instructions to use rodrigoramosrs/veriloop-coder-e2-nvfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rodrigoramosrs/veriloop-coder-e2-nvfp4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rodrigoramosrs/veriloop-coder-e2-nvfp4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rodrigoramosrs/veriloop-coder-e2-nvfp4") model = AutoModelForCausalLM.from_pretrained("rodrigoramosrs/veriloop-coder-e2-nvfp4", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rodrigoramosrs/veriloop-coder-e2-nvfp4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rodrigoramosrs/veriloop-coder-e2-nvfp4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rodrigoramosrs/veriloop-coder-e2-nvfp4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rodrigoramosrs/veriloop-coder-e2-nvfp4
- SGLang
How to use rodrigoramosrs/veriloop-coder-e2-nvfp4 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 "rodrigoramosrs/veriloop-coder-e2-nvfp4" \ --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": "rodrigoramosrs/veriloop-coder-e2-nvfp4", "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 "rodrigoramosrs/veriloop-coder-e2-nvfp4" \ --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": "rodrigoramosrs/veriloop-coder-e2-nvfp4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rodrigoramosrs/veriloop-coder-e2-nvfp4 with Docker Model Runner:
docker model run hf.co/rodrigoramosrs/veriloop-coder-e2-nvfp4
Upload README.md with huggingface_hub
Browse files
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
|
|
|
|
|
|
|
| 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
|
| 66 |
|
| 67 |
## Files
|
| 68 |
|
| 69 |
| File | Size | Notes |
|
| 70 |
|---|---|---|
|
| 71 |
-
| `model-00001-of-
|
| 72 |
-
| `model.safetensors.index.json` | — | Shard index (
|
| 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 |
|