inseq-team/inseq
Interpretability for sequence generation models 🐛 🔍
What it solves
Inseq는 시퀀스 생성 모델(LLM 및 번역 모델 등)의 사후 해석성 분석을 보다 쉽게 할 수 있도록 설계된 툴킷입니다. 출력 토큰을 입력 텍스트의 특정 부분에 귀속시켜 모델이 왜 해당 토큰을 생성했는지 이해할 수 있게 해줍니다.
How it works
PyTorch 위에 구축되고 Hugging Face Transformers와 통합된 Inseq는 다양한 특징 귀속 방법을 적용하기 위한 통합 인터페이스를 제공합니다. 인코더‑디코더 모델(ForConditionalGeneration)과 디코더‑전용 모델(ForCausalLM)을 모두 지원합니다. 이 툴킷에는 그래디언트 기반, 내부 구조 기반(어텐션), 교란 기반 등 다양한 귀속 기법이 포함되어 있으며, 노트북, 브라우저, 명령줄에서 귀속 맵을 집계, 필터링 및 시각화할 수 있는 도구를 제공합니다.
Who it’s for
주로 생성 모델의 동작을 분석하거나, 대조 평가를 수행하거나, AI 애플리케이션에서 컨텍스트 의존성을 감지해야 하는 AI 연구자 및 개발자를 대상으로 합니다.
Highlights
- Broad Model Support: Works with most Hugging Face Transformers generation models.
- Diverse Attribution Methods: Includes saliency, Integrated Gradients, DeepLIFT, LIME, and occlusion.
- Advanced Analysis: Supports contrastive feature attribution and context reliance detection.
- Flexible Visualization: Built-in support for heatmaps in Jupyter Notebooks and HTML exports.
- CLI Tools: Command-line interface for attributing single examples or entire Hugging Face datasets.