tviz is a local dashboard for visualizing RL training runs with Tinker. Similar to wandb, you add a logger to your training loop. Metrics, rollouts, and trajectories are stored in a local SQLite database and displayed in real-time.
- Install the Python client via
pip install tviz - Clone and run the dashboard:
git clone https://github.com/sdan/tviz.git
cd tviz && bun install && bun dev- Open http://localhost:3003 to view your runs.
Data is stored in ./data/tviz.db by default. Override with TVIZ_DB_PATH.
from tviz import TvizLogger
from tviz.adapters.tinker import from_tinker_batch
logger = TvizLogger(run_name="gsm8k_grpo")
logger.log_hparams({"model": "llama-3.2-1b", "lr": 1e-4})
for step in range(100):
# Your Tinker training loop
trajectory_groups = rollout(...)
# Log to tviz
rollouts = from_tinker_batch(trajectory_groups, tokenizer=tokenizer)
logger.log_rollouts(rollouts, step=step)
logger.log_metrics({"reward": avg_reward, "loss": loss}, step=step)
logger.close()We include several examples in the examples/ folder:
- Quickstart: Pig Latin SFT with minimal tviz integration.
- GSM8K RL: Math reasoning with GRPO.
- RL Loop: Generic RL loop with rollout logging.
To run an example:
export TINKER_API_KEY=your-api-key
python examples/quickstart.pyFor the full API reference and guides, visit tviz.sdan.io/docs.
MIT