Text Generation
Transformers
Safetensors
qwen3
dflash2
speculative-decoding
block-diffusion
draft-model
sglang
text-generation-inference
Instructions to use incoai/Inkling-2-Mini-DFlash2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use incoai/Inkling-2-Mini-DFlash2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="incoai/Inkling-2-Mini-DFlash2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("incoai/Inkling-2-Mini-DFlash2") model = AutoModel.from_pretrained("incoai/Inkling-2-Mini-DFlash2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use incoai/Inkling-2-Mini-DFlash2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "incoai/Inkling-2-Mini-DFlash2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Inkling-2-Mini-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/incoai/Inkling-2-Mini-DFlash2
- SGLang
How to use incoai/Inkling-2-Mini-DFlash2 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 "incoai/Inkling-2-Mini-DFlash2" \ --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": "incoai/Inkling-2-Mini-DFlash2", "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 "incoai/Inkling-2-Mini-DFlash2" \ --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": "incoai/Inkling-2-Mini-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use incoai/Inkling-2-Mini-DFlash2 with Docker Model Runner:
docker model run hf.co/incoai/Inkling-2-Mini-DFlash2
Add warpgrid (CUDA & Apple Metal) Quick Start
#1
by dpolist-cglab - opened
README.md
CHANGED
|
@@ -50,6 +50,26 @@ python -m sglang.launch_server \
|
|
| 50 |
--speculative-draft-attention-backend fa4
|
| 51 |
```
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
## Evaluation
|
| 54 |
|
| 55 |
- Runtime: SGLang on one NVIDIA H200, with FlashAttention 4 for target and draft attention
|
|
|
|
| 50 |
--speculative-draft-attention-backend fa4
|
| 51 |
```
|
| 52 |
|
| 53 |
+
### Local Serving with `warpgrid` (CUDA & Apple Silicon Metal)
|
| 54 |
+
|
| 55 |
+
[`warpgrid`](https://github.com/cglab-public/warpgrid) is a standalone C++20 inference engine with native NVIDIA Blackwell CUDA and Apple Silicon Metal support for `Inkling-2-Mini` + `DFlash 2` (zero Python dependencies):
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
git clone https://github.com/cglab-public/warpgrid.git
|
| 59 |
+
cd warpgrid && make -j
|
| 60 |
+
|
| 61 |
+
hf download thinkingmachines/Inkling-2-Mini --local-dir ./Inkling-2-Mini
|
| 62 |
+
hf download incoai/Inkling-2-Mini-DFlash2 --local-dir ./Inkling-2-Mini-DFlash2
|
| 63 |
+
|
| 64 |
+
./warpgrid \
|
| 65 |
+
--model ./Inkling-2-Mini \
|
| 66 |
+
--dflash2 ./Inkling-2-Mini-DFlash2 \
|
| 67 |
+
--draft-k 6 \
|
| 68 |
+
--port 8888
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Use `--draft-k 7` on NVIDIA Blackwell CUDA (`95.5 tok/s` `c=1` SSE on DGX Spark GB10) or `--draft-k 6` on Apple Silicon Metal (`82.1` med / `111.4` peak `tok/s` code SSE on M5 Max). For 16 GB Apple Silicon Macs, pair with [`cglab-org/Inkling-2-Mini-Q3-warpgrid`](https://huggingface.co/cglab-org/Inkling-2-Mini-Q3-warpgrid) (`25.45 tok/s` code on M4 Mac mini).
|
| 72 |
+
|
| 73 |
## Evaluation
|
| 74 |
|
| 75 |
- Runtime: SGLang on one NVIDIA H200, with FlashAttention 4 for target and draft attention
|