Consistency diffusion language models: Up to 14x faster inference without sacrificing quality
Consistency diffusion language models (CDLM) speed up diffusion LLM inference by post-training a block-wise causal student that can finalize multiple tokens per step and use exact block-wise KV caching. Training distills from teacher decoding trajectories using three losses: distillation on newly unmasked tokens, a consistency loss on still-masked tokens, and an auxiliary masked-denoising loss. On Dream-7B-Instruct, refinement steps drop by about 4.1x–7.7x with minor accuracy changes, and latency improves by up to 11.2x on GSM8K-CoT and 14.5x on MBPP. Naively truncating steps without this training sharply degrades accuracy. A roofline analysis shows block-wise DLMs sit between memory-bound AR decoding and compute-bound full-attention DLMs, which makes them efficient at small batch sizes.
Related posts
- SDXL in 4 steps with Latent Consistency LoRAs
Hugging Face mediumAdeptLCM LoRAs apply latent consistency distillation as small LoRA adapters instead of distilling each full model, so any fine-tuned SDXL or Stable Diffusion 1.5 model can generate images in 4–8 steps instead of 25–50. Using diffusers, you load the LCM LoRA, swap in the LCMScheduler and run with guidance_scale around 1. Values between 1 and 2 enable negative prompts, and larger values don't work. Benchmarks at batch size 1 show SDXL dropping from 7s to 1.4s on a 3090, 64s to 6.5s on an M1 Max and 3.4s to 0.7s on a 4090. The LoRAs can also be stacked with regular style LoRAs, and training scripts are released alongside them.
- Assisted Generation: a new direction toward low-latency text generation
Hugging Face mediumAdeptAssisted generation cuts autoregressive LLM latency by letting a much smaller assistant model with the same tokenizer greedily draft candidate tokens, then verifying them all in a single forward pass of the large model. The large model keeps matching tokens plus the first divergent one. The draft length adapts: it grows by 2 when every candidate matches and shrinks by 1 otherwise. The approach exploits the fact that forward passes are memory-bandwidth bound. In 🤗 Transformers it is exposed through an `assistant_model` argument to `generate` (batch size 1 only) and yields up to 2x speedups, 3x with INT8, and up to 10x when the model relies on memory offloading. It works best on input-grounded tasks like ASR and summarization, and with sampling only at low temperatures.
- Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny
Hugging Face mediumAdeptSegmind releases training code and weights for SD-Small and SD-Tiny, Stable Diffusion variants compressed by block-removal knowledge distillation that cut UNet parameters by 35% and 55% while keeping image fidelity close to the base model. The student is trained with three losses: the standard latent diffusion loss, an output-matching loss against the teacher (Realistic-Vision 4.0), and a per-block feature-level loss. Training used 1M LAION Art Aesthetic images scoring above 7.5. The distilled models run up to 2x faster at inference but are early-stage and weak at composition, so they work best fine-tuned or LoRA-trained on specific styles. A portrait fine-tune of SD-Tiny is included with its hyperparameters.
- Prefill and Decode for Concurrent Requests - Optimizing LLM Performance
Hugging Face mediumAdeptLLM token generation splits into a compute-bound prefill phase, which processes all prompt tokens in parallel to produce the first token, and a memory-bandwidth-bound decode phase, which produces later tokens one at a time. These map to time to first token and time per output token. Static batching leaves the GPU underutilized and delays new requests. Prefill-first continuous batching (vLLM, TGI) minimizes time to first token but pauses running decodes. Chunked prefill interleaves prefill chunks with decode steps, trading a small time-to-first-token increase for smoother decoding. At TNG it raised total throughput by about 50%, and the default chunk size is recommended when load patterns are unpredictable.
- Continuous batching from first principles
Hugging Face mediumAdeptContinuous batching falls out naturally once you optimize LLM serving for throughput, and the post derives it step by step from attention, causal masking, KV caching and chunked prefill. The KV cache cuts the cost of generating each new token from O(n²) to O(n) at O(n) memory, about 16 KB per token per layer for Llama-2-7B in float16. Chunked prefill splits long prompts across forward passes. Padded batched generation wastes compute when prompts finish at different times, and dynamic batching needs heavy padding because newly inserted prompts must prefill while others decode, which motivates continuous batching's mixing of prefill and decode tokens in one forward pass.