Skip to content
/ ecco Public

Explain, analyze, and visualize NLP language models. Ecco creates interactive visualizations directly in Jupyter notebooks explaining the behavior of Transformer-based language models (like GPT2, BERT, RoBERTA, T5, and T0).

License

Notifications You must be signed in to change notification settings

jalammar/ecco

Repository files navigation

Overview

PyPI Package latest release Supported versions

Ecco

Ecco is a python library for creating interactive visualizations for Natural Language Processing models.

It provides multiple interfaces to aid the explanation and intuition of Transformer-based language models.

Ecco runs inside Jupyter notebooks. It is built on top of pytorch and transformers.

Gallery

Input and Output Sequences View the inputs and outputs (generated text) of language models broken down into tokens.
Input Saliency

How much did each input token contribute to producing the output token?

Neuron factors

Extracting underlying behaviour of neurons in a small number of factors with dimensionality reduction.

  • Free software: BSD 3-Clause License

Installation

pip install ecco

Documentation

To use the project:

import ecco
lm = ecco.from_pretrained('distilgpt2')
text= "The countries of the European Union are:\n1. Austria\n2. Belgium\n3. Bulgaria\n4."

output = lm.generate(text, generate=20, do_sample=True)

About

Explain, analyze, and visualize NLP language models. Ecco creates interactive visualizations directly in Jupyter notebooks explaining the behavior of Transformer-based language models (like GPT2, BERT, RoBERTA, T5, and T0).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published