whatisgithub

What is lit?

pair-code/lit — explained in plain English

Analysis updated 2026-05-18

3,653TypeScriptAudience · researcherComplexity · 3/5Setup · moderate

In one sentence

LIT is a visual, browser-based tool that lets researchers inspect and understand why a trained machine learning model made its predictions.

Mindmap

mindmap
  root((LIT))
    What it does
      Explains predictions
      Finds failure cases
      Tests consistency
      Compares models
    Tech stack
      TypeScript
      Python
      TensorFlow
      PyTorch
    Use cases
      Model debugging
      Bias checking
      Counterfactual testing
      Notebook analysis
    Audience
      ML researchers
      Data scientists
      Model developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Find examples where a trained model performs poorly or fails unexpectedly.

USE CASE 2

See which parts of an input most influenced a specific model prediction.

USE CASE 3

Test whether a model's output changes consistently when you edit an input.

USE CASE 4

Compare two models side by side on the same data.

What is it built with?

TypeScriptPythonTensorFlowPyTorchJupyter

How does it compare?

pair-code/litarchestra-ai/archestraadrianhajdin/portfolio
Stars3,6533,6533,652
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audienceresearcherops devopsvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.9+ and, for source builds, a separate yarn/frontend build step.

Not stated in the README.

So what is it?

LIT, short for Learning Interpretability Tool, is a browser-based tool for understanding why machine learning models behave the way they do. It is aimed at researchers and developers who have already built or trained a model and want to inspect it: finding cases where it fails, understanding why it made a particular prediction, or checking whether it behaves consistently when you change small things in the input. The tool works with text, image, and tabular data, and is compatible with popular machine learning frameworks like TensorFlow and PyTorch. It can be run as a standalone web server on your machine, or embedded directly inside notebook environments like Jupyter or Google Colab for more interactive use. The browser interface offers several ways to explore a model. Local explanations use highlighting called salience maps to show which parts of an input most influenced a prediction. Aggregate analysis lets you compute custom metrics, slice your data into subgroups, and visualize how the model arranges its outputs in an embedding space, which is a geometric representation of how the model relates different inputs to each other. A counterfactual generator lets you edit an example and immediately see how the model's prediction changes, which is useful for stress-testing the model or finding edge cases. Side-by-side mode lets you compare two different models on the same data. LIT is extensible: you can connect your own model by writing a short Python wrapper that follows the tool's data and model APIs. Additional interpretability components can be added on both the backend and frontend sides. The project is developed by PAIR (People and AI Research at Google) and includes live demos, a user guide, and a published research paper describing the design.

Copy-paste prompts

Prompt 1
Help me install LIT with pip and run the quickstart classification demo.
Prompt 2
Show me how to write a custom model wrapper so LIT can inspect my own model.
Prompt 3
Explain how LIT's salience maps show what influenced a prediction.
Prompt 4
Walk me through using LIT inside a Colab or Jupyter notebook.

Frequently asked questions

What is lit?

LIT is a visual, browser-based tool that lets researchers inspect and understand why a trained machine learning model made its predictions.

What language is lit written in?

Mainly TypeScript. The stack also includes TypeScript, Python, TensorFlow.

What license does lit use?

Not stated in the README.

How hard is lit to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is lit for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.