OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Evaluation & Observability

Ferret

Ferret is a Python library that generates token-level feature-attribution explanations for Transformer text models and evaluates those explanations with faithfulness and plausibility protocols.

Independent OpenViST project profile, based on linked sources.

Ferret — OpenViST project profile in AI Evaluation & Observability.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Ferret when you already have a Hugging Face Transformers text model and tokenizer and want to produce or benchmark token-level explanations in a shared workflow.

Who it is for

  • Researchers comparing interpretability methods for Transformer text models
  • Practitioners who want to inspect and evaluate token-level explanations for a Hugging Face text classifier

Documented uses

  • Generate token-level explanations for a model prediction using gradient, integrated-gradient, Partition SHAP or LIME methods.
  • Compare explanations using faithfulness and plausibility measures.
  • Calculate and average evaluation scores across selected dataset samples.
Before you choose

Requirements & limits

  • Ferret’s documented model support is for text models.
  • The package expects a model and tokenizer for its Benchmark workflow.
  • The default installation excludes dependencies for speech explainability; the README provides a separate speech extra.
  • The repository lists an MIT license.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Generate and evaluate explanations for a text input

Use a loaded text-classification model to produce token-level explanations and view evaluation scores.

Before you start

  • Python package ferret-xai and its Transformers dependency
  • A Hugging Face Transformers text-classification model and matching tokenizer
  • Jupyter Notebook or Colab for the documented formatted evaluation table

Steps

  1. Install the package with the command below.

    Documented command
    pip install -U ferret-xai
  2. Load a Transformers sequence-classification model and tokenizer.

  3. Create Benchmark(model, tokenizer) and call explain with a text input and target.

  4. Pass the explanations to evaluate_explanations and display the results with show_evaluation_table.

Expected outcome

A formatted table of evaluation measures for explanations of the selected text input.

Guide limitations

  • The README describes support for text models.
  • The formatted table example is intended for Jupyter Notebook or Colab.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
g8a9/ferret · Official homepage title · retained in its source language