🎉 Research Release: Checkpoint weights, datasets, and code are now public on Hugging Face & GitHub!
B
BlockDiffuse
Hooshaai Research Technical Blog & Benchmark Report

Parallel Multi-Block Reasoning in
Continuous Latent Space

By decoupling prompt comprehension from trajectory synthesis, BlockDiffuse replaces slow token-by-token autoregressive decoding with a Diffusion Transformer (DiT) and Rectified Flow Matching, synthesizing 100 tokens concurrently in just 8 numerical steps.

100
Tokens / Block
8
ODE Steps (DPM-Solver)
1,730ms
100-Token Latency
156.3
Tokens/sec (2 Blocks)

Executive Summary (TL;DR)

Autoregressive (AR) language models generate text strictly one token at a time, creating an inherent serialization bottleneck for long reasoning trajectories. BlockDiffuse reframes multi-token generation as a continuous trajectory matching problem. Conditioned on prompt embeddings extracted from Layer 12 of a frozen Qwen2.5-0.5B-Instruct model, an 8-layer Diffusion Transformer predicts continuous velocity vector fields over an entire \(100 \times 896\) latent tensor. At inference time, high-order DPM-Solvers integrate the ODE in only 8 steps, achieving 57.78 tokens/sec for single blocks and 156.35 tokens/sec across multi-block context extensions with under 3.8 GB VRAM on consumer hardware.

01 // Context & Problem

The Memory-Bandwidth & Serialization Wall

Consider an autoregressive language model generating a 100-token Chain-of-Thought (CoT) reasoning sequence:

\[ P(y_1, y_2, \dots, y_{100} \mid x) = \prod_{i=1}^{100} P(y_i \mid y_{

Each single token \(y_i\) requires a complete forward pass through all model weights. At inference batch size 1, the arithmetic intensity is extremely poor:

Autoregressive (AR) Bottleneck

• 100 sequential passes: High-bandwidth memory (HBM) latency dominates.
• Tensor cores starved: Low FLOPS/byte ratio (\(\ll 10\)).
• Error accumulation: Early token mistakes irreversibly compromise downstream steps.

BlockDiffuse Solution

• 8 parallel ODE steps: Generates 100 tokens at once.
• High arithmetic intensity: Saturates tensor cores with dense GEMMs.
• Global coherence: The DiT refines all 100 tokens holistically across diffusion steps.

02 // System Architecture

The BlockDiffuse Neural Pipeline

BlockDiffuse couples three specialized components into an end-to-end continuous generation pipeline:

Backbone Encoder
Frozen Qwen2.5
Layers 1 → 12
\(c \in \mathbb{R}^{L_p \times 896}\)
Denoising Core
Block-Causal DiT
8 Blocks, 14 Heads
AdaLN-Zero + RoPE
Adapter Head
Deep Proj Head
3-Layer SwiGLU
Residual Bridge
Discrete Projection
Frozen LM Head
RMSNorm + Vocab
100 Tokens Output
Transfer Learning Initialization: DiT transformer blocks are initialized using parameters copied directly from Layers 6–11 of Qwen2.5-0.5B, preserving pre-trained self-attention representations.
Deep Projection Head: A 3-layer MLP with SwiGLU non-linearities bridges continuous latent space variations to the exact distribution expected by the pre-LM head RMSNorm.
03 // Mathematical Formulation

Rectified Flow Matching & Objective Losses

Unlike standard diffusion models (e.g., DDPM/DDIM) which formulate curved stochastic trajectories, Rectified Flow Matching establishes straight-line probability paths between Gaussian noise \(z_0 \sim \mathcal{N}(0, I)\) and target token latents \(z_1\):

\[ z_t = (1 - t) z_0 + t z_1, \quad t \in [0, 1] \] \[ v_t = \frac{d z_t}{d t} = z_1 - z_0 \]

The DiT model \(v_\theta(z_t, t, c)\) predicts the constant target velocity vector. To stabilize continuous-to-discrete decoding and prevent token collapse, BlockDiffuse optimizes five synergistic loss terms:

\[ \mathcal{L}_{\text{total}} = \lambda_{\text{FM}} \mathcal{L}_{\text{FM}} + \lambda_{\text{disp}} \mathcal{L}_{\text{disp}} + \lambda_{\text{KL}} \mathcal{L}_{\text{KL}} + \lambda_{\text{CE}} \mathcal{L}_{\text{CE}} + \lambda_{\text{NN}} \mathcal{L}_{\text{NN}} \]
1. Velocity MSE (\(\mathcal{L}_{\text{FM}}\))

\(\| v_\theta(z_t, t, c) - (z_1 - z_0) \|^2\). Guides the ODE along direct probability paths.

2. Dispersive Repulsion (\(\mathcal{L}_{\text{disp}}\))

Maximizes pairwise cosine distance between adjacent token latents to prevent mode collapse.

3. Teacher KL Distillation (\(\mathcal{L}_{\text{KL}}\))

Aligns predicted discrete logits with the frozen LLM teacher distribution across vocabulary.

4. Token CE & NN InfoNCE (\(\mathcal{L}_{\text{CE}}, \mathcal{L}_{\text{NN}}\))

Chunked Cross-Entropy loss with gradient checkpointing + InfoNCE metric contrastive learning.

04 // Generation Dynamics

Chain-of-Steps (CoS) Trajectory Evolution

During 8-step DPM-Solver numerical integration, how do 100 continuous latents coalesce into discrete English tokens? Below is the measured Token Flip Rate across ODE timesteps \(t=0 \to 1\):

Timestep \(t=0.0\) (Pure Noise) High Flip Rate (> 90%) Global syntax semantics settle
Timestep \(t=0.5\) (Coarse Latents) Flip Rate drops to ~35% Subwords & math operations lock in
Timestep \(t=1.0\) (Clean Decoding) Flip Rate < 2% Punctuation and formatting finalize
# Training-Free Ensemble (TFE) with k=3 seeds
v_ensemble = (v_seed1 + v_seed2 + v_seed3) / 3.0
# Reduces trajectory variance by 42% without extra model training
05 // Experimental Results

Performance & Hardware Telemetry

Empirical benchmarks executed on a single consumer laptop GPU (NVIDIA GeForce RTX 4070 8GB VRAM, PyTorch 2.5 + CUDA 12.4):

Evaluation Task Output Size ODE Steps Latency Throughput Peak VRAM
Single-Block Parallel 100 tokens 8 steps (DPM) 1,730.60 ms 57.78 tok/s 3,674 MB
Multi-Block Autoregressive 200 tokens (2 blocks) 8 steps / block 1,279.20 ms 156.35 tok/s 3,789 MB
17,000 Step Training Convergence ↓ 96% Loss Reduction
Initial Loss: \(\mathcal{L}_{\text{tot}} \approx 81.87\) Step 17,000: \(\mathcal{L}_{\text{tot}} = 3.2201\) (\(\mathcal{L}_{\text{FM}} = 3.7536\))
06 // Sample Outputs

Generation Verification Case Studies

Case Study: Mathematical Step-by-Step Reasoning Prompt: GSM8K Math Problem
Input Prompt:
<|im_start|>system
You are a helpful assistant that solves problems step by step.<|im_end|>
<|im_start|>user
Janet has 3 bags of 10 apples. She gives 5 apples to her friend and eats 2. How many apples does she have left?<|im_end|>
<|im_start|>assistant
Parallel Latent Trajectory Output (200 tokens in 2 blocks):
1. Total initial apples = 3 × 10 = 30 apples.
2. Apples given away = 5, apples eaten = 2.
3. Total apples subtracted = 5 + 2 = 7.
4. Remaining apples = 30 - 7 = 23 apples.
Therefore, Janet has 23 apples left. <|im_end|>
Generated in 1,279.20 ms Throughput: 156.35 tokens/sec
07 // Code & Execution

Quickstart Inference

Reproduce BlockDiffuse results in less than 2 minutes:

bash
# 1. Clone repository
git clone https://github.com/Hooshaai/BlockDiffuse.git
cd BlockDiffuse

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run parallel 100-token inference
python inference.py \
    --model Qwen/Qwen2.5-0.5B-Instruct \
    --checkpoint ./checkpoints_improved/blockdiffuse_final.pt \
    --prompt "<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\nA bookstore has 140 books. They sell 45 and get 80. How many remain?<|im_end|>\n<|im_start|>assistant\n" \
    --steps 8 \
    --solver dpm_solver \
    --use_tfe \
    --tfe_seeds 3

BibTeX Citation

@article{blockdiffuse2026,
  title={BlockDiffuse: Fully Parallel Latent Space Reasoning Generation with Diffusion Transformers},
  author={Hooshaai Research},
  journal={GitHub / HuggingFace Technical Report},
  year={2026},
  url={https://github.com/Hooshaai/BlockDiffuse}
}