Views
No views yet
dllm-hub/Qwen3-0.6B-diffusion-bd3lm-v0.1
— BD3LM, a block-diffusion language model — packaged to run client-side in a web browser
on WebGPU via onnxruntime-web, driven by the
kohra denoising loop (kohra.js).kohra.js loader as the MDLM repo — block diffusion is one extra generate flag,
blockCausal: true (the graph takes a 2nd input, a block-causal attention mask, built for you):1import { pipeline } from './kohra.js';
2
3const generate = await pipeline('text-diffusion', {
4 model: 'https://huggingface.co/naklitechie/Qwen3-0.6B-diffusion-bd3lm-ONNX/resolve/main/onnx/model_fp16_fused.onnx',
5 tokenizer: 'naklitechie/Qwen3-0.6B-diffusion-bd3lm-ONNX',
6});
7
8const { text } = await generate('Lily runs 12 km/h for 4 hours. How far in 8 hours?', { blockCausal: true });
9console.log(text); // -> "...48 * 2 = 96 km. Thus, Lily runs \boxed{96} km in 8 hours."onnx/model_fp16_fused.onnx (+ .onnx.data) — 2-input graph: input_ids and a
[1,1,T,T] additive block-causal attention_mask (0 = attend, -1e9 = block, on the
pos // 32 grid). RMSNorm is fused to SimplifiedLayerNormalization (the WebGPU fp16 fix);
attention stays decomposed so the 4D mask is honored.onnx/model_q4f16_rtn_sym.onnx (+ .onnx.data) — 4-bit (RTN, symmetric) q4f16, ~680 MB.
Coherent on WebGPU; fp16 stays the default at 0.6B (q4's dequant overhead and a small quality
dip aren't worth it until the model is too big for fp16).arange positions (the graph has no position_ids
input), so the prompt sits at [0,P) with no padding and the first generated tokens complete
the prompt's last partial block — exactly the configuration the ONNX-vs-torch parity verified.dllm-hub/Qwen3-0.6B-diffusion-bd3lm-v0.1 (built on Qwen/Qwen3-0.6B, Apache-2.0;
block-diffusion adaptation by dLLM). See the source repos.