Image-Text-to-Text
Transformers
Safetensors
deepseek_v41
text-generation
conversational
Eval Results
8-bit precision
fp8
Instructions to use deepseek-ai/DeepSeek-V4.1-Flash-1017 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-1017 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-1017") 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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V4.1-Flash-1017", device_map="auto") - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deepseek-ai/DeepSeek-V4.1-Flash-1017 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-1017" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "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/deepseek-ai/DeepSeek-V4.1-Flash-1017
- SGLang
How to use deepseek-ai/DeepSeek-V4.1-Flash-1017 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-1017" \ --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": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "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 "deepseek-ai/DeepSeek-V4.1-Flash-1017" \ --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": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "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 deepseek-ai/DeepSeek-V4.1-Flash-1017 with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
Download model-00021-of-00048.safetensors from deepseek-ai/DeepSeek-V4.1-Flash-1017: direct link, hf CLI and curl.
- Browser
- Download file 7.39 GB
-
https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/resolve/refs%2Fpr%2F40/model-00021-of-00048.safetensors
- Command line
-
hf download hf://deepseek-ai/DeepSeek-V4.1-Flash-1017@refs/pr/40/model-00021-of-00048.safetensors
-
curl -L -o model-00021-of-00048.safetensors https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/resolve/refs%2Fpr%2F40/model-00021-of-00048.safetensors
7.39 GB
- Xet hash:
- f3f65fa15a490e299351a27450f8a74ffb9b1c70724e8f12ad081574feb2764a
- Size of remote file:
- 7.39 GB
- SHA256:
- 2ba49f59c8cec144e41370f9f820f268899d0b5cd0501e881908ca65bccd2dc2
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.