tahamajs commited on
Commit
9f24b76
Β·
verified Β·
1 Parent(s): 3a946b2

Deploy complete Dataset Card

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - flow-matching
5
+ - continuous-latents
6
+ - math-reasoning
7
+ - qwen2.5
8
+ - block-diffusion
9
+ - non-autoregressive
10
+ size_categories:
11
+ - 10K<n<100K
12
+ task_categories:
13
+ - text-generation
14
+ language:
15
+ - en
16
+ ---
17
+
18
+ # πŸ“¦ BlockDiffuse Precomputed Latents & Reasoning Datasets
19
+
20
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
21
+ [![Base Model](https://img.shields.io/badge/Base%20LLM-Qwen2.5--0.5B--Instruct-green.svg)](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
22
+ [![HuggingFace Model](https://img.shields.io/badge/HF%20Model-tahamajs%2FBlockDiffuse-yellow.svg)](https://huggingface.co/tahamajs/BlockDiffuse)
23
+ [![HuggingFace Space](https://img.shields.io/badge/HF%20Space-BlockDiffuse--Blog-blueviolet.svg)](https://huggingface.co/spaces/tahamajs/BlockDiffuse-Blog)
24
+
25
+ This repository contains the complete pre-extracted dataset files used to train **BlockDiffuse** Diffusion Transformers to generate **100-token blocks in continuous latent space** using **Rectified Flow Matching**.
26
+
27
+ ---
28
+
29
+ ## πŸ”¬ Dataset Overview & Extraction Pipeline
30
+
31
+ Standard language models operate over discrete token vocabularies ($V \approx 151{,}936$). To bypass sequential autoregressive decoding, BlockDiffuse maps prompts and target answer sequences into continuous latent vectors:
32
+
33
+ ```
34
+ Discrete Prompt Tokens (L_p) ──► Qwen2.5-0.5B (Layer 12) ──► Prompt Latents c [L_p x 896]
35
+ Discrete Target Tokens (100) ──► Qwen2.5-0.5B (Layer 12) ──► Target Latents z_1 [100 x 896]
36
+ ```
37
+
38
+ These precomputed continuous tensors allow training the Diffusion Transformer directly on latent trajectory matching without re-computing LLM forward passes on every iteration, accelerating training throughput by **> 12x**.
39
+
40
+ ---
41
+
42
+ ## πŸ“ File Manifest & Specifications
43
+
44
+ | File Name | File Size | Description | Shape / Keys |
45
+ | :--- | :--- | :--- | :--- |
46
+ | `reasoning_tokenized_qwen.pt` | **12.5 MB** | Pre-tokenized GSM8K & Math reasoning conversations formatted with the Qwen2.5 ChatML template (`<\|im_start\|>...<\|im_end\|>`). | `input_ids`, `attention_mask`, `labels` |
47
+ | `precomputed_reasoning_latents_qwen.pt` | **69.1 MB** | Validation subset of continuous target latents ($z_1$) and prompt conditionings ($c$) extracted from Layer 12 of Qwen2.5. | `{"prompt_latents": [N, L_p, 896], "target_latents": [N, 100, 896]}` |
48
+ | `precomputed_real_qwen.pt` | **1,045.9 MB** | Intermediate-scale latent training dataset containing 1,000 multi-turn mathematical reasoning trajectories. | `{"prompt_latents", "target_latents", "target_tokens"}` |
49
+ | `precomputed_real_qwen_full.pt` | **2,360.3 MB** | Complete production training dataset covering extensive multi-step reasoning problems. | `{"prompt_latents", "target_latents", "target_tokens"}` |
50
+
51
+ ---
52
+
53
+ ## πŸš€ How to Load and Use
54
+
55
+ ### 1. Direct Python Loading via `torch.load`
56
+ ```python
57
+ import torch
58
+
59
+ # Load tokenized sequences
60
+ tokenized_data = torch.load("reasoning_tokenized_qwen.pt", map_location="cpu")
61
+ print("Tokenized sample count:", len(tokenized_data["input_ids"]))
62
+
63
+ # Load precomputed continuous latents
64
+ latents_data = torch.load("precomputed_reasoning_latents_qwen.pt", map_location="cpu")
65
+ print("Prompt latents shape:", latents_data["prompt_latents"][0].shape) # [L_p, 896]
66
+ print("Target latents shape:", latents_data["target_latents"][0].shape) # [100, 896]
67
+ ```
68
+
69
+ ### 2. Training BlockDiffuse DiT with this Dataset
70
+ ```bash
71
+ # Clone official codebase
72
+ git clone https://github.com/Hooshaai/BlockDiffuse.git
73
+ cd BlockDiffuse
74
+
75
+ # Train with the precomputed full dataset
76
+ python train.py \
77
+ --config_train configs/gpu_full_capacity_improved.yaml \
78
+ --config_dit configs/gpu_full_capacity_improved.yaml \
79
+ --data_path ./data/precomputed_real_qwen_full.pt \
80
+ --max_steps 20000 \
81
+ --output_dir ./checkpoints_improved
82
+ ```
83
+
84
+ ---
85
+
86
+ ## πŸ“ Latent Space Normalization & Properties
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},
97
+ author={Hooshaai Research},
98
+ journal={GitHub / HuggingFace Technical Report},
99
+ year={2026},
100
+ url={https://github.com/Hooshaai/BlockDiffuse}
101
+ }
102
+ ```