GwendalTsang's picture
Add author code snapshot at def3cb6
c28f0c7 verified
|
Raw
History Blame Contribute Delete
509 Bytes

Automatic Layer Selection for Hallucination Detection

Requirements

  • Python 3.10
  • CUDA 12.8

1. Install dependencies

pip install torch torchvision 
pip install transformers datasets evaluate
pip install faiss-gpu          # GPU build (recommended)
# pip install faiss-cpu        # CPU-only fallback
pip install scikit-learn scipy numpy pandas matplotlib tqdm
pip install skdim pynvml nltk wandb

2. Workflow

construct_dataset.py -> get_activation.py -> method/ID_twonn.py