Downloads · 30 days
26
4% of all-time downloads
cybermotaz/Falcon-H1R-7B-NVFP4
Falcon-H1R-7B-NVFP4 is a text generation model from cybermotaz. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
26
4% of all-time downloads
All-time downloads
583
Public
Parameters
4.2B
5.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors5.4 GB · 100%
How the weights are stored.
U83.4B · 73%
From the Hugging Face model README
When Abu Dhabi's Technology Innovation Institute created the majestic Falcon H1R, they built a hybrid beast - part Transformer, part Mamba2 - capable of soaring through 65,536 tokens of context.
But even falcons need to fly faster.
Mutaz Al Awamleh took this desert marvel and supercharged it with NVIDIA's cutting-edge NVFP4 quantization - 4-bit floating point with two-level scaling. The result? A model that's 2x faster while using 3x less memory.
Benchmarked on NVIDIA DGX Spark GB10 with 1000 concurrent requests:
| Metric | NVFP4 | BF16 | Improvement |
|---|---|---|---|
| Throughput | 879 TPS | 681 TPS | 1.3x faster |
| Time to First Token | 45.7s | 60.4s | 1.3x faster |
| End-to-End Latency | 71.1s | 93.8s | 1.3x faster |
| Memory Usage | 5.1 GiB | ~14 GiB | 2.8x smaller |
| Accuracy Loss | - | - | <1% |
| Metric | NVFP4 | BF16 | Improvement |
|---|---|---|---|
| Throughput | 585 TPS | 336 TPS | 1.7x faster |
| Time to First Token | 77.2s | 135.7s | 1.8x faster |
| End-to-End Latency | 110.5s | 202.5s | 1.8x faster |
docker run --gpus all -p 8000:8000 mutazai/falcon-h1r-7b-nvfp4:latest
That's it. No configuration. No tuning. No headaches.
Everything is baked in:
import openai
client = openai.OpenAI(
base_url="http://localhost:8000/v1",
api_key="not-needed"
)
response = client.chat.completions.create(
model="falcon-h1r-7b-nvfp4",
messages=[
{"role": "user", "content": "Explain quantum computing in simple terms."}
],
max_tokens=500
)
print(response.choices[0].message.content)
| Attribute | Value |
|---|---|
| Base Model | tiiuae/Falcon-H1R-7B |
| Architecture | Hybrid Transformers + Mamba2 |
| Parameters | 7.5B |
| Context Length | 65,536 tokens |
| Quantization | NVFP4 (4-bit floating point) |
| Compression | 2.8x (16 GB → 5.1 GB) |
| Target Hardware | NVIDIA Blackwell (GB10, GB100, GB200) |
embed_tokens, lm_head (kept in BF16)mutazai/optimized-vllm-sota-cuda13:3.0--quantization modelopt_fp4
--kv-cache-dtype fp8
--enable-prefix-caching
--max-model-len 65536
--max-num-seqs 256
--gpu-memory-utilization 0.88
--compilation-config '{"cudagraph_mode": "FULL_AND_PIECEWISE"}'
All benchmarks performed with:
Pull the image:
docker pull mutazai/falcon-h1r-7b-nvfp4:latest
Run with custom port:
docker run --gpus all -p 9000:8000 mutazai/falcon-h1r-7b-nvfp4:latest
Check health:
curl http://localhost:8000/health
Quantizing Falcon H1R required solving several challenges unique to hybrid Mamba-Transformer architectures:
| Challenge | Solution |
|---|---|
| vLLM Falcon H1R loader missing NVFP4 support | Patched falcon_h1.py with NVFP4 weight loading (weight unpacking from FP4 packed format) |
| W4A4 activation quantization failures | Switched to W4A16 (weight-only quantization) - Mamba SSM layers produce zero-scale activations |
config.json format incompatible | Fixed quant_method: "modelopt" → "nvfp4", added format: "nvfp4" field |
hf_quant_config.json wrong algo | Changed kv_cache_quant_algo: "INT8" → "FP8" to match KV cache dtype |
| transformers 4.55+ incompatible | Pinned to transformers==4.48.0 for HybridMambaAttentionDynamicCache compatibility |
Weight Loader Patch (falcon_h1.py):
Quantization Config:
# Used W4A16 weight-only (not W4A4 full quantization)
WEIGHT_ONLY_CONFIG = {
"*weight_quantizer": {"enable": True, "num_bits": (2, 1)},
"*input_quantizer": {"enable": False}, # Critical for Mamba
"*output_quantizer": {"enable": False},
"*lm_head*": {"enable": False},
"*embed_tokens*": {"enable": False}
}
vLLM Runtime Flags:
--quantization modelopt_fp4 (not modelopt)--kv-cache-dtype fp8 (must match config)--trust-remote-code (for Mamba2 support)quant_method and format fieldsApache 2.0 - Same as the original Falcon H1R model.
🦌 + 🦅 = 🚀
ELK + FALCON = SPEED
<br>
🐳 mutazai/falcon-h1r-7b-nvfp4
</div>