File size: 1,172 Bytes
665f965
6a48603
89280a9
665f965
 
0cd2d8e
665f965
 
89280a9
 
665f965
 
1e7009b
89280a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6a48603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
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