2DSD DSpark drafter
generation accelerator for looped models
2 min read
This auxiliary module (drafter) is designed to accelerate text generation for the language model thinkingmachines/TML-d24-varloop-research using the 2DSD method (two-dimensional speculative decoding for looped models). The model is built on 5 Transformer layers with a hidden size of 2304 and supports varying loop depths (R = 3). It significantly boosts tokenization and generation speeds without losing the target model's distribution accuracy. This solution is ideal for researchers and engineers working on LLM inference optimization on powerful GPUs.
Key features
- Depth-conditioned DSpark architecture: a single drafter serves any loop depth r = 1, 2, 3.
- Uses frozen embeddings and the LM head of the target model, training only the masks.
- Trained on rollouts from 13K prompts for 10 epochs with a block size of k = 8.
- Delivers an average inference speedup of up to 3.37x compared to the autoregressive approach.
What you can do
- Run accelerated text generation and problem-solving using scripts from the 2DSD repository.
- Benchmark model performance on coding and math tasks (GSM8K, MATH-500, HumanEval+).
- Integrate the drafter into custom inference pipelines for looped models.
Example
Running generation using the script from the project repository:
python scripts/generate.py --model inkling-2-mini-varloop \
--drafter minseo25/2dsd-inkling-2-mini-varloop-dspark-drafter \
--prompt "What is the sum of the first 100 positive integers?"Read more
DetailsBenchmarks (average speedup): 3.37x (vs. 2.77x for standard MTP)
Hardware: Tested on H100 NVL (concurrency 1, greedy decoding)
License: Apache License 2.0
Limitations: Does not contain target model weights; requires the base model and 2DSD repository










Comments