Instructions to use sojufx/Nex-N2.5-mini-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sojufx/Nex-N2.5-mini-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sojufx/Nex-N2.5-mini-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sojufx/Nex-N2.5-mini-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("sojufx/Nex-N2.5-mini-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sojufx/Nex-N2.5-mini-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sojufx/Nex-N2.5-mini-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": "sojufx/Nex-N2.5-mini-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/sojufx/Nex-N2.5-mini-NVFP4
- SGLang
How to use sojufx/Nex-N2.5-mini-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 "sojufx/Nex-N2.5-mini-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": "sojufx/Nex-N2.5-mini-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "sojufx/Nex-N2.5-mini-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": "sojufx/Nex-N2.5-mini-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use sojufx/Nex-N2.5-mini-NVFP4 with Docker Model Runner:
docker model run hf.co/sojufx/Nex-N2.5-mini-NVFP4
Nex-N2.5-mini NVFP4
A native NVIDIA ModelOpt NVFP4 conversion of nex-agi/Nex-N2.5-mini, prepared for NVIDIA Blackwell GPUs.
This is a fresh conversion from the original BF16 checkpoint, not a requantization of another quantized release. The precision layout keeps the sensitive and multimodal parts of the model at higher precision while reducing the large routed-expert weights:
- NVFP4 W4A16: routed MoE experts and shared-expert MLP projections
- FP8: full-attention projections and hybrid linear-attention projections
- FP8: KV-cache cast metadata
- BF16:
lm_head, complete vision encoder/projector, and native one-layer MTP head
Keeping the LM head in BF16 is intentional. It directly produces next-token logits, so retaining it is a quality-first choice for instruction following, structured output, and tool use. The vision stack and MTP head are also preserved rather than being folded into the quantization pass.
Included
- NVIDIA ModelOpt mixed-precision safetensors checkpoint
- Original tokenizer, chat template, processor, and generation configuration
- Original model configuration and multimodal preprocessing settings
hf_quant_config.jsondescribing the precision map
Serving With vLLM
Use a current Blackwell-capable vLLM build with support for the Qwen 3.5 MoE multimodal architecture and ModelOpt mixed-precision checkpoints. The exported configuration allows vLLM to detect the ModelOpt format automatically.
pip install -U vllm
vllm serve sojufx/Nex-N2.5-mini-NVFP4 \
--trust-remote-code \
--max-model-len 262144 \
--gpu-memory-utilization 0.80 \
--kv-cache-dtype fp8 \
--limit-mm-per-prompt '{"image": 1}'
Start with a shorter context window or lower GPU-memory utilization on smaller cards. This model is multimodal; retain the bundled chat_template.jinja and processor files so image tokens are rendered correctly.
For an OpenAI-compatible request with an image:
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "sojufx/Nex-N2.5-mini-NVFP4",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image in one sentence."},
{"type": "image_url", "image_url": {"url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}}
]
}]
}'
Conversion Details
- Source: nex-agi/Nex-N2.5-mini
- Source revision:
87420286149d9cce9bd46cd335ef9bda33c37c1b - Quantizer: NVIDIA ModelOpt
- Recipe:
huggingface/qwen3_5_moe/ptq/qwopus_w4a16_nvfp4_bf16_lm_head - Calibration: 256 public WikiText samples
- Format: safetensors
The conversion completed with coherent pre- and post-quantization generation smoke tests. This repository contains converted weights; please follow the base model's Apache-2.0 license and usage terms.
Provenance
Nex-N2.5-mini was created and released by Nex-AGI. This repository repackages no training data and makes no model changes beyond the documented precision conversion.
- Downloads last month
- -
Model tree for sojufx/Nex-N2.5-mini-NVFP4
Base model
nex-agi/Nex-N2.5-mini