Views
No views yet
| 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 |
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"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=01from vllm import LLM, SamplingParams
2
3llm = LLM(
4 model="mconcat/Trinity-Large-Base-NVFP4",
5 quantization="modelopt",
6 max_model_len=4096,
7 enforce_eager=True,
8 gpu_memory_utilization=0.90,
9)
10
11sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
12outputs = llm.generate(["The meaning of life is"], sampling_params)
13print(outputs[0].outputs[0].text)1import os
2os.environ["VLLM_USE_FLASHINFER_MOE_FP4"] = "0"
3
4from vllm import LLM, SamplingParams
5
6llm = LLM(
7 model="mconcat/Trinity-Large-Base-NVFP4",
8 quantization="modelopt",
9 pipeline_parallel_size=2, # number of GPUs
10 cpu_offload_gb=30, # GB of weights to offload per GPU
11 max_model_len=512,
12 max_num_seqs=256,
13 enforce_eager=True,
14 gpu_memory_utilization=0.95,
15)
16
17sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
18outputs = llm.generate(["The meaning of life is"], sampling_params)
19print(outputs[0].outputs[0].text)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.1VLLM_USE_FLASHINFER_MOE_FP4=0 python -m vllm.entrypoints.openai.api_server \
2 --model mconcat/Trinity-Large-Base-NVFP4 \
3 --quantization modelopt \
4 --max-model-len 4096 \
5 --enforce-eager \
6 --gpu-memory-utilization 0.90 \
7 --port 8000--pipeline-parallel-size N --cpu-offload-gb X --max-num-seqs 256 as needed.1curl http://localhost:8000/v1/completions \
2 -H "Content-Type: application/json" \
3 -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.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 |