SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.02236 · 2026

CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models

Hao Chen, Zicheng Liu, Emad Barsoum, Ze Wang, Xiaodong Yu, Jialian Wu, Ximeng Sun, Jiang Liu, Niraj Jha, Yihao Liang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2601.02236.json · badge: /api/ran/2601.02236.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
yihao-liang/CDLM canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
causal_attention_bias Ran
ran, honoured the contract we drafted
yihao-liang/CDLM/src/model/modeling_llada.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from hed-ucas/Layer-wise-Learning-Rate, is pointer only (licence: NONE) · get_code("f9abf6d74699cc1c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from hed-ucas/Layer-wise-Learning-Rate, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_lambda_cosine_schedule Ran
ran, honoured the contract we drafted
yihao-liang/CDLM/src/training/consistency_loss.py
code served (permissive licence) · get_code("7dcc8a857fda2e79")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

ARGS = {
    "global_step": 50,
    "max_steps": 500,
    "warmup_ratio": 0.1,
    "initial_lambda": 0.9,
    "final_lambda": 0.5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate Ran
ran on a synthesized input
yihao-liang/CDLM/evaluation/dllm_eval/models/LLaDA.py
code served (permissive licence) · get_code("8cb6e91522671000")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 11) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal mock model that returns logits
class MockModel(nn.Module):
    def __init__(self, vocab_size=126337, hidden_size=8):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.linear = nn.Linear(hidden_size, vocab_size)
    
    def forward(self, x):
        # x shape: (batch, seq_len)
        # Return object with .logits attribute
        embedded = self.embedding(x)
        logits = self.linear(embedded)
        
        class LogitsOutput:
            def __init__(self, logits_tensor):
                self.logits = logits_tensor
        
        return LogitsOutput(logits)

# Build a minimal mock tokenizer
class MockTokenizer:
    pass

# Create model instance
model = MockModel(vocab_size=126337, hidden_size=8)
model.eval()

# Create prompt: batch_size=2, prompt_length=3
prompt = torch.randint(0, 126336, (2, 3), dtype=torch.long)

# Create tokenizer instance
tokenizer = MockTokenizer()

ARGS = {
    'model': model,
    'prompt': prompt,
    'tokenizer': tokenizer,
    'steps': 4,
    'gen_length': 8,
    'block_length': 4,
    'temperature': 0.0,
    'cfg_scale': 0.0,
    'remasking': 'low_confidence',
    'mask_id': 126336,
    'eos_id': 126081
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 11) — shape (2, 11) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_sample_size Ran
ran, honoured the contract we drafted
yihao-liang/CDLM/evaluation/dllm_eval/evaluator_utils.py
code served (permissive licence) · get_code("00f5e7d9ee6636ba")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
from typing import List, Optional, Tuple, Union

class MockTask:
    def __init__(self):
        self.eval_docs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

task = MockTask()

ARGS = {
    "task": task,
    "limit": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hash_args Ran
ran; our contract draft was wrong, not the code
yihao-liang/CDLM/evaluation/dllm_eval/api/model.py
code served (permissive licence) · get_code("20a7cc804eb22661")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib
import json

# Construct valid arguments for hash_args function
# The function takes attr (attribute name) and args (tuple/list of arguments)
# and creates a JSON string to hash

attr = "test_attribute"
args = ("value1", 42, [1, 2, 3], {"key": "value"})

ARGS = {
    "attr": attr,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_eval_args Ran
ran; our contract draft was wrong, not the code
yihao-liang/CDLM/evaluation/dllm_eval/__main__.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from BatsResearch/crosslingual-test-time-scaling, is pointer only (licence: NONE) · get_code("400ea4f64ccce5ef")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from BatsResearch/crosslingual-test-time-scaling, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

request_caching_arg_to_dict Ran
ran; our contract draft was wrong, not the code
yihao-liang/CDLM/evaluation/dllm_eval/evaluator.py
code served (permissive licence) · get_code("c44830a7722ff5f7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'cache_requests': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
add_gumbel_noise Not yet run
unverified (harvested, no recorded run)
yihao-liang/CDLM/evaluation/dllm_eval/models/LLaDA.py
code served (permissive licence) · get_code("3d179b42fcc82ef2")
How it ran

no invocation recorded.

get_num_transfer_tokens Not yet run
unverified (harvested, no recorded run)
yihao-liang/CDLM/evaluation/dllm_eval/models/LLaDA.py
code served (permissive licence) · get_code("e0d3b8594adea583")
How it ran

no invocation recorded.

try_parse_json Not yet run
unverified (harvested, no recorded run)
yihao-liang/CDLM/evaluation/dllm_eval/__main__.py
code served (permissive licence) · get_code("06b670bf334b8d88")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 8 the same month, 7 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
hash_args 44 other papers
37 dated earlier, 2 the same month, 4 later, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 41 more not named here
request_caching_arg_to_dict 17 other papers
11 dated earlier, 2 the same month, 4 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2411.07176 (2024-11)
More Expressive Attention with Negative Weights
and 14 more not named here
causal_attention_bias 16 other papers
7 dated earlier, 2 the same month, 7 later
2406.10670 (2024-06)
CoLoR-Filter: Conditional Loss Reduction Filtering for Targeted Language Model Pre-training
2409.17146 (2024-09)
Molmo and PixMo: Open Weights and Open Data for State-of-the-Art Vision-Language Models
2410.01380 (2024-10)
Knowledge Entropy Decay during Language Model Pretraining Hinders New Knowledge Acquisition
and 13 more not named here
parse_eval_args 15 other papers
12 dated earlier, 1 the same month, 1 later, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2024.findings-emnlp.86 (2024 (year only))
Tokenization Falling Short: On Subword Robustness in Large Language Models
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
and 12 more not named here
get_sample_size 12 other papers
6 dated earlier, 2 the same month, 4 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2412.14171 (2024-12)
Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
and 9 more not named here
get_num_transfer_tokens 4 other papers
1 the same month, 3 later
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
2602.06462 (2026-02)
Diffusion-State Policy Optimization for Masked Diffusion Language Models
2605.02263 (2026-05)
Break the Block: Dynamic-size Reasoning Blocks for Diffusion Large Language Models via Monotonic Entropy Descent with Reinforcement Learning
and 1 more not named here
try_parse_json 4 other papers
2 dated earlier, 1 the same month, 1 undated
2025.findings-acl.744 (2025 (year only))
Ranked Voting based Self-Consistency of Large Language Models
2502.05171 (2025-02)
Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
and 1 more not named here
add_gumbel_noise 3 other papers
1 the same month, 2 later
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
2602.06462 (2026-02)
Diffusion-State Policy Optimization for Masked Diffusion Language Models
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Autoregressive large language models achieve strong results on many benchmarks, but decoding remains fundamentally latency-limited by sequential dependence on previously generated tokens. Diffusion language models (DLMs) promise parallel generation but suffer from a fundamental static-to-dynamic misalignment: Training optimizes local transitions under fixed schedules, whereas efficient inference requires adaptive "long-jump" refinements through unseen states. Our goal is to enable highly parallel decoding for DLMs with low number of function evaluations while preserving generation quality. To achieve this, we propose CD 4 LM, a framework that decouples training from inference via Discrete-Space Consistency Distillation (DSCD) and Confidence-Adaptive Decoding (CAD). Unlike standard objectives, DSCD trains a student to be trajectory-invariant, mapping diverse noisy states directly to the clean distribution. This intrinsic robustness enables CAD to dynamically allocate compute resources based on token confidence, aggressively skipping steps without the quality collapse typical of heuristic acceleration. On GSM8K, CD 4 LM matches the LLaDA baseline with a 5.18× wall-clock speedup; across code and math benchmarks, it pushes the accuracy-efficiency Pareto frontier, achieving a 3.62× mean speedup while improving average accuracy. Code is available at https://github.com/yihao-liang/CDLM.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2601.02236")
get_code_for_paper("2601.02236")
have("2601.02236")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2601.02236.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2601.02236.svg)](https://syntology.ai/paper/2601.02236)

Connect an agent — have() is free.