Run this model with HF Jobs

Run tarat122/inkling-selfspec-p1-draft 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 to fine-tune https://huggingface.co/tarat122/inkling-selfspec-p1-draft. 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/tarat122/inkling-selfspec-p1-draft 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.

inkling-selfspec-p1-draft

A 1-loop draft adapter that makes Inkling-2-Mini answer 1.9× faster with the same accuracy, with no second model.

This is the LoRA ("p1") used by inkling-selfspec. Inkling-2-Mini runs layers 6–17 three times per token. With this adapter merged, the same checkpoint run at one loop becomes a cheap draft model. Stock 3-loop Mini then verifies the draft, so every kept token is the 3-loop model's own greedy choice, up to bf16 numerics.

Stock Inkling-2-Mini With the router (this draft + free copies)
75 fresh reasoning, maths & code questions 126 s per answer · 84.0% 65 s per answer · 85.3% (1.93× faster; 48.2% less time [43.5, 52.4])
30 everyday-chat prompts 172 s per answer 112 s per answer (1.54× faster; 35.0% less time [24.6, 43.7])
Sealed test set (300) update pending update pending

The table shows paired, same-GPU (H200), batch-1 greedy timings from a pre-registered evaluation in an eager Hugging Face harness. The brackets are 95% bootstrap intervals. See the repo README and paper for the protocol.

What it is

  • Base: thinkingmachines/Inkling-2-Mini, revision fcd43a4241eb71e9f56f5f4d4bb125438cc613d9 (Apache-2.0).
  • Adapter: LoRA r64, alpha 128, dropout 0, on the text tower's 120 attention modules (q_proj, k_proj, v_proj, relative_position_bias, o_proj, each .linear, in all 24 layers). It has 30,867,456 parameters and holds weight-only LoRA tensors.
  • Use at: loop_num_passes = 1. The adapter is trained for the 1-loop pass only. Do not merge it into the 3-loop verifier.
  • Files: adapter_model.safetensors (sha256 prefix 2539d15f…) and adapter_config.json (sha256 prefix d49d1c1c…).

How to use it

The decoder is scripts/benchmarks/inkling2_specdec.py in the Halo fork (HALO_FORK_URL, branch specdec-v3, commit 06eb2130). The router is the arm specp1:12:3.0:look2x15:

  • Copy. If the last 4..2 tokens appeared earlier in prompt + output, propose the next ≤ 15 tokens for free.
  • Draft. Otherwise run Mini at 1 loop with this adapter and draft ≤ 12 tokens, stopping at the first token whose top-1 minus top-2 logit margin is below 3.0.
  • Verify. Pristine 3-loop Mini checks the whole block in one forward. Keep the matching prefix plus one 3-loop token.
python research/elastic_loop/router_v2/specdec_smoke.py --ids IDS.txt --data DATA.jsonl \
    --p1 PATH_TO_THIS_ADAPTER --arms specp1:12:3.0:look2x15 --n 40 --out OUT

The harness keeps the base weights in one GPU bank and switches between pristine (3 loops, the verifier) and adapter-merged (1 loop, the draft) per round. After every decode it checks that the bank equals the pristine weights.

Training summary

Pass distillation from the same model. The teacher is stock Mini at 3 loops with the adapter off; the student is Mini at 1 loop with this LoRA. The loss mixes forward KL to the teacher with the label cross-entropy (alpha 0.5, temperature 1.0) on a frozen corpus of grader-verified reasoning traces.

  1. 3 epochs (450 steps) on 1,237 traces of at most 1,024 tokens. The best held-out KL (epoch 2) was selected.
  2. A 1-epoch anneal warm-started from step 1, at learning rate 3e-5, on the 635 traces of at most 512 tokens. This is the released checkpoint.

The corpus covers maths, code reasoning, procedural tasks and general traces. It was frozen and checked for overlap with the evaluation and test sets before training (the freeze checks are recorded in the repo's run log).

Result: teacher-forced on 132,402 stock tokens from the calibration set, the adapter's greedy token matches stock 3-loop Mini's 89.3% of the time. A further pure-KL epoch moved this only to 89.38% and was not released (a pre-registered NO-GO).

Intended use

  • Lossless speed-up of Inkling-2-Mini decoding through self-speculative decoding, at batch 1 with greedy decoding.
  • Research on depth-adaptive decoding for looped models.

Limitations

  • Not a standalone model. At 1 loop with this adapter, Mini is a draft: its own answers are less accurate than stock's. Use it only under 3-loop verification.
  • Bound to this checkpoint. It works only with Inkling-2-Mini at the revision above and its loop structure.
  • Measured setting only. Speed-ups were measured at batch 1 in an eager HF harness. Gains shrink under large-batch serving.
  • Exactness. Outputs equal stock's greedy decisions up to bf16 numerics, not bit for bit.
  • Uneven on chat. 7 of 30 everyday-chat answers were slower than stock.

License and attribution

Apache-2.0, following the base model. Built for the White Circle Halo Competition. Team lead: @tarat_211 (GitHub: TarunTomar122).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for tarat122/inkling-selfspec-p1-draft

Adapter
(113)
this model

Space using tarat122/inkling-selfspec-p1-draft 1