Instructions to use tiny-random/deepseek-v4.1-flash 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 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") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tiny-random/deepseek-v4.1-flash", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/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 "tiny-random/deepseek-v4.1-flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/deepseek-v4.1-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiny-random/deepseek-v4.1-flash
- SGLang
How to use tiny-random/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 "tiny-random/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/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/deepseek-v4.1-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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" \ --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": "tiny-random/deepseek-v4.1-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiny-random/deepseek-v4.1-flash with Docker Model Runner:
docker model run hf.co/tiny-random/deepseek-v4.1-flash
Simplify model card
Browse files
README.md
CHANGED
|
@@ -48,19 +48,9 @@ Note:
|
|
| 48 |
expert counts, vocabulary rows, and 32-wide quantization blocks divide cleanly by 2.
|
| 49 |
The online example enables the embedded three-stage DSpark/MTP draft explicitly.
|
| 50 |
|
| 51 |
-
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
`sglang.Engine` runs using the same TP=2/backend settings reached engine-ready
|
| 55 |
-
with both base decoding and `speculative_algorithm="DSPARK"`; CUDA Graph remained
|
| 56 |
-
enabled, and the latter reported DSpark enabled, generated all three cases
|
| 57 |
-
(including `Hello` with exactly 10 new tokens), and shut down with exit code 0.
|
| 58 |
-
This artifact is byte-identical to the
|
| 59 |
-
separately generated 1017 tiny variant used for that runtime test (SHA-256
|
| 60 |
-
`53aae999fdcacd310c400a2fc3112bb68ce35588441784c75dca5820abf0f35b`). The README
|
| 61 |
-
keeps the equivalent online `sglang serve` form for normal deployment. The
|
| 62 |
-
official source `inference/convert.py` also produced two shards which loaded
|
| 63 |
-
strictly into the source runtime for both ranks.
|
| 64 |
|
| 65 |
| File path | Size |
|
| 66 |
|------|------|
|
|
@@ -592,4 +582,6 @@ main()
|
|
| 592 |
### Change log:
|
| 593 |
|
| 594 |
- 2026-09-10: Initial version.
|
| 595 |
-
- 2026-10-20:
|
|
|
|
|
|
|
|
|
| 48 |
expert counts, vocabulary rows, and 32-wide quantization blocks divide cleanly by 2.
|
| 49 |
The online example enables the embedded three-stage DSpark/MTP draft explicitly.
|
| 50 |
|
| 51 |
+
- TP=2 with DSpark/MTP and CUDA Graph was validated on two NVIDIA H20 GPUs using
|
| 52 |
+
Python 3.12.13, CUDA 13.0, torch 2.14.1, SGLang
|
| 53 |
+
`0.5.23.dev384+g9ab74b851`, FlashInfer 0.7.2, and Transformers 5.19.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
| File path | Size |
|
| 56 |
|------|------|
|
|
|
|
| 582 |
### Change log:
|
| 583 |
|
| 584 |
- 2026-09-10: Initial version.
|
| 585 |
+
- 2026-10-20: Added an official-runtime-derived tiny checkpoint with TP=2 and DSpark/MTP support.
|
| 586 |
+
|
| 587 |
+
This repo is generated by GPT-5.6-Sol.
|