Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,23 +81,33 @@ def analyze_world_model(model_name, dataset_key, num_samples=25):
|
|
| 81 |
# **State S{cluster_id} [Label]**: [One sentence explanation of the shared logic/context].
|
| 82 |
# """
|
| 83 |
prompt = f"""
|
| 84 |
-
Act as a Mechanistic Interpretability Researcher. You are
|
|
|
|
| 85 |
|
| 86 |
-
|
|
|
|
| 87 |
|
| 88 |
-
### DATASET SNIPPETS:
|
| 89 |
{context_payload}
|
| 90 |
|
| 91 |
-
### YOUR TASK:
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
3. **Functional Role**: Explain how this state helps the model predict the next token. (e.g., 'Being in this state restricts the search space to numerical dates or phase-related verbs').
|
| 95 |
|
| 96 |
-
###
|
| 97 |
-
**State S{cluster_id} [Structural Label]**
|
| 98 |
-
|
| 99 |
-
- **
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
"""
|
| 102 |
|
| 103 |
try:
|
|
|
|
| 81 |
# **State S{cluster_id} [Label]**: [One sentence explanation of the shared logic/context].
|
| 82 |
# """
|
| 83 |
prompt = f"""
|
| 84 |
+
Act as a Mechanistic Interpretability Researcher. You are decoding the latent 'Newtonian' world model
|
| 85 |
+
within a Transformer for the '{dataset_key}' dataset.
|
| 86 |
|
| 87 |
+
You are analyzing Cluster S{cluster_id}. This cluster represents a specific 'Equivalence Class' where
|
| 88 |
+
the model treats different sequences as functionally identical.
|
| 89 |
|
| 90 |
+
### RAW DATASET SNIPPETS FOR CLUSTER S{cluster_id}:
|
| 91 |
{context_payload}
|
| 92 |
|
| 93 |
+
### YOUR MANDATORY TASK:
|
| 94 |
+
Provide a comprehensive, high-fidelity analysis for THIS CLUSTER ALONE. You must deliver the same
|
| 95 |
+
level of depth as seen in previous successful state interpretations.
|
|
|
|
| 96 |
|
| 97 |
+
### REQUIRED OUTPUT FORMAT:
|
| 98 |
+
**State S{cluster_id} [Structural State Label]**
|
| 99 |
+
|
| 100 |
+
- **Internal World Model**: Explain the CORE 'Law' or 'Invariant' here. What logical map has the model activated?
|
| 101 |
+
Describe how this state interconnects lore, timelines, or mechanics into a single 'Coherent World State'.
|
| 102 |
+
|
| 103 |
+
- **Dataset Sensor**: List the specific 'Triggers' that push the model into this state.
|
| 104 |
+
Identify: (1) Proper Nouns/Identifiers, (2) Domain-Specific Terminology, (3) Syntax Patterns (e.g., lists, headers).
|
| 105 |
+
|
| 106 |
+
- **Predictive Function**: Explain how being in this state constrains the model's future.
|
| 107 |
+
What next-tokens are now 'Biased' or 'Anticipated'? How does this state filter out irrelevant topics?
|
| 108 |
+
|
| 109 |
+
---
|
| 110 |
+
(Ensure your response is dense, professional, and strictly follows the bolded sections above.)
|
| 111 |
"""
|
| 112 |
|
| 113 |
try:
|