instruct-eval icon indicating copy to clipboard operation
instruct-eval copied to clipboard

Evaluating with adapters

Open maanasharma5 opened this issue 1 year ago • 2 comments

Hello,

Is there a way to evaluated a model that we have trained an e.g. LoRA adapter on? Thanks

maanasharma5 avatar Dec 02 '24 00:12 maanasharma5

You can first merge the weights of the LoRA adapters with the pre-trained model, as outlined in this discussion. Then, set the model path to point to the merged model.

Hjh233 avatar Jan 19 '25 07:01 Hjh233

You can just add --lora_path arguments

CUDA_VISIBLE_DEVICES=0 \
python main.py mmlu --model_name llama \
  --model_path /path/to/basemodel \
  --lora_path /path/to/loraweight

if you change lora model, just export PYTHONPATH="$PYTHONPATH:/path/contains/changed-transformers-peft"

coder23j avatar Feb 27 '25 09:02 coder23j