Agents-A1-TextOnly-FP4-VocabPruned
This is an optimized, hardware-accelerated 4-bit FP4 quantization of InternScience/Agents-A1 (a 35B parameter Mixture-of-Experts agentic model with hybrid Mamba-Attention layers and 2M context length) with pruned vocabulary and tuned prefill settings for extreme context capacity.
This optimized checkpoint was created by pruning the multimodal vision encoder and excluding the grafted Multi-Token Prediction (MTP) weights to drastically reduce the VRAM footprint, and then slicing the vocabulary size from 248,320 down to 152,064 tokens (mapping away unused visual/coordinate tokens).
It is designed to be served natively under vLLM V1 with FP8 KV cache support.
Key Work Done & Optimizations
- Multimodal Pruning: Removed the visual tower (
model.visual.) and skipped the MTP heads (model_mtp.safetensors), saving 2.0 GB of VRAM during execution. - Vocabulary Pruning: Sliced vocabulary down to
152,064(standard Qwen-2.5-Text vocab scale) by mapping away 96,256 unused vision/coordinate tokens. This saved ~370 MiB of weight VRAM per GPU. - NVIDIA ModelOpt Quantization: Calibrated and quantized the weights to
W4A16_NVFP4block-wise schema (block size 16), ensuring full compatibility with vLLM's hardcoded Marlin FP4 group size constraint. - Prefill Tuning: Tuned chunked prefill settings to
--max-num-batched-tokens 2048, freeing significant activation memory during execution.
KV Cache Capacity & Concurrency (RTX 5060 Ti 16GB TP=2)
These optimizations expand the physical KV cache capacity to 715,582 tokens (a +17.2% capacity gain over standard configurations), enabling stable long-context execution:
| Concurrency | Prompt Size | Avg TTFT | Avg Decode/Agent | Pure Decode Throughput | Overall Throughput |
|---|---|---|---|---|---|
| 8 | 25,000 tok | 26.43s | 46.58 tok/s | 245.78 tok/s | 214.92 tok/s |
| 16 | 25,000 tok | 23.90s | 28.70 tok/s | 316.41 tok/s | 304.98 tok/s |
| 32 | 15,000 tok | 50.89s | 22.30 tok/s | 435.74 tok/s | 396.64 tok/s |
Hardware & Serving Recommendations
GPU Requirements
- Ideal Dual-GPU Setup: Two RTX 5060 Ti GPUs (16GB VRAM each) for budget deployment, or any Blackwell GPU pair (e.g., RTX 5080 / 5090) for larger KV cache headroom.
- VRAM Budget: The model weights occupy
20.1 GB total (9.56 GB per GPU under TP=2). Operating with FP8 KV cache enables massive contexts to scale comfortably.
vLLM Serving Command
vllm serve Cadododoom/Agents-A1-TextOnly-FP4 \
--tensor-parallel-size 2 \
--quantization compressed-tensors \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
--kv-cache-dtype fp8 \
--max-model-len 32768 \
--max-num-batched-tokens 2048 \
--trust-remote-code
- Downloads last month
- 124
Model tree for Cadododoom/Agents-A1-TextOnly-FP4
Base model
InternScience/Agents-A1