Views
No views yet
11. Convert Meta's released weights into huggingface format. Follow this guide:
2 https://huggingface.co/docs/transformers/main/model_doc/llama
32. Make sure you cloned the released weight diff into your local machine. The weight diff is located at:
4 https://huggingface.co/tatsu-lab/alpaca-7b/tree/main
53. Run this function with the correct paths. E.g.,
6 python weight_diff.py recover --path_raw <path_to_step_1_dir> --path_diff <path_to_step_2_dir> --path_tuned <path_to_store_recovered_weights>1import transformers
2alpaca_model = transformers.AutoModelForCausalLM.from_pretrained("<path_to_store_recovered_weights>")
3alpaca_tokenizer = transformers.AutoTokenizer.from_pretrained("<path_to_store_recovered_weights>")