Skip to content

Commit 98626a9

Browse files
jeremymanningclaude
andcommitted
Update README to reflect Sankey removal and bumplot-only visualization
- Removed all references to Sankey diagrams - Updated Quick Start example to use visualize_bumplot() - Corrected TokenSequenceVisualizer description - Added key features of bumplot visualization - Fixed notebook paths and descriptions - Updated API examples to match current implementation The documentation now accurately reflects that bumplot is the sole visualization method after Sankey diagram removal. Part of issue #4 documentation updates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8c69bc1 commit 98626a9

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

README.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ pf = ParticleFilter(
8080
prompt = "The meaning of life is"
8181
particles = pf.generate(prompt, max_new_tokens=30)
8282

83-
# Visualize the paths
83+
# Visualize the token trajectories using bump plot
8484
viz = TokenSequenceVisualizer(tokenizer=pf.tokenizer)
85-
fig = viz.visualize(particles, prompt)
85+
fig = viz.visualize_bumplot(particles, output_path='bumplot.png')
8686
```
8787

8888
### Key Components
@@ -93,9 +93,9 @@ fig = viz.visualize(particles, prompt)
9393
- Supports temperature, top-k, and top-p sampling
9494

9595
#### TokenSequenceVisualizer
96-
- Creates Sankey-like diagrams showing particle paths
97-
- **NEW: Bump plot visualizations** showing token trajectories over time
98-
- Generates probability heatmaps
96+
- Creates bump plot visualizations showing token trajectories over time
97+
- Colors transitions by probability, entropy, or particle ID
98+
- Smart label positioning with collision detection
9999
- Customizable styling and output options
100100

101101
### Running Tests
@@ -105,29 +105,35 @@ cd code
105105
pytest tests/ -v
106106
```
107107

108-
### Example Notebook
108+
### Example Notebooks
109109

110-
See `code/quantum_conversations_demo.ipynb` for a comprehensive demonstration including:
111-
- Visualizing paths for 30 different starter sequences
112-
- Analyzing divergence patterns based on prompt ambiguity
113-
- Interactive exploration of custom prompts
110+
- `code/notebooks/quantum_conversations_demo.ipynb` - Interactive exploration with 30 starter sequences
111+
- `code/notebooks/demo_bumplot_visualization.ipynb` - Bump plot visualization examples
112+
- `code/notebooks/comprehensive_demo.ipynb` - Full feature demonstration
114113

115114
### Bump Plot Visualization
116115

117-
The new bump plot feature visualizes how tokens evolve across time for each particle:
116+
The bump plot visualization shows how token ranks evolve across generation steps:
118117

119118
```python
120-
# Create bump plot visualization
119+
# Create bump plot visualization with different color schemes
121120
fig = viz.visualize_bumplot(
122121
particles,
123-
color_by='transition_prob', # Color by probability
124-
max_vocab_display=50, # Show top 50 tokens
125-
show_tokens=True, # Display token labels
122+
color_by='transition_prob', # Color by transition probability
123+
max_vocab_display=15, # Show top 15 tokens
124+
show_tokens=True, # Display token labels
125+
curve_force=0.5, # Smoothness of curves (0-1)
126126
output_path='bumplot.png'
127127
)
128128
```
129129

130-
Color schemes available:
131-
- `'transition_prob'`: Colors reflect token transition probabilities
130+
**Color schemes available:**
131+
- `'transition_prob'`: Colors reflect token transition probabilities (default)
132132
- `'entropy'`: Colors based on entropy at each step
133133
- `'particle_id'`: Distinct colors for each particle
134+
135+
**Key features:**
136+
- Smooth sigmoid curves prevent overshooting
137+
- Smart token label positioning avoids overlaps
138+
- Adaptive font sizing for readability
139+
- Dual probability display (transition frequency + within-particle probability)

0 commit comments

Comments
 (0)