본문 바로가기

Lora

(3)
RuntimeError: Invalid scalar type ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 30788) of binary DDP를 할려는데, gpu가 1개라서 FDSP로 실행시키고, gloo type으로 했는데 Model을 불러오는데 Invalid type error라는 에러가 자꾸 뜬다.. 어떻게 해결해야할까!? Method: 내부 로직 수정 C 드라이브 안으로 들어가서, 가상환경 안에 있는 내부 python code에서 버그가 일어난 곳이다. 여기 보면 nn.ModuleList에서 추가할 때 type이 이상하다는 걸 의미하는 것 같다. 그래서 wrap() function을 전부 지워주었다. 그랬더니 넘어가서 해결은 일단 되었는데, DDP 작동에 있어서 해결이 될지는 모르겠다... +) GPU memory 터져서 훈련도 잘되는지는 모르겠는데.. 나중에 랩실 서버로 돌려서 훈련되면 추가적으로 공유하겠습니다..ㅎㅎ 2023...
[Window] bitsandbytes download - PEFT using LoRA(QLoRA) 드디어... LLM을 PEFT 방식을 이용해서 훈련시킬려고 하는데, bitsandbytes가 linux만 지원한다는 얘기만 잔뜩 있고 도움이 되는 글들을 못 찾아서 디버깅하는데만 5시간 쏟은 것 같다... 요즘 LLM fine-tuning하면 LoRA와 QLoRA가 대세이고, 또 이것을 양자화해서 memory의 효율성을 가져가는게 트렌드인데 이 양자화를 해서 memory를 아낄려면 8-bit, 4-bit로 weight를 설정하고 float과 상호성을 띄도록 만들어줘야 하는데 여기 필요한 모듈 중 하나가 바로 bitsandbytes이다... 방법1) bitsandbytes-windows-webui github https://github.com/jllllll/bitsandbytes-windows-webui ..
[LoRA 논문 리뷰] - LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS *LoRA를 위한 논문 리뷰 글입니다! 궁금하신 점은 댓글로 남겨주세요! LoRA paper: https://arxiv.org/abs/2106.09685 LoRA: Low-Rank Adaptation of Large Language Models An important paradigm of natural language processing consists of large-scale pre-training on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes le arxi..

반응형