Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.26.0
title: PTS Visualizer
emoji: π¬
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 5.50.0
app_file: app.py
pinned: false
license: apache-2.0
tags:
- pts
- pivotal-tokens
- thought-anchors
- llm-interpretability
- reasoning
- visualization
datasets:
- codelion/Qwen3-0.6B-pts
- codelion/DeepSeek-R1-Distill-Qwen-1.5B-pts
PTS Visualizer β Pivotal Token Search
Interactive visualization for Pivotal Token Search: the reasoning events that shift a language model's probability of solving a task, at three representational scales β latent workspace meta-tokens, emitted pivotal tokens, and sentence-level thought anchors β as a single kind of object.
Views
Overview
Per-scale event counts, causal-link count, and separate distributions for emitted probability deltas and latent readout scores (they are different quantities and are never binned together).
Event Explorer
Every event in context, filterable by scale, category, valence, score, and (for latent events) layer. Latent readouts are shown as readout scores, never as probability deltas.
Causal Event Graph
The latent β token β sentence β outcome graph for a query, with nodes shaped by scale and edges from the recorded causal links.
Embedding Space
t-SNE of event embeddings, colored by category or impact.
Reasoning Timeline
All scales on one shared generation axis: latent meta-tokens, pivotal tokens, thought-anchor sentences, and the resulting success-probability curve β plus a workspace heatmap of meta-token readout scores by position.
Supported datasets
Built for the unified PTS reasoning-event datasets, which drive every view:
codelion/Qwen3-0.6B-ptscodelion/DeepSeek-R1-Distill-Qwen-1.5B-pts
Any PTS file can also be loaded by pasting its dataset id or uploading a JSONL (legacy pivotal-token and thought-anchor files are upgraded on the fly). Steering-vector datasets are a separate downstream artifact for OptiLLM and are not the focus here.
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}
}