Zhongheng-Cheng / gsoc2024-frame-blending

GSoC 2024 project "Frame Blending by LLMs" with Red Hen Lab.

Home Page:https://zhongheng-cheng.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gsoc2024-frame-blending

Downloading and installation of Llama 2

Referring to Meta - 5 Steps to Getting Started with Llama 2

  1. Download dependencies
pip install -r requirements.txt
  1. Download the model weights
git clone https://github.com/facebookresearch/llama
cd llama
./download.sh # requires the pre-signed URL from Meta License
  1. Convert the model weights to run with Hugging Face
# in the llama/ directory

# create a link to the tokenizer
ln -h ./tokenizer.model ./llama-2-7b-chat/tokenizer.model

# convert to hugging face format
TRANSFORM=`python -c "import transformers;print('/'.join(transformers.__file__.split('/')[:-1])+'/models/llama/convert_llama_weights_to_hf.py')"`
pip install protobuf && python $TRANSFORM --input_dir ./llama-2-7b-chat --model_size 7B --output_dir ./llama-2-7b-chat-hf
  1. Write Python scripts and run the model

About

GSoC 2024 project "Frame Blending by LLMs" with Red Hen Lab.

https://zhongheng-cheng.github.io/


Languages

Language:Python 100.0%