pip install -e .
Installs the package in editable mode.
See example/example.py
for an example which runs attribution with the specified model and attribution method (e.g., LOO, hierarchical, pruning) and prints the attribution results as a dataframe.
python example/example.py --input example/aurora.json --dtype float16 --use-cache loo --model-name meta-llama/Llama-3.2-1B-Instruct
python example/example.py --input example/aurora.json --dtype float16 --use-cache hierarchical --model-name meta-llama/Llama-3.2-1B-Instruct --keep-paragraphs 3
python example/example.py --input example/aurora.json --dtype float16 --use-cache proxy --proxy-model-name meta-llama/Llama-3.2-1B-Instruct --target-model-name meta-llama/Llama-3.2-3B-Instruct
python example/example.py --input example/aurora.json --dtype float16 --use-cache pruning --pruning-model-name meta-llama/Llama-3.2-1B-Instruct --rescoring-model-name meta-llama/Llama-3.2-3B-Instruct --keep-sentences 3
The code has been tested with Llama 3, Qwen 2, Mistral families.