Run this model with HF Jobs
Run tiny-random/deepseek-v4.1-flash-1017 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/tiny-random/deepseek-v4.1-flash-1017. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/tiny-random/deepseek-v4.1-flash-1017 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/tiny-random/deepseek-v4.1-flash-1017. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use tiny-random/deepseek-v4.1-flash-1017 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/deepseek-v4.1-flash-1017 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/deepseek-v4.1-flash-1017")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tiny-random/deepseek-v4.1-flash-1017", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/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 "tiny-random/deepseek-v4.1-flash-1017" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/deepseek-v4.1-flash-1017", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiny-random/deepseek-v4.1-flash-1017
- SGLang
How to use tiny-random/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 "tiny-random/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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/deepseek-v4.1-flash-1017", "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 "tiny-random/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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/deepseek-v4.1-flash-1017", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiny-random/deepseek-v4.1-flash-1017 with Docker Model Runner:
docker model run hf.co/tiny-random/deepseek-v4.1-flash-1017
Upload folder using huggingface_hub
Browse filesFiles changed (2)
- .meta.json+7-6
- README.md+5-4
1234567891011{"Pillow": "12.3.0","flashinfer-python": "0.6.15.post1","huggingface_hub": "1.27.0","numpy": "2.5.2","safetensors": "0.8.0","sympy": "1.14.0","tilelang": "0.1.12","torch": "2.13.0+cu126","transformers": "5.15.0.dev0"}123456789101112{"Pillow": "12.2.0","flashinfer-python": "0.7.2","huggingface_hub": "1.33.0","numpy": "2.3.5","safetensors": "0.8.0","sglang": "0.5.23.dev384+g9ab74b851","sympy": "1.14.0","tilelang": "0.1.12","torch": "2.14.1","transformers": "5.19.0"}
45 unmodified lines46474849505152537 unmodified lines6162636465666727 unmodified lines959697989910010145 unmodified linesexpert counts, vocabulary rows, and 32-wide quantization blocks divide cleanly by 2.The online example enables the embedded three-stage DSpark/MTP draft explicitly.- TP=2 with DSpark/MTP and CUDA Graph was validated on two NVIDIA H20 GPUsusing the versions listed under Test environment.| File path | Size ||------|------|7 unmodified lines```bash# Requires an SGLang preview/main build with DeepSeek-V4.1 support.# Runs the target model and its embedded three-stage DSpark/MTP draft with TP=2.model_id=yujiepan/deepseek-v4.1-flash-1017-tiny-randomsglang serve \--model-path $model_id \--trust-remote-code \27 unmodified linesfrom transformers import AutoTokenizersource_model_id = "deepseek-ai/DeepSeek-V4.1-Flash-1017"save_folder = "/tmp/yujiepan/deepseek-v41-flash-1017-tiny-random"source_revision = "1bae0e1088993b9b82de08f59de5be5a34e42170"# DeepSeek-V4.1-Flash-1017 is a multimodal (vision + text) MoE model. The released checkpoint uses the# inference-stack tensor naming (see the repo's inference/model.py), not HF-transformers naming, so45 unmodified lines4647484950515253547 unmodified lines6263646566676827 unmodified lines9697989910010110245 unmodified linesexpert counts, vocabulary rows, and 32-wide quantization blocks divide cleanly by 2.The online example enables the embedded three-stage DSpark/MTP draft explicitly.- TP=2 inference with DSpark/MTP and CUDA Graph was validated for bothtext-only and image-plus-text requests on two NVIDIA H20 GPUs, using theversions listed under Test environment.| File path | Size ||------|------|7 unmodified lines```bash# Requires an SGLang preview/main build with DeepSeek-V4.1 support.# Runs the target model and its embedded three-stage DSpark/MTP draft with TP=2.model_id=tiny-random/deepseek-v4.1-flash-1017sglang serve \--model-path $model_id \--trust-remote-code \27 unmodified linesfrom transformers import AutoTokenizersource_model_id = "deepseek-ai/DeepSeek-V4.1-Flash-1017"save_folder = "/tmp/tiny-random/deepseek-v41-flash-1017"source_revision = "1bae0e1088993b9b82de08f59de5be5a34e42170"# DeepSeek-V4.1-Flash-1017 is a multimodal (vision + text) MoE model. The released checkpoint uses the# inference-stack tensor naming (see the repo's inference/model.py), not HF-transformers naming, so
.meta.json+7-6
README.md+5-4