Downloads · 30 days
7
14% of all-time downloads
mconcat/Trinity-Large-Base-NVFP4
Trinity-Large-Base-NVFP4 is a machine learning model from mconcat. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
NVFP4-quantized version of arcee-ai/Trinity-Large-Base for deployment on NVIDIA Blackwell GPUs.
Downloads · 30 days
7
14% of all-time downloads
All-time downloads
50
Public
Parameters
202B
232 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors232 GB · 100%
How the weights are stored.
U8197B · 87%
From the Hugging Face model README
NVFP4-quantized version of arcee-ai/Trinity-Large-Base for deployment on NVIDIA Blackwell GPUs.
| Base model | arcee-ai/Trinity-Large-Base |
| Architecture | AfmoeForCausalLM (Mixture-of-Experts) |
| Parameters | 398B total, ~13B active per token |
| Layers | 60 (6 dense + 54 MoE) |
| Experts | 256 per MoE layer, 4 active per token, 1 shared expert |
| Hidden size | 3072 |
| MoE intermediate size | 3072 per expert |
| Dense intermediate size | 12,288 |
| Attention | 48 heads, 8 KV heads (GQA), sliding window (4096) + full attention every 4 layers |
| Context length | 8,192 tokens |
| Vocabulary | 200,192 tokens |
| Method | NVFP4 (4-bit floating point) |
| Tool | NVIDIA ModelOpt 0.41.0 |
| Group size | 16 |
| Calibration | 512 samples (Korean, Code, Creative Writing, English), max_seq_length=512 |
| Quantized layers | MLP/expert weights only (gate_proj, up_proj, down_proj in dense and MoE layers) |
| BF16 layers | Attention (Q/K/V/O projections), embeddings, router gates, shared experts, layer norms, lm_head |
| Source precision | BF16 |
| Format | Size |
|---|---|
| BF16 (original) | 796 GB |
| NVFP4 (this model) | 216 GB |
3.7x compression.
vLLM >= 0.15.1 supports this model natively with the modelopt quantization backend. Blackwell GPUs (SM100/SM120) are required for NVFP4 inference.
cpu_offload_gb, you need sufficient system RAM for pinned memory (the offload value × number of GPUs, plus ~40 GB for model loading overhead).pip install "vllm>=0.15.1"
Set VLLM_USE_FLASHINFER_MOE_FP4=0 to use the VLLM_CUTLASS MoE backend. This avoids large temporary GPU allocations during MoE weight initialization that can cause OOM on memory-constrained setups:
export VLLM_USE_FLASHINFER_MOE_FP4=0
from vllm import LLM, SamplingParams
llm = LLM(
model="mconcat/Trinity-Large-Base-NVFP4",
quantization="modelopt",
max_model_len=4096,
enforce_eager=True,
gpu_memory_utilization=0.90,
)
sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
outputs = llm.generate(["The meaning of life is"], sampling_params)
print(outputs[0].outputs[0].text)
For setups where total VRAM is less than ~216 GB, use pipeline parallelism with CPU weight offloading:
import os
os.environ["VLLM_USE_FLASHINFER_MOE_FP4"] = "0"
from vllm import LLM, SamplingParams
llm = LLM(
model="mconcat/Trinity-Large-Base-NVFP4",
quantization="modelopt",
pipeline_parallel_size=2, # number of GPUs
cpu_offload_gb=30, # GB of weights to offload per GPU
max_model_len=512,
max_num_seqs=256,
enforce_eager=True,
gpu_memory_utilization=0.95,
)
sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
outputs = llm.generate(["The meaning of life is"], sampling_params)
print(outputs[0].outputs[0].text)
Tuning tips:
cpu_offload_gb is per GPU — total pinned memory = cpu_offload_gb × pipeline_parallel_size. Ensure this fits in system RAM alongside the OS and model loading workspace (~40 GB).VLLM_PP_LAYER_PARTITION to control how many of the 60 layers each GPU gets. For example, export VLLM_PP_LAYER_PARTITION="32,14,14" for a 3-GPU setup where the first GPU has ~3x the VRAM.(layer_weights - cpu_offload_gb) fits comfortably on each GPU with room for KV cache and overhead.max_num_seqs may need to be lowered for GPUs with ≤32 GB VRAM. The sampler warmup allocates max_num_seqs × vocab_size × 8 bytes of temporary memory (~1.5 GB at the default of 1024). Use 256 for smaller GPUs.max_model_len (e.g., 512) and increase once loading succeeds.VLLM_USE_FLASHINFER_MOE_FP4=0 python -m vllm.entrypoints.openai.api_server \
--model mconcat/Trinity-Large-Base-NVFP4 \
--quantization modelopt \
--max-model-len 4096 \
--enforce-eager \
--gpu-memory-utilization 0.90 \
--port 8000
For multi-GPU serving, add --pipeline-parallel-size N --cpu-offload-gb X --max-num-seqs 256 as needed.
curl http://localhost:8000/v1/completions \
-H "Content-Type: application/json" \
-d '{"model": "mconcat/Trinity-Large-Base-NVFP4", "prompt": "Hello", "max_tokens": 64}'
--quantization modelopt (not modelopt_fp4). vLLM auto-detects the NVFP4 algorithm from the config.VLLM_USE_FLASHINFER_MOE_FP4=0 to use the VLLM_CUTLASS MoE backend. The default flashinfer backend performs a reorder_w1w3_to_w3w1 operation that temporarily allocates ~2.25 GB per MoE layer on GPU, which can cause OOM.cpu_offload_gb with the V1 engine may trigger an assertion error in may_reinitialize_input_batch (gpu_model_runner.py). If you encounter AssertionError: Cannot re-initialize the input batch when CPU weight offloading is enabled, this can be safely patched by converting the assertion to a warning. See vLLM PR #18298 for status.transformers >= 5.0 recognizes the AfmoeForCausalLM architecture, it does not support ModelOpt NVFP4 weight format for inference. Use vLLM instead.AfmoeForCausalLM architecture.Following NVIDIA's MLP-only quantization strategy (similar to the DeepSeek-R1 NVFP4 recipe):
gate_proj, up_proj, down_proj) are quantized to FP4mlp.router) remain in BF16*mlp.gate.* exclusion was removed because Trinity uses mlp.gate_proj as a standard MLP projection (not a routing gate)| Domain | Samples | Dataset |
|---|---|---|
| Korean | 128 | heegyu/open-korean-instructions |
| Code | 128 | m-a-p/CodeFeedback-Filtered-Instruction |
| Creative Writing | 128 | Gryphe/ChatGPT-4o-Writing-Prompts |
| General English | 128 | teknium/OpenHermes-2.5 |
| File | Description |
|---|---|
model-00001-of-00005.safetensors ... model-00005-of-00005.safetensors | Quantized model weights (5 shards, ~43-50 GB each) |
model.safetensors.index.json | Weight shard index |
config.json | Model configuration with quantization_config |
hf_quant_config.json | ModelOpt quantization metadata |
generation_config.json | Generation configuration |
tokenizer.json | Tokenizer |
tokenizer_config.json | Tokenizer configuration |
chat_template.jinja | Chat template |
Quantization was performed on 8x NVIDIA A100-SXM4-80GB with ~1.8 TiB system RAM. Total quantization time was approximately 9 hours (dominated by calibration forward passes). Quantization on A100 does not require Blackwell hardware; only inference with native FP4 execution does.
Same license as the base model: Apache 2.0.