Image-Text-to-Text
Transformers
Safetensors
hy_v4_flash
text-generation
nvfp4
fp8
modelopt
4-bit precision
quantized
Mixture of Experts
mixture-of-experts
multimodal
vision
long-context
speculative-decoding
dgx-spark
gb10
hunyuan
hy4-flash
instruct
conversational
8-bit precision
Instructions to use Avifenesh/Hy4-flash-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Avifenesh/Hy4-flash-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Avifenesh/Hy4-flash-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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Avifenesh/Hy4-flash-NVFP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Avifenesh/Hy4-flash-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Avifenesh/Hy4-flash-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": "Avifenesh/Hy4-flash-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/Avifenesh/Hy4-flash-NVFP4
- SGLang
How to use Avifenesh/Hy4-flash-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 "Avifenesh/Hy4-flash-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": "Avifenesh/Hy4-flash-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 "Avifenesh/Hy4-flash-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": "Avifenesh/Hy4-flash-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 Avifenesh/Hy4-flash-NVFP4 with Docker Model Runner:
docker model run hf.co/Avifenesh/Hy4-flash-NVFP4
Download quant-stats/summary.json from Avifenesh/Hy4-flash-NVFP4: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/Avifenesh/Hy4-flash-NVFP4/resolve/main/quant-stats/summary.json
- Command line
-
hf download hf://Avifenesh/Hy4-flash-NVFP4/quant-stats/summary.json
-
curl -L -o summary.json https://huggingface.co/Avifenesh/Hy4-flash-NVFP4/resolve/main/quant-stats/summary.json
2.32 kB
| { | |
| "experts_covered": 62976, | |
| "layers_covered": [ | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23, | |
| 24, | |
| 25, | |
| 26, | |
| 27, | |
| 28, | |
| 29, | |
| 30, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 35, | |
| 36, | |
| 37, | |
| 38, | |
| 39, | |
| 40, | |
| 41 | |
| ], | |
| "experts_nvfp4_mean": 0.006602110154503303, | |
| "experts_mxfp4_mean": 0.012584163463859249, | |
| "experts_nvfp4_qsnr_db": 21.803172338539586, | |
| "experts_mxfp4_qsnr_db": 19.001756490154925, | |
| "experts_nvfp4_max": 0.00663618, | |
| "experts_mxfp4_over_nvfp4_mse_ratio": 1.906129725358354, | |
| "worst_layer_part_nvfp4": [ | |
| 6, | |
| "down", | |
| 0.0066064829296875 | |
| ], | |
| "nonexpert_classes": { | |
| "model.dfly_layers.N.mlp.down_proj.weight [nvfp4]": { | |
| "n": 5, | |
| "mean": 0.006601462, | |
| "max": 0.00660707 | |
| }, | |
| "model.dfly_layers.N.mlp.gate_proj.weight [nvfp4]": { | |
| "n": 5, | |
| "mean": 0.00659791, | |
| "max": 0.00659977 | |
| }, | |
| "model.dfly_layers.N.mlp.up_proj.weight [nvfp4]": { | |
| "n": 5, | |
| "mean": 0.00659636, | |
| "max": 0.00659882 | |
| }, | |
| "model.dfly_layers.N.self_attn.linear_gate.weight [block128]": { | |
| "n": 5, | |
| "mean": 0.0007008585999999999, | |
| "max": 0.000701276 | |
| }, | |
| "model.dfly_layers.N.self_attn.o_proj.weight [block128]": { | |
| "n": 5, | |
| "mean": 0.0006999082, | |
| "max": 0.000700393 | |
| }, | |
| "model.dfly_layers.N.self_attn.q_b_proj.weight [block128]": { | |
| "n": 5, | |
| "mean": 0.0007001202, | |
| "max": 0.000700488 | |
| }, | |
| "model.dfly_layers.hidden_correction.down_proj.weight [nvfp4]": { | |
| "n": 1, | |
| "mean": 0.00661334, | |
| "max": 0.00661334 | |
| }, | |
| "model.dfly_layers.hidden_correction.gate_proj.weight [nvfp4]": { | |
| "n": 1, | |
| "mean": 0.00660283, | |
| "max": 0.00660283 | |
| }, | |
| "model.dfly_layers.hidden_correction.up_proj.weight [nvfp4]": { | |
| "n": 1, | |
| "mean": 0.00659776, | |
| "max": 0.00659776 | |
| }, | |
| "model.layers.N.engram_layer.multi_head_embedding.embedding.weight [row]": { | |
| "n": 4, | |
| "mean": 0.00067213875, | |
| "max": 0.000676663 | |
| }, | |
| "model.layers.N.self_attn.linear_gate.weight [block128]": { | |
| "n": 41, | |
| "mean": 0.0007009303658536586, | |
| "max": 0.000701607 | |
| }, | |
| "model.layers.N.self_attn.o_proj.weight [block128]": { | |
| "n": 41, | |
| "mean": 0.0007003635609756098, | |
| "max": 0.000701161 | |
| }, | |
| "model.layers.N.self_attn.q_b_proj.weight [block128]": { | |
| "n": 41, | |
| "mean": 0.0007004039268292683, | |
| "max": 0.000701456 | |
| } | |
| } | |
| } |