Datasets:
Deploy fully comprehensive Dataset Card with tensor schemas and extraction details
Browse files
README.md
CHANGED
|
@@ -7,6 +7,8 @@ tags:
|
|
| 7 |
- qwen2.5
|
| 8 |
- block-diffusion
|
| 9 |
- non-autoregressive
|
|
|
|
|
|
|
| 10 |
size_categories:
|
| 11 |
- 10K<n<100K
|
| 12 |
task_categories:
|
|
@@ -19,60 +21,91 @@ language:
|
|
| 19 |
|
| 20 |
[](https://opensource.org/licenses/Apache-2.0)
|
| 21 |
[](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
|
| 22 |
-
[](https://huggingface.co/spaces/
|
| 24 |
|
| 25 |
-
This repository
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
```
|
| 34 |
-
Discrete Prompt Tokens (L_p) βββΊ Qwen2.5
|
| 35 |
-
Discrete Target Tokens (100) βββΊ Qwen2.5
|
| 36 |
```
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
---
|
| 41 |
|
| 42 |
-
##
|
| 43 |
|
| 44 |
-
| File Name | File Size | Description |
|
| 45 |
-
| :--- | :--- | :--- | :--- |
|
| 46 |
-
| `reasoning_tokenized_qwen.pt` | **
|
| 47 |
-
| `precomputed_reasoning_latents_qwen.pt` | **
|
| 48 |
-
| `precomputed_real_qwen.pt` | **1,045.9 MB** | Intermediate-scale latent training dataset containing
|
| 49 |
-
| `precomputed_real_qwen_full.pt` | **2,360.3 MB** | Complete production training
|
| 50 |
|
| 51 |
---
|
| 52 |
|
| 53 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
### 1. Direct Python Loading via `torch.load`
|
| 56 |
```python
|
| 57 |
import torch
|
| 58 |
|
| 59 |
-
#
|
| 60 |
-
|
| 61 |
-
print("
|
|
|
|
| 62 |
|
| 63 |
-
#
|
| 64 |
-
|
| 65 |
-
print("Prompt latents shape:",
|
| 66 |
-
print("Target latents shape:",
|
|
|
|
| 67 |
```
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
```bash
|
| 71 |
-
# Clone official
|
| 72 |
git clone https://github.com/Hooshaai/BlockDiffuse.git
|
| 73 |
cd BlockDiffuse
|
| 74 |
|
| 75 |
-
# Train with the
|
| 76 |
python train.py \
|
| 77 |
--config_train configs/gpu_full_capacity_improved.yaml \
|
| 78 |
--config_dit configs/gpu_full_capacity_improved.yaml \
|
|
@@ -83,14 +116,8 @@ python train.py \
|
|
| 83 |
|
| 84 |
---
|
| 85 |
|
| 86 |
-
##
|
| 87 |
-
- **Dimensionality**: $d_{\text{model}} = 896$ per token position.
|
| 88 |
-
- **Layer Origin**: Extracted after RMSNorm from Transformer Block 12 of `Qwen2.5-0.5B-Instruct`.
|
| 89 |
-
- **Target Block Length**: Exactly 100 contiguous tokens. Shorter sequences are padded to 100 with EOS token latents; longer reasoning traces are chunked with rolling context propagation.
|
| 90 |
-
|
| 91 |
-
---
|
| 92 |
|
| 93 |
-
## π Citation
|
| 94 |
```bibtex
|
| 95 |
@article{blockdiffuse2026,
|
| 96 |
title={BlockDiffuse: Fully Parallel Latent Space Reasoning Generation with Diffusion Transformers},
|
|
|
|
| 7 |
- qwen2.5
|
| 8 |
- block-diffusion
|
| 9 |
- non-autoregressive
|
| 10 |
+
- gsm8k
|
| 11 |
+
- chain-of-thought
|
| 12 |
size_categories:
|
| 13 |
- 10K<n<100K
|
| 14 |
task_categories:
|
|
|
|
| 21 |
|
| 22 |
[](https://opensource.org/licenses/Apache-2.0)
|
| 23 |
[](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
|
| 24 |
+
[](https://huggingface.co/Hooshaai/BlockDiffuse)
|
| 25 |
+
[](https://huggingface.co/spaces/Hooshaai/BlockDiffuse-Blog)
|
| 26 |
|
| 27 |
+
This repository hosts the complete suite of pre-tokenized reasoning datasets and continuous latent trajectory representations extracted from **`Qwen/Qwen2.5-0.5B-Instruct`** for training **BlockDiffuse** Diffusion Transformers via **Rectified Flow Matching**.
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
+
## π Table of Contents
|
| 32 |
+
1. [Dataset Pipeline & Extraction Architecture](#1-dataset-pipeline--extraction-architecture)
|
| 33 |
+
2. [Dataset Files Manifest & Specifications](#2-dataset-files-manifest--specifications)
|
| 34 |
+
3. [Data Formats & Internal Tensor Keys](#3-data-formats--internal-tensor-keys)
|
| 35 |
+
4. [How to Load and Inspect with PyTorch](#4-how-to-load-and-inspect-with-pytorch)
|
| 36 |
+
5. [End-to-End Training Instructions](#5-end-to-end-training-instructions)
|
| 37 |
+
6. [Citation](#6-citation)
|
| 38 |
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## 1. Dataset Pipeline & Extraction Architecture
|
| 42 |
+
|
| 43 |
+
Modern LLMs operate over discrete token vocabularies ($V = 151{,}936$). To train a Diffusion Transformer to denoise entire sequences simultaneously, BlockDiffuse maps prompts and target answers into continuous representation vectors:
|
| 44 |
|
| 45 |
```
|
| 46 |
+
Discrete Prompt Tokens (L_p) βββΊ Qwen2.5 (Layers 1..12) βββΊ Prompt Latents c [L_p x 896]
|
| 47 |
+
Discrete Target Tokens (100) βββΊ Qwen2.5 (Layers 1..12) βββΊ Target Latents z_1 [100 x 896]
|
| 48 |
```
|
| 49 |
|
| 50 |
+
By precomputing and persisting these continuous tensors to disk, BlockDiffuse eliminates redundant forward passes through the LLM during training, boosting training throughput by **> 12x** on single-GPU hardware.
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
+
## 2. Dataset Files Manifest & Specifications
|
| 55 |
|
| 56 |
+
| File Name | File Size | Description | Target Tasks | Samples Count |
|
| 57 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 58 |
+
| `reasoning_tokenized_qwen.pt` | **13.1 MB** | Pre-tokenized GSM8K & Math reasoning traces formatted using the Qwen2.5 ChatML format (`<\|im_start\|>system...user...assistant<\|im_end\|>`). | Token-level evaluation & tokenized baseline training | ~10,000 samples |
|
| 59 |
+
| `precomputed_reasoning_latents_qwen.pt` | **72.4 MB** | Validation subset of continuous target latents ($z_1 \in \mathbb{R}^{B \times 100 \times 896}$) and prompt conditionings ($c \in \mathbb{R}^{B \times L_p \times 896}$). | Rapid model validation & loss metric evaluation | 1,000 trajectories |
|
| 60 |
+
| `precomputed_real_qwen.pt` | **1,045.9 MB** | Intermediate-scale latent training dataset containing multi-turn mathematical reasoning trajectories. | Medium-scale training (1,000β5,000 steps) | 1,000 long traces |
|
| 61 |
+
| `precomputed_real_qwen_full.pt` | **2,360.3 MB** | Complete production-scale training set covering multi-step mathematical and algorithmic reasoning problems. | Full-scale training (20,000 steps) | Full GSM8K + Math traces |
|
| 62 |
|
| 63 |
---
|
| 64 |
|
| 65 |
+
## 3. Data Formats & Internal Tensor Keys
|
| 66 |
+
|
| 67 |
+
Each `.pt` file is a serialized Python dictionary with the following tensor schema:
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
{
|
| 71 |
+
"prompt_latents": torch.Tensor, # Shape: [N, max_prompt_len, 896] (float32 / bfloat16)
|
| 72 |
+
"target_latents": torch.Tensor, # Shape: [N, 100, 896] (Target latents z_1 at Layer 12)
|
| 73 |
+
"target_tokens": torch.Tensor, # Shape: [N, 100] (Ground truth discrete token IDs for CE loss)
|
| 74 |
+
"prompt_lens": torch.Tensor, # Shape: [N] (Exact token length of each prompt prefix)
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## 4. How to Load and Inspect with PyTorch
|
| 81 |
|
|
|
|
| 82 |
```python
|
| 83 |
import torch
|
| 84 |
|
| 85 |
+
# 1. Inspect Tokenized Sequences
|
| 86 |
+
tokenized = torch.load("reasoning_tokenized_qwen.pt", map_location="cpu")
|
| 87 |
+
print("Total tokenized entries:", len(tokenized["input_ids"]))
|
| 88 |
+
print("Sample input_ids shape:", tokenized["input_ids"][0].shape)
|
| 89 |
|
| 90 |
+
# 2. Inspect Continuous Latents
|
| 91 |
+
latents = torch.load("precomputed_reasoning_latents_qwen.pt", map_location="cpu")
|
| 92 |
+
print("Prompt latents shape:", latents["prompt_latents"].shape) # [N, L_p, 896]
|
| 93 |
+
print("Target latents shape:", latents["target_latents"].shape) # [N, 100, 896]
|
| 94 |
+
print("Target tokens shape:", latents["target_tokens"].shape) # [N, 100]
|
| 95 |
```
|
| 96 |
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## 5. End-to-End Training Instructions
|
| 100 |
+
|
| 101 |
+
To train a BlockDiffuse DiT model from scratch using these precomputed latents:
|
| 102 |
+
|
| 103 |
```bash
|
| 104 |
+
# 1. Clone official repository
|
| 105 |
git clone https://github.com/Hooshaai/BlockDiffuse.git
|
| 106 |
cd BlockDiffuse
|
| 107 |
|
| 108 |
+
# 2. Train with the full precomputed dataset
|
| 109 |
python train.py \
|
| 110 |
--config_train configs/gpu_full_capacity_improved.yaml \
|
| 111 |
--config_dit configs/gpu_full_capacity_improved.yaml \
|
|
|
|
| 116 |
|
| 117 |
---
|
| 118 |
|
| 119 |
+
## 6. Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
|
|
|
| 121 |
```bibtex
|
| 122 |
@article{blockdiffuse2026,
|
| 123 |
title={BlockDiffuse: Fully Parallel Latent Space Reasoning Generation with Diffusion Transformers},
|