Spaces:
Running
Running
A newer version of the Gradio SDK is available:
6.2.0
metadata
title: PTS Visualizer
emoji: π
colorFrom: indigo
colorTo: green
sdk: gradio
sdk_version: 4.31.0
app_file: app.py
pinned: false
license: apache-2.0
tags:
- pts
- pivotal-tokens
- thought-anchors
- llm-interpretability
- reasoning
- visualization
PTS Visualizer
Interactive visualization platform for exploring Pivotal Tokens, Thought Anchors, and Reasoning Circuits in language models.
Inspired by Neuronpedia, this tool helps researchers and practitioners understand how language models reason through complex tasks.
Features
π Overview Dashboard
- Dataset statistics and distributions
- Quick summary of positive/negative impacts
- Category and pattern analysis
π Token Explorer
- Highlight pivotal tokens in context
- Visualize probability changes before/after tokens
- Explore token-level impacts on success
πΈοΈ Reasoning Graph
- Interactive dependency graph for thought anchors
- Visualize causal relationships between reasoning steps
- Color-coded by impact (green = positive, red = negative)
- Node size indicates importance
πΊοΈ Embedding Space
- t-SNE visualization of sentence/token embeddings
- Color by category, pattern, or impact
- Explore clusters and patterns in reasoning
β‘ Circuit Tracer
- Step-by-step walkthrough of reasoning traces
- Probability progression chart
- Verification scores and error detection
Supported Datasets
Load from HuggingFace Hub:
codelion/Qwen3-0.6B-pts- Pivotal tokenscodelion/Qwen3-0.6B-pts-thought-anchors- Thought anchorscodelion/Qwen3-0.6B-pts-steering-vectors- Steering vectorscodelion/Qwen3-0.6B-pts-dpo-pairs- DPO training pairscodelion/DeepSeek-R1-Distill-Qwen-1.5B-pts-thought-anchors
Or upload your own JSONL files!
How to Use
- Select a data source: Choose HuggingFace Hub or upload a local file
- Load the dataset: Click "Load Dataset"
- Explore: Navigate through the tabs to visualize different aspects
Local Development
# Clone the repository
git clone https://github.com/codelion/pts
cd pts/visualizer
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.py
Related Resources
- PTS GitHub Repository
- Pivotal Token Search Collection
- OptiLLM - Inference optimization library
Citation
If you use this tool in your research, please cite:
@software{pts,
title = {PTS: Pivotal Token Search},
author = {Asankhaya Sharma},
year = {2025},
publisher = {GitHub},
url = {https://github.com/codelion/pts}
}