Image-Text-to-Text
Transformers
Safetensors
deepseek_v4
text-generation
multimodal
vision-language
deepseek-v4
moonvit
nvfp4
blackwell
8-bit precision
fp8
Instructions to use webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4") model = AutoModelForCausalLM.from_pretrained("webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4
- SGLang
How to use webbrain-one/DeepSeek-V4-Flash-Vision-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 "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4 with Docker Model Runner:
docker model run hf.co/webbrain-one/DeepSeek-V4-Flash-Vision-NVFP4
| { | |
| "architectures": [ | |
| "DeepseekV4ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "compress_ratios": [ | |
| 0, | |
| 0, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 0 | |
| ], | |
| "compress_rope_theta": 160000, | |
| "deepseek_vision": { | |
| "image_placeholder": "<image>", | |
| "image_placeholder_token_id": 129280, | |
| "max_image_tokens": 512, | |
| "requires_sglang_source_patch": true, | |
| "routing_palette": [ | |
| 0, | |
| 1, | |
| 2, | |
| 8, | |
| 9, | |
| 10, | |
| 12, | |
| 74, | |
| 81, | |
| 110, | |
| 114, | |
| 240, | |
| 17081, | |
| 25312, | |
| 30711, | |
| 58279, | |
| 7637, | |
| 8936, | |
| 45556, | |
| 52073, | |
| 7743, | |
| 8347, | |
| 13203, | |
| 19795, | |
| 44418, | |
| 62970, | |
| 79038, | |
| 6381, | |
| 48025, | |
| 109859, | |
| 29629, | |
| 91213, | |
| 90662, | |
| 121562, | |
| 8570, | |
| 25568, | |
| 3685, | |
| 81916, | |
| 14638, | |
| 50590, | |
| 101211, | |
| 24832, | |
| 75337, | |
| 131, | |
| 15170, | |
| 79723, | |
| 84052, | |
| 20866, | |
| 48327, | |
| 72234, | |
| 15507, | |
| 128, | |
| 16760, | |
| 34135, | |
| 36264, | |
| 59037, | |
| 3839, | |
| 29854, | |
| 109646, | |
| 64, | |
| 23442, | |
| 6584, | |
| 10255, | |
| 17173 | |
| ], | |
| "routing_policy": "palette_cycle", | |
| "schema_version": 1, | |
| "sglang_source_commit": "723c2776401987cba3cfee25830db50f3964b83f", | |
| "tower_model_id": "moonshotai/Kimi-K2.6", | |
| "tower_revision": "7eb5002f6aadc958aed6a9177b7ed26bb94011bb" | |
| }, | |
| "eos_token_id": 1, | |
| "expert_dtype": "fp4", | |
| "hc_eps": 1e-06, | |
| "hc_mult": 4, | |
| "hc_sinkhorn_iters": 20, | |
| "head_dim": 512, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "image_token_id": 129280, | |
| "index_head_dim": 128, | |
| "index_n_heads": 64, | |
| "index_topk": 512, | |
| "initializer_range": 0.02, | |
| "max_position_embeddings": 1048576, | |
| "media_placeholder_token_id": 129280, | |
| "model_type": "deepseek_v4", | |
| "moe_intermediate_size": 2048, | |
| "n_routed_experts": 256, | |
| "n_shared_experts": 1, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 64, | |
| "num_experts_per_tok": 6, | |
| "num_hash_layers": 3, | |
| "num_hidden_layers": 43, | |
| "num_key_value_heads": 1, | |
| "num_nextn_predict_layers": 1, | |
| "o_groups": 8, | |
| "o_lora_rank": 1024, | |
| "q_lora_rank": 1024, | |
| "qk_rope_head_dim": 64, | |
| "quantization_config": { | |
| "activation_scheme": "dynamic", | |
| "config_groups": { | |
| "group_0": { | |
| "input_activations": { | |
| "dynamic": false, | |
| "group_size": 16, | |
| "num_bits": 4, | |
| "type": "float" | |
| }, | |
| "targets": [ | |
| "Linear" | |
| ], | |
| "weights": { | |
| "dynamic": false, | |
| "group_size": 16, | |
| "num_bits": 4, | |
| "type": "float" | |
| } | |
| } | |
| }, | |
| "fmt": "e4m3", | |
| "group_size": 16, | |
| "ignore": [ | |
| "*.attn.*", | |
| "*.ffn.shared_experts.*", | |
| "head", | |
| "mtp.*" | |
| ], | |
| "kv_cache_quant_algo": null, | |
| "moe_quant_algo": "NVFP4", | |
| "producer": { | |
| "name": "modelopt", | |
| "version": "dsv4-nvfp4-experts" | |
| }, | |
| "quant_algo": "MIXED_PRECISION", | |
| "quant_method": "fp8", | |
| "quantized_layers": { | |
| "layers.0.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.1.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.10.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.11.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.12.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.13.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.14.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.15.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.16.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.17.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.18.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.19.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.2.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.20.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.21.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.22.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.23.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.24.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.25.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.26.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.27.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.28.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.29.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.3.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.30.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.31.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.32.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.33.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.34.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.35.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.36.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.37.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.38.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.39.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.4.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.40.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.41.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.42.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.5.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.6.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.7.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.8.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| }, | |
| "layers.9.ffn.experts": { | |
| "group_size": 16, | |
| "quant_algo": "NVFP4" | |
| } | |
| }, | |
| "scale_fmt": "ue8m0", | |
| "weight_block_size": [ | |
| 128, | |
| 128 | |
| ] | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": { | |
| "beta_fast": 32, | |
| "beta_slow": 1, | |
| "factor": 16, | |
| "original_max_position_embeddings": 65536, | |
| "type": "yarn" | |
| }, | |
| "rope_theta": 10000, | |
| "routed_scaling_factor": 1.5, | |
| "scoring_func": "sqrtsoftplus", | |
| "sliding_window": 128, | |
| "swiglu_limit": 10.0, | |
| "tie_word_embeddings": false, | |
| "topk_method": "noaux_tc", | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.57.1", | |
| "use_cache": true, | |
| "vision_config": { | |
| "hidden_size": 1152, | |
| "init_pos_emb_height": 64, | |
| "init_pos_emb_time": 4, | |
| "init_pos_emb_width": 64, | |
| "intermediate_size": 4304, | |
| "merge_kernel_size": [ | |
| 2, | |
| 2 | |
| ], | |
| "merge_type": "sd2_tpool", | |
| "mm_hidden_size": 1152, | |
| "mm_projector_type": "patchmerger", | |
| "model_type": "kimi_k25", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 27, | |
| "patch_size": 14, | |
| "pos_emb_type": "divided_fixed", | |
| "projector_hidden_act": "gelu", | |
| "projector_ln_eps": 1e-05, | |
| "text_hidden_size": 4096, | |
| "video_attn_type": "spatial_temporal", | |
| "vt_hidden_size": 1152, | |
| "vt_intermediate_size": 4304, | |
| "vt_num_attention_heads": 16, | |
| "vt_num_hidden_layers": 27 | |
| }, | |
| "vocab_size": 129280 | |
| } | |