https://ai.meta.com/resources/models-and-libraries/llama-downloads/
-> 勾选三个模型
-> 等待接收邮件信息(很快)
git clone https://github.com/facebookresearch/llama.git
cd llama
bash download.py
-> 输入email 中的 url
-> 输入模型名字 7B or 13B , ....
https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py
https://huggingface.co/CarperAI/stable-vicuna-13b-delta/raw/main/apply_delta.py
git clone https://github.com/OpenGVLab/Ask-Anything.git
cd Ask-Anything/video_chat/
pip install -r requirements.txt
pip install huggingface_hub
wget https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/eva_vit_g.pth
wget https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth
huggingface-cli download --token hf_xxx --resume-download --local-dir-use-symlinks False CarperAI/stable-vicuna-13b-delta --local-dir stable-vicuna-13b-delta
python convert_llama_weights_to_hf.py --input_dir llama-2-13b --model_size 13B --output_dir llama2-13b
python3 apply_delta.py --base llama2-13b --target stable-vicuna-13b --delta stable-vicuna-13b-delta
rm -rf stable-vicuna-13b-delta
rm -rf llama-2-13b
huggingface-cli download --token hf_xxx --resume-download --local-dir-use-symlinks False lmsys/vicuna-7b-delta-v0 --local-dir vicuna-7b-delta-v0
python convert_llama_weights_to_hf.py --input_dir llama-2-7b --model_size 7B --output_dir llama2-7b
python3 apply_delta.py --base llama2-7b --target vicuna-7b-v0 --delta vicuna-7b-delta-v0
rm -rf vicuna-7b-delta-v0
rm -rf llama-2-7b
python demo.py
或者运行
demo.ipynb
videochat.pth
修改 videochat_7b.pth