Debug-XAI / README.md
rongyuan's picture
Update README.md
0cd2d8e verified
metadata
title: Debug-XAI
emoji: 🔍
colorFrom: indigo
colorTo: blue
sdk: docker
pinned: false
license: apache-2.0
short_description: An Interactive Framework for LLM Failure Analysis
suggested_hardware: t4-small

Debug-XAI

An Interactive Framework for LLM Failure Analysis using Attribution Methods (Attn-LRP, CP-LRP, Gradient).

Features

  • Model Loading: Load HuggingFace models with optional 4-bit quantization
  • Error Token Localization: Identify erroneous tokens via LLM validators or manual truncation
  • Input Attribution: Visualize token-level attribution using Attn-LRP, CP-LRP, or vanilla gradients
  • Perturbation Evaluation: Evaluate attribution quality by zeroing out top-attributed tokens
  • Circuit Visualization: Build and visualize attribution graphs across model layers

Environment Variables (Optional)

  • OPENAI_API_KEY: OpenAI API key for LLM-based error token localization
  • OPENAI_BASE_URL: Custom OpenAI-compatible API base URL
  • LLM_MODELS: Comma-separated list of model names for validators (default: gpt-4o-mini)

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference