Llama 2_Huggingface_4Bit_QLoRA
1.0.0
업데이트 된 버전은 새로운 저장소에서 찾을 수 있습니다.
https://github.com/gmongaras/wizard_qlora_finetuning
Huggingf
미세 조정을 시작하려면 main.py 편집하고 실행하십시오
Finetuning이 완료되면 ./outputs 에 검사 점이 있어야합니다. 추론을 실행하기 전에 LORA 가중치와 원래 가중치를 결합하여 추론 중 더 빠른 추론 및 더 작은 GPU 요구 사항을 결합 할 수 있습니다. 이렇게하려면 경로와 함께 merge_weights.py 스크립트를 실행하십시오.
마지막으로, 병합 된 모델이 주어지면 generate.py 실행할 수 있습니다.
스크립트를 실행하려는 파이썬 요구 사항은 요구 사항에 있습니다 .txt
또한 7B 모델의 Falcon weights를 여기에서 https://huggingface.co/tiiuae/falcon-7b 로 다운로드하고 파일을 디렉토리에 ./tiiuae/falcon-7b 에 넣거나 여기에서 llama-2 웨이트를 다운로드하여 https://huggingface.co/meta-llama/Llama-2-7b-hf 라고 명명했습니다 ./llama-2
이 스크립트는 4 비트 결합에서 멀티 GPU를 지원하지 않습니다. 이 작업을 수행하는 방법을 찾으면 스크립트를 업데이트하겠습니다.
python -m pip uninstall bitsandbytes transformers accelerate peft -y
python -m pip install git+https://github.com/huggingface/transformers.git git+https://github.com/huggingface/peft.git git+https://github.com/huggingface/accelerate.git git+https://github.com/timdettmers/bitsandbytes.git -U
CUDA Setup failed despite GPU being available. Please run the following command to get more information 다음 소스에서 비트 산드 비트를 구축하고 https://github.com/oobabooga/text-generation-webui/issues/147 에 따라 비트와 바이트에 바이트를 넣어야합니다.