Instructions to use deepseek-ai/DeepSeek-V4.1-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-V4.1-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="deepseek-ai/DeepSeek-V4.1-Flash")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V4.1-Flash", device_map="auto") - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deepseek-ai/DeepSeek-V4.1-Flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-V4.1-Flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-V4.1-Flash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-V4.1-Flash
- SGLang
How to use deepseek-ai/DeepSeek-V4.1-Flash 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 "deepseek-ai/DeepSeek-V4.1-Flash" \ --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": "deepseek-ai/DeepSeek-V4.1-Flash", "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 "deepseek-ai/DeepSeek-V4.1-Flash" \ --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": "deepseek-ai/DeepSeek-V4.1-Flash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-V4.1-Flash with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V4.1-Flash
Bro....500多B的Flash,8卡H200已经上不了桌了吗[cry]
I really need a flash lite model pls!
203.7B的n-gram丢硬盘上不就行了
少分配点kv cache勉强跑跑
552B中包含196B的Engram表,這東西可以放RAM,甚至可以放SSD(參考Qwen3.8Flash-Next),你只需準備356* 1.0625GB+890 *ctx/1,000,000,000 GB(FP4 KV cache+indexer cache)的VRAM和196 *1.0625GB的RAM就可以跑了。
這模型就算權重全放VRAM也才510GB(這裡的8bit版),8卡H200包含1128GB VRAM,理論上可以開500併發
权重只有三百多g,kvcache更是1M上下文才0.9GB,随便跑好吧
552B中包含196B的Engram表,這東西可以放RAM,甚至可以放SSD(參考Qwen3.8Flash-Next),你只需準備356* 1.0625GB+890 *ctx/1,000,000,000 GB(FP4 KV cache+indexer cache)的VRAM和196 *1.0625GB的RAM就可以跑了。
這模型就算權重全放VRAM也才510GB(這裡的8bit版),8卡H200包含1128GB VRAM,理論上可以開500併發
感觉和实际体验还是差挺多的,最近用deepseek-v4-flash-0731当agentic任务teacher model的时候(1m context),sglang+8*H100我觉得勉勉强强,稳定并发基本上16;v4.1感觉大一圈,用H200只能说勉强够用
552B中包含196B的Engram表,這東西可以放RAM,甚至可以放SSD(參考Qwen3.8Flash-Next),你只需準備356* 1.0625GB+890 *ctx/1,000,000,000 GB(FP4 KV cache+indexer cache)的VRAM和196 *1.0625GB的RAM就可以跑了。
這模型就算權重全放VRAM也才510GB(這裡的8bit版),8卡H200包含1128GB VRAM,理論上可以開500併發
552B is only the backbone, engram is an additional 196B of weights which is not included in the backbone. The total parameter count for this model is more like 748B, with 196B that can be offloaded to SSD. The model weights in this repo is FP4 and FP8 mixed, so you can't meaningfully quantize it without hurting the quality either.
