inseq-team / inseq

Interpretability for sequence generation models 🐛 🔍
https://inseq.org
Apache License 2.0
378 stars 36 forks source link

Fix LLaMA 3.2, add `clean_special_chars` #289

Closed gsarti closed 1 month ago

gsarti commented 1 month ago

Description

This PR fixes support for multi-EOS models (e.g. LLaMA 3.2, closes #287) and adds a new clean_special_chars: bool = False argument to model.attribute to support the cleaning of special characters from tokens in the out.source and out.target sequences using the native tokenizer.decode function provided by transformers.

Also adds GraniteForCausalLM, GraniteMoeForCausalLM and OlmoeForCausalLM to the model config.