taylorsatula

End-to-end pipeline for seeing how LLMs actually process your prompts. Capture attention across every layer, render heatmaps and cooking curves, compare variants with evidence — not vibes.

13
0
100% credibility
Found Mar 08, 2026 at 13 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

TeaLeaves analyzes attention patterns in AI language models for user-defined regions of prompts, generating visualizations such as heatmaps, cooking curves, and comparisons to improve prompt engineering.

How It Works

1
📖 Discover TeaLeaves

You find TeaLeaves, a friendly tool that reveals how AI focuses on different parts of your instructions.

2
🖊️ Mark prompt sections

You highlight key areas in your prompt, like rules, examples, or the current question, using simple markers.

3
💬 Gather chat examples

You collect real conversations or questions to test how the AI pays attention.

4
🚀 Run the deep scan

You send your setup to a powerful computer, and it captures exactly where the AI looks inside the model.

5
🎨 Create stunning visuals

Back home, you generate colorful heatmaps, smooth curves, and animated sweeps showing attention flow.

6
📈 Compare and tweak

You spot changes between versions, like cleaner focus phases, to refine your prompts.

🏆 Perfect AI guidance

Your prompts now steer the AI precisely, with clear attention patterns and better results every time.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 13 to 13 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is TeaLeaves?

TeaLeaves is a Python end-to-end pipeline for dissecting how LLMs process prompts, turning vague prompt tweaks into measurable attention patterns. Define named regions in your system prompt or chat via simple JSON markers or regex, ship a self-contained runner to any GPU box for HuggingFace models like Llama or Qwen, and get back JSON with layer-by-layer attention and logit lens data. Locally render heatmaps, cooking curves tracking region focus over layers, animated GIF sweeps, and variant comparisons—evidence over vibes for prompt tuning.

Why is it gaining traction?

Unlike TransformerLens or similar libraries that hand you raw hooks, TeaLeaves delivers a ready pipeline: prep inputs with CLI, analyze on remote GPUs via scp, visualize instantly with PNGs/GIFs and delta tables. Variant diffs show exactly what changed (e.g., context bleed ratios), plus aggregate stats across seeds for stability. Devs love the "before/after" cooking curves proving iterative gains in an end-to-end LLM project.

Who should use this?

Prompt engineers refining system instructions for agentic apps or RAG pipelines. Teams building end-to-end machine learning projects on GitHub who need to validate attention flow without custom hooks. Anyone tuning small models (8B+) where every token counts, like persistent entities or single-pass responders.

Verdict

Grab it for structured prompt debugging—docs guide the full flow, visuals pop, and it scales to 32B models. With 13 stars and 1.0% credibility, it's pre-1.0 raw but actively maintained; prototype your next end-to-end pipeline tweak today.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.