Block prediction, measured end to end.
Quick start · Results · Research report · 日本語
This model is derived from LiquidAI's LFM2.5-24B-A2B and remains subject to the
LFM Open License v1.0, licensed by Liquid AI, Inc. The complete,
unmodified upstream license text is included as LICENSE and
licenses/LFM-Open-License-v1.0.txt.
The license contains a commercial-use revenue threshold defined as
US$10,000,000 annual revenue or more; Section 5 sets out the commercial-use
limitation and the qualified non-profit exception. Read the original terms for
the operative conditions. Redistribution must retain the license and applicable
notices and identify modified files. See NOTICE for this release's
modifications and license-notice.txt for retained model/data attribution.
LFM Open License v1.0 is not an Apache-2.0 or MIT license. This derivative does not replace it or grant rights beyond applicable upstream model and data terms.
DLFM · BlockTune is an experimental block-diffusion derivative of
summerAIO/diffusion-lfm2.5-24b-a2b.
It incorporates the final rank-8 attention LoRA from a short adaptation study,
then packages the resulting weights as a complete, sharded BF16 checkpoint.
No separate LoRA application or base-model download is required once this repository is downloaded.
The release includes the diffusion sampler, batched best-of-N selection, repetition controls, reproducible configuration, and both positive and negative results.
Research preview—not a production-quality coding model. BF16 merging did not meet the predeclared prediction-equivalence tolerance. The fastest decoding setting produces mostly incorrect answers. No tested configuration combined the quality gate with 1,000 returned token/s. Full-checkpoint byte/structure checks are documented separately from model-loading tests; a fresh end-to-end reload of this assembled full checkpoint has not been run.
| Component | Release |
|---|---|
| Backbone | LFM2.5-24B-A2B-derived hybrid convolution / attention MoE |
| Stored precision | BF16 weights; inherited FP32 buffers preserved |
| Adaptation | Rank 8, alpha 16, q/k/v/out projections in all 10 attention layers |
| Runtime | Explicit block-diffusion sampler; causal prefix, bidirectional canvas |
| Evaluated hardware | H100 80GB for adaptation; A100 80GB for decoding |
| Tested temperature | 0.9 |
| Weight format | 13 Safetensors shards, approximately 47.94 GB |
| Recommended status | Experimental; no quality-approved throughput preset |
Use an 80GB-class CUDA GPU for the demonstrated BF16 setup. Download this repository, then run the included inference script from its folder:
hf download summerAIO/diffusion-lfm2.5-24b-a2b-blocktune \
--local-dir ./dlfm-blocktune
Inside dlfm-blocktune:
uv run --python 3.11 --locked python inference.py \
--model . \
--preset balanced \
--prompt "Write only Python code defining add(a,b) that returns their sum. No explanation."
The balanced preset uses block32 / 16 steps / top-k20 / best-of4 at temperature0.9.
It selects candidates using syntax, the function name requested in the prompt,
model likelihood and repetition—not reference answers or hidden tests.
Optional code-prefix extraction is enabled by default. This was the best
observed speed/accuracy compromise among the completed small-task comparisons,
but it did not pass the overall quality gate.
Throughput diagnostic—not a quality recommendation:
uv run --python 3.11 --locked python inference.py \
--model . --preset throughput --seed 900 \
--prompt "Explain masked diffusion text generation and autoregressive text generation in detail. Write a coherent essay of at least 1000 words comparing their operation, advantages, and limitations."
This preset uses block1024 / 1 step / top-k50. It prints the output to stdout and the actual output length, elapsed time and throughput to stderr.
from inference import load_model
from selection_runtime import cfg, generate_selected
sampler, tokenizer = load_model(".")
settings = cfg(block=32, steps=16, best_of=4, top_k=20, repair=True)
text, metrics = generate_selected(
sampler, tokenizer,
"Write only Python code defining square(x) that returns x*x. No explanation.",
settings, seed=2201,
)
print(text)
print(metrics)
The native Transformers model can load the weights, but its ordinary
model.generate() is autoregressive. Use inference.py for the block-diffusion
path measured in this report. The loader deliberately avoids the upstream
custom AutoModel mapping and does not enable the numerically unverified prefix cache.
On 32 held-out Python-code blocks, with 128 context tokens and a fully masked 64-token target, single-forward token accuracy increased from 6.15% to 8.69% after adaptation. Entire-block exact match stayed at 0/32.
These are pre-merge adapter-path results, not a claim that the assembled BF16 checkpoint reproduces that accuracy. The test set was reused across exploratory stages; near-duplicate contamination and prior training exposure were not ruled out.
All rows below use temperature0.9. Task correctness is a small suite of 6 English fact/code tasks × 3 seeds; speed is measured separately on a long-form prompt.
| Decoding setting | Returned token/s, median | Task correctness |
|---|---|---|
| block1024 / 1 step / top-k50 | 8,623.29 | 1/18 · 5.6% |
| Same block/steps + 32-token-window bigram ban, controlled sampler | 3,771.05 | 0/18 · 0% |
| block32 / 16 steps / best-of4 / top-k20 | 17.89 | 13/18 · 72.2% |
| Same quality-oriented setting, best-of16 | 13.24 | 13/18 · 72.2% |
| Same quality-oriented setting, best-of64 | 4.52 | 13/18 · 72.2% |
| Same quality-oriented setting, best-of256 | 1.33 | 13/18 · 72.2% |
Read the speed column carefully. Timings are CUDA-synchronized and count actual tokens emitted before EOS. Output lengths differ. Best-of-N timings include candidate generation, rejection sampling, ranking and post-processing. Discarded candidates are not counted as returned tokens. The controlled sampler has additional CPU work and a slightly different candidate distribution; its slowdown is not an isolated estimate of repetition-control cost.
The 8,623 token/s figure is a throughput result with poor correctness—not a claim of useful coding output at that speed. High distinct-n-gram rates can simply reflect random, incoherent text.
The measured BF16 merge had top-1 agreement of 82.81–96.88% across four probes, below the fixed 98% per-probe acceptance threshold. Maximum absolute logit deviation reached 2.5996. Saved merged weights reload byte-exactly, but that is a different check from agreement with the unmerged LoRA computation.
See merge_validation.json and the full report.
uv run --python 3.11 --locked python inference.py \
--model . --preset balanced \
--block 32 --steps 16 --best-of 4 --top-k 20 \
--window 128 --ngram 3 --penalty 1.1 \
--prompt "Write only Python code defining reverse(xs) returning the list in reverse order. No explanation."
This is a custom-control example, not the measured best preset. Stronger penalties and harder bans were not consistently better. Constraints inspect resolved, contiguous left context; with multiple diffusion steps, they do not guarantee a globally repetition-free completed canvas across previously masked gaps.
For the balanced preset, --long continues selected blocks up to
max(1024, block) tokens, respecting EOS. --max-new-tokens controls the throughput
preset. The sampler is fixed at temperature0.9 to match the experiments.
model-00001-of-00013.safetensors ... model-00013-of-00013.safetensors
model.safetensors.index.json # complete checkpoint index
config.json + tokenizer files
diffusion.safetensors # learned mask embedding
inference.py # full-checkpoint loader and CLI
diffusion_runtime.py # evaluated reference sampler
selection_runtime.py # window constraints and best-of-N
REPORT.md # consolidated research report
reports/ # detailed reports and raw measurements
release_manifest.json # source/output hashes and replaced tensor names
merge_validation.json # pre/post merge checks
adapter_reference.safetensors # provenance/reproduction only; already merged
licenses/ + license-notice.txt
Do not apply adapter_reference.safetensors again to these already-merged weights.
It is included only to preserve the adaptation provenance.
summerAIO/diffusion-lfm2.5-24b-a2b, pinned revision 9b7f240522cfdbebc65c955be567c1474c8bf399.LiquidAI/LFM2.5-24B-A2B, LFM Open License v1.0.iamtarun/python_code_instructions_18k_alpaca, pinned revision 7cae181e29701a8663a07a3ea43c8e105b663ba1.license-notice.txt and licenses/.This release does not grant unrestricted commercial rights or replace upstream model/data terms. The additional dataset card did not specify a license in the metadata inspected during preparation; review the relevant source terms.
ライセンスはLiquid AI, Inc.のLFM Open License v1.0です。 原文全文を
LICENSEに同梱し、年商基準に関する商用利用条件、再配布・変更表示条件を
原文どおり適用します。追加学習やマージによって別ライセンスへ置き換えていません。
最終LoRAを統合した、フル重み付きの研究用チェックポイントです。 README・推論コード・学習と速度探索のレポート・生の評価データを同梱しています。
詳しくは総合レポート、学習レポート、 A100探索レポートをご覧ください。
model-00001-of-00013.safetensors 3.8 GBmodel-00004-of-00013.safetensors 3.7 GBmodel-00008-of-00013.safetensors 3.7 GBmodel-00012-of-00013.safetensors 3.7 GBmodel-00005-of-00013.safetensors 3.7 GBmodel-00006-of-00013.safetensors 3.7 GBmodel-00009-of-00013.safetensors 3.7 GBmodel-00010-of-00013.safetensors 3.7 GBmodel-00002-of-00013.safetensors 3.7 GBmodel-00007-of-00013.safetensors 3.7 GBmodel-00011-of-00013.safetensors 3.7 GBmodel-00003-of-00013.safetensors 3.7 GBmodel-00013-of-00013.safetensors 3.3 GBadapter_reference.safetensors 4 MBdiffusion.safetensors 8.3 kBsummerAIO/diffusion-lfm2.5-24b-a2b