Programming/AI, LLM

[Llama] 라마3 다운로드 및 실행 방법 (Kor)

klue 2024. 4. 27. 00:00
반응형

updates : 2024.04.23

contents : Llama 3 오리지널 모델의 실행 방법입니다. Hugging-face 실행 방법 아닙니다!

 

Llama 공식 사이트로 들어가서 엑세스 허가를 먼저 받아야 합니다.

https://llama.meta.com/

 

Meta Llama

Meta Llama is the next generation of our open source large language model, available for free for research and commercial use.

llama.meta.com

위 사이트의 "Download models"를 클릭하세요

 

양식 채우시고 이후에 나오는 모든 내용에 동의해주세요.

 

이제 이후에 모델을 다운로드 받을 때 사용할 URL을 받게 되는데, 이거 사이트 주소 아닙니다. 모델을 다운로드 받을 때 주소를 입력하라고 하는데, 그 때 사용되는 키입니다.

 

 

라마 깃헙에 가서 모델을 다운 받고 weight도 다운받습니다.

아래 command 순서대로 따라하시면 됩니다.

https://github.com/meta-llama/llama3

 

GitHub - meta-llama/llama3: The official Meta Llama 3 GitHub site

The official Meta Llama 3 GitHub site. Contribute to meta-llama/llama3 development by creating an account on GitHub.

github.com

# CLI Command (terminal)
git clone https://github.com/meta-llama/llama3
cd llama3
pip install -e .
bash download.sh
# 다운로드 엑세스 URL을 넣으라고 나옵니다. 
# 이 때 메일에서 받은 URL을 복사해서 그대로 넣고 enter하면 됩니다~

# Llama 구동 명령어 예시입니다
torchrun --nproc_per_node 1 example_chat_completion.py \
    --ckpt_dir llama-2-7b-chat/ \
    --tokenizer_path tokenizer.model \
    --max_seq_len 512 --max_batch_size 6
반응형

'Programming > AI, LLM' 카테고리의 다른 글

[Llama] Download and Run Llama 3 (Eng)  (0) 2024.04.23