Instructions to use urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound") model = AutoModel.from_pretrained("urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound
- SGLang
How to use urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound 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 "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound" \ --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": "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound", "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 "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound" \ --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": "urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound with Docker Model Runner:
docker model run hf.co/urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound
Inkling-2-Mini-DFlash2, W4A16 g64 (AutoRound, tuned)
A 4-bit weight quantisation of the DFlash 2 draft model
incoai/Inkling-2-Mini-DFlash2 (revision 4f9088ea).
It drafts for thinkingmachines/Inkling-2-Mini and
was calibrated against that target's own hidden states (revision b85c3cfa).
It is not a standalone language model. Like the original, it runs inside a speculative decoding server, which supplies the target's embedding and head and the hidden states it drafts from. Speculative decoding stays lossless with any drafter: the target verifies every token, so a quantised drafter can only change how many tokens are accepted per step, never the output.
| bf16 original | this model | |
|---|---|---|
| file size | 0.99 GB | 0.42 GB |
| linear weights | bf16 | int4, group 64, symmetric |
What is quantised
- int4 (packed GPTQ):
fc, every layer'sq/k/v/o_projandgate/up/down_proj, theattention_conv/mlp_convkernel_projection, andcandidate_selector.hidden_projection. - Kept bitwise at source precision: all norms (
hidden_norm,norm,input/post_attention_layernorm,q_norm,k_norm), theattention_conv/mlp_convbase_kernel, and thecandidate_selectorcodebooks.
Packing is auto_round:auto_gptq: w = (q - 8) * scale, fp16 scales, qzeros 0x77777777, no act-order.
Recipe
AutoRound 0.17.0, scheme W4A16, group size 64, symmetric, 200 tuning
iterations, 128 samples, batch 8, seed 42. The full call and settings are in dflash_recipe.json.
Calibration runs the drafter's own non-causal block forward (block size 8, 32 blocks per sample, 2304 context rows). It is fed with the target's hidden states at the drafter's four taps: the looped walk's visits 5, 23, 41 and 48. The calibration text is 63 requests from recorded agentic-coding sessions (opencode), rendered with Inkling's own chat template, each followed by 256 tokens of the target's own greedy continuation. That is the text the drafter predicts when serving. A separate session recording and our acceptance test sets were held out.
The export was checked against the source: every listed linear is packed, and every tensor kept at source precision is bitwise identical to the original.
Made for Intel Arc
This drafter was made for intel-arc-inference-server, our inference engine for Intel Arc Pro B70 (Battlemage, Xe2) cards. The engine runs its own Level Zero / OpenCL kernels: int4 small-batch GEMMs for the drafter's linears, and a cheap 2-bit candidate pre-selection before the exact re-rank. The draft pass is memory-bound on the card, and the int4 drafter moves less than half of the int8 drafter's bytes per pass.
Support for this packed checkpoint is being added to the engine. Until it lands, the engine serves the bf16 original, quantised to int8 at load. Once it lands, the command is:
hf download thinkingmachines/Inkling-2-Mini
hf download urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound
./build/src/cli/b70-serve thinkingmachines/Inkling-2-Mini \
--draft-model urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound
Status
The quantisation and export are checked. Acceptance rates when serving with this drafter have not been measured yet. Loading it in SGLang or vLLM's DFlash support is untested.
- Downloads last month
- 53
Model tree for urakozz/Inkling-2-Mini-DFlash2-W4A16-g64-AutoRound
Base model
thinkingmachines/Inkling-2-Mini