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 files
README.md
CHANGED
|
@@ -31,24 +31,9 @@ Note:
|
|
| 31 |
| Quantization | Routed experts FP4; most other linears FP8; UE8M0 scales; 32x32 blocks | Same |
|
| 32 |
| Public checkpoint | 96,085 tensors; ~510.3 GB | 1,629 tensors; 96.7 MB |
|
| 33 |
|
| 34 |
-
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
Engram tables, and vision depth are reduced for a practical debugging checkpoint.
|
| 38 |
-
|
| 39 |
-
- The structure is derived by instantiating the source repository's pinned inference
|
| 40 |
-
implementation on the meta device, then converting its runtime state back to the
|
| 41 |
-
public Hugging Face checkpoint representation.
|
| 42 |
-
|
| 43 |
-
- The SGLang example is intentionally a conservative TP=2 launch. The
|
| 44 |
-
attention latent stays 512-wide and the indexer stays 128-wide because those are
|
| 45 |
-
fixed by SGLang's DSV4 cache/kernel ABI; all TP-sharded widths, head/group counts,
|
| 46 |
-
expert counts, vocabulary rows, and 32-wide quantization blocks divide cleanly by 2.
|
| 47 |
-
The online example enables the embedded three-stage DSpark/MTP draft explicitly.
|
| 48 |
-
|
| 49 |
-
- TP=2 inference with DSpark/MTP and CUDA Graph was validated for both
|
| 50 |
-
text-only and image-plus-text requests on two NVIDIA H20 GPUs, using the
|
| 51 |
-
versions listed under Test environment.
|
| 52 |
|
| 53 |
| File path | Size |
|
| 54 |
|------|------|
|
|
@@ -59,6 +44,13 @@ Note:
|
|
| 59 |
|
| 60 |
- SGLang
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
```bash
|
| 63 |
# Requires an SGLang preview/main build with DeepSeek-V4.1 support.
|
| 64 |
# Runs the target model and its embedded three-stage DSpark/MTP draft with TP=2.
|
|
|
|
| 31 |
| Quantization | Routed experts FP4; most other linears FP8; UE8M0 scales; 32x32 blocks | Same |
|
| 32 |
| Public checkpoint | 96,085 tensors; ~510.3 GB | 1,629 tensors; 96.7 MB |
|
| 33 |
|
| 34 |
+
- Topology (sparse attention + indexer, Hyper-Connections, Engram, DSpark/MTP,
|
| 35 |
+
vision, FP4/FP8 quantization) is preserved with reduced widths and counts.
|
| 36 |
+
Derived from the source inference implementation on the meta device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
| File path | Size |
|
| 39 |
|------|------|
|
|
|
|
| 44 |
|
| 45 |
- SGLang
|
| 46 |
|
| 47 |
+
- TP=2 inference with DSpark/MTP and CUDA Graph was validated for both
|
| 48 |
+
text-only and image-plus-text requests on two NVIDIA H20 GPUs, using the
|
| 49 |
+
versions listed under Test environment.
|
| 50 |
+
- The attention latent stays 512-wide and the indexer 128-wide per SGLang
|
| 51 |
+
DSV4 ABI; all sharded widths, heads, experts, and vocab rows divide cleanly by TP=2.
|
| 52 |
+
- The online example enables the embedded three-stage DSpark/MTP draft explicitly.
|
| 53 |
+
|
| 54 |
```bash
|
| 55 |
# Requires an SGLang preview/main build with DeepSeek-V4.1 support.
|
| 56 |
# Runs the target model and its embedded three-stage DSpark/MTP draft with TP=2.
|