SPIN icon indicating copy to clipboard operation
SPIN copied to clipboard

What changes should I make to apply the SPIN method on Llama2?

Open Labmem009 opened this issue 1 year ago • 1 comments

I want to apply SPIN method on llama2 with alpaca-like finetuning datasets. What changes should I make to apply the SPIN method? Thanks a lot!

Labmem009 avatar Feb 29 '24 11:02 Labmem009

Hello. I've tried to apply SPIN on llama-2 with the ultrachat200k datasets. It seems that the tokenizer for llama2 and zephyr-7b are different (as shown in this document). As a result, the code in spin/run_spin.py likely needs to be modified (which is primarily focused on the apply_chat_template function). By the way, for alpaca-like datasets, the structure of the dataset is different from ultrachat200k (the key is "instruction" and "output" rather than "prompt" and "messages"). I believe just changing the code in spin/reformat.py to ensure the structure of the dataset is the same should be ok.

TanZhendong avatar Oct 22 '24 12:10 TanZhendong