답변 주셔서 감사합니다.
1시간 전 즈음 구글 코랩 GPU 사용 모드로 1~4번까지는 갔습니다.
그런데 from transformers import AlpacaForMaskedLM, AlpacaTokenizer 줄에서 오류가 났습니다.
transformers 안에 알파카가 들어 있어야 하는데 없다는 오류를 본 기억이 납니다.
이게 구글 코랩에서 해서 그런 걸까요??
추가로 Inference test.ipynb 파일에서는 ../KoAlpaca 경로에서 모델을 찾게 되는데요,
해당 경로에 모델을 받아두시거나 실행 시점에 huggingface에서 모델을 받아오게 하셔도 됩니다.
(후자의 경우 매번 실행하실 때마다 모델을 받아와야 해서 느릴 수 있습니다;; )
모델을 받으시려면 아래 주소를 git clone하시면 됩니다. (git-lfs가 필요한데, Colab에서는 어떻게 되는지 모르겠네요 )
huggingface에서 모델을 받아오시려면 아래와 같이 ../KoAlpaca 대신 beomi/KoAlpaca를 인자로 주시면 됩니다.
import torch
from transformers import LlamaForCausalLM, LlamaTokenizer
tokenizer = LlamaTokenizer.from_pretrained("beomi/KoAlpaca")
model = LlamaForCausalLM.from_pretrained("beomi/KoAlpaca").to('cuda:0')
M1 Mac mini 16GB 를 이용해서 사용해보려고 했습니다만, 하기와 같은 에러가 나옵니다.
Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. View Jupyter [log](command:jupyter.viewOutput) for further details.
Jupyter Log는 아래와 같습니다.
error 18:47:04.217: Disposing session as kernel process died ExitCode: undefined, Reason: <ENV폴더>/lib/python3.10/site-packages/traitlets/traitlets.py:2548: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
<ENV폴더>/lib/python3.10/site-packages/traitlets/traitlets.py:2499: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '15b4aa0e-a5b9-4419-98a1-2ee3317ef3dc' instead of 'b"15b4aa0e-a5b9-4419-98a1-2ee3317ef3dc"'.
warn(
info 18:47:04.218: Dispose Kernel process 2917.
error 18:47:04.218: Raw kernel process exited code: undefined
error 18:47:04.222: Error in waiting for cell to complete Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:32419)
at /.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:51471
at Map.forEach (<anonymous>)
at y._clearKernelState (//.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:51456)
at y.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:44938)
at /.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:96826
at ee (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:1589492)
at jh.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:96802)
at Lh.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:104079)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
warn 18:47:04.224: Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
info 18:47:04.228: Cancel all remaining cells true || Error || undefined
중요한건 커널이 왜 죽었을까, 인데요.... 혹시 어떤 셀을 실행하다가 문제가 발생했는지 알려주실 수 있을까요?
더불어 새로운 질문으로 올려주시면서 이 질문의 링크를 함께 남겨주시면 다른 분들이 참고하시기 좋을 것 같습니다.
괜찮으시면 위에 남겨주신 질문 링크 https://discuss.pytorch.kr/t/koalpaca/1342/8 를 포함하여 새 글로 질문을 올려주실 수 있으실까요?
답변해주셔서 감사합니다. 우분투 리눅스에서 계정 하나 새로 만들어서 도전해봐야겠습니다. 계정을 하나 새로 만들면, 이것저것 마구 설치해도 다른 계정이랑 간섭을 일으키지 않겠죠? ㅎㅎ sudo 만 안 한다면요... 몇 주일 사이에 비쿠나도 나오고 이것저것 많이 나왔으니 해봐야겠습니다.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\users\pedro\anaconda3\envs\tensorflow39\lib\site-packages\absl_py-0.13.0.dist-info\METADATA