aifeifei798 commited on
Commit
0b772e4
·
verified ·
1 Parent(s): 970db23

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md CHANGED
@@ -69,6 +69,79 @@ This model represents a fundamental shift in how we approach LLM fine-tuning. In
69
  | **Reasoning Mode** | Linear Pattern Matching | **Global Semantic Reconstruction** | **Deep Logic** |
70
  | **Zero-Shot Understanding**| Fails / Hallucinates | **Emergent Conceptual Synthesis** | **Self-Reflective** |
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  ---
73
 
74
  ## 🔬 Mechanistic Verification: Residual Stream Vector Interference
 
69
  | **Reasoning Mode** | Linear Pattern Matching | **Global Semantic Reconstruction** | **Deep Logic** |
70
  | **Zero-Shot Understanding**| Fails / Hallucinates | **Emergent Conceptual Synthesis** | **Self-Reflective** |
71
 
72
+
73
+ ---
74
+
75
+ ## 📊 Logit Lens Audit: Active Vocabulary Collapse (Candidate Pruning)
76
+
77
+ > **"At Layer 29, the Base model hesitates across 72 candidate words—the FT model slashes this down to just 8 tokens."**
78
+
79
+ To measure *how* **Fragmented Training (FT)** eliminates off-target hesitation, we performed a layer-by-layer **Logit Lens audit**. By projecting the residual stream hidden state $h\_l$ at each layer through the unembedding head (`Final Norm + LM Head`), we calculated the number of **Active Candidate Tokens** (vocabulary tokens with probability $P > 0.1\%$).
80
+
81
+ ---
82
+
83
+ ### 📉 Empirical Evidence: The "Subtractive Pruning" Cliff
84
+
85
+ The layer-by-layer candidate count demonstrates a dramatic **Vocabulary Collapse** in the deep reasoning layers of the FT model:
86
+
87
+ ```
88
+ [L-19 to L-21: Broad Search] ==> Assembles broad candidate associations (+6 to +9 tokens)
89
+
90
+ [L-22 to L-33: The Pruning Cliff] =======> Active candidate words plummet by up to -64 tokens!
91
+
92
+ [L-28 to L-32: Single-Digit Lock] =======> FT locks into 6–8 tokens (vs Base pondering 40–72 tokens)
93
+ ```
94
+
95
+ #### 1. Candidate Assembly & Broad Search (L-19 to L-21)
96
+ * **Phenomenon:** The FT model briefly expands its candidate pool (+6 to +9 active words over Base).
97
+ * **Mechanism:** In middle layers, the model performs a **global semantic sweep**, assembling all potential contextual associations required to resolve the scrambled input.
98
+
99
+ #### 2. The Subtractive Pruning Cliff (L-22 to L-33)
100
+ * **Phenomenon:** A massive, sustained collapse in active candidate words.
101
+ * **Key Highlight (Layer 29):** The Base model remains indecisive with **72 active candidate words**. The FT model brutally prunes the search space down to **8 tokens**—an unprecedented drop of **`-64 candidate words` in a single layer**!
102
+
103
+ #### 3. Single-Digit Decision Lock (L-28 to L-32)
104
+ * **Phenomenon:** The FT model converges into single-digit candidate counts (6 to 8 tokens) 5 layers earlier than the Base model.
105
+ * **Mechanism:** By eliminating 80%–90% of off-target candidates by Layer 28, the softmax entropy collapses cleanly. This **Confidence Sharpening** directly explains why the FT model achieves a **29.61% speedup** in inference time.
106
+
107
+ ---
108
+
109
+ ### 📋 Active Vocabulary Count Comparison (Key Deep Layers)
110
+
111
+ | Layer | Base Active Tokens ($P > 0.1\%$) | **FT Active Tokens ($P > 0.1\%$)** | Token Difference (FT - Base) | Candidate Pruning Dynamics |
112
+ | :--- | :--- | :--- | :--- | :--- |
113
+ | **L-19** | `66` | **`72`** | `+6` | ⬆️ Candidate Assembly (Broad Search) |
114
+ | **L-22** | `99` | **`73`** | **`-26`** | ⬇️ Pruning Onset |
115
+ | **L-23** | `82` | **`47`** | **`-35`** | ⬇️ Subtractive Pruning |
116
+ | **L-27** | `57` | **`12`** | **`-45`** | ⬇️ Severe Vocabulary Collapse |
117
+ | **L-28** | `43` | **`7`** | **`-36`** | 🔒 **Single-Digit Lock (7 Tokens)** |
118
+ | **L-29** | `72` | **`8`** | **`-64`** | 💥 **Peak Collapse (-64 Tokens)** |
119
+ | **L-30** | `52` | **`15`** | **`-37`** | ⬇️ Sustained Compression |
120
+ | **L-31** | `36` | **`6`** | **`-30`** | 🔒 **Single-Digit Lock (6 Tokens)** |
121
+ | **L-32** | `41` | **`7`** | **`-34`** | 🔒 **Single-Digit Lock (7 Tokens)** |
122
+ | **L-33** | `15` | **`7`** | **`-8`** | 🚀 Ready for Sharp Output |
123
+
124
+ ---
125
+
126
+ ### 🛠️ Reproduce Active Word Counting Locally
127
+
128
+ Run our open-source Logit Lens script to verify active token counts across all 36 layers:
129
+
130
+ ```bash
131
+ # Count active vocabulary tokens (P > 0.1%) layer by layer
132
+ python count_active_words.py
133
+ ```
134
+
135
+ ```python
136
+ # Core Logit Lens calculation in count_active_words.py:
137
+ norm_h = final_norm(h_l)
138
+ logits = lm_head(norm_h)
139
+ probs = F.softmax(logits, dim=-1)
140
+
141
+ # Count candidate words with probability > 0.1%
142
+ active_count = (probs > 0.001).sum().item()
143
+ ```
144
+
145
  ---
146
 
147
  ## 🔬 Mechanistic Verification: Residual Stream Vector Interference