답변 주셔서 감사합니다.
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, LlamaTokenizertokenizer= LlamaTokenizer.from_pretrained("beomi/KoAlpaca") model = LlamaForCausalLM.from_pretrained("beomi/KoAlpaca").to('cuda:0')
혹시나 잘 되시거나 안 되시면 알려주세요!
경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다. https://s1004games.com
M1 Mac mini 16GB 를 이용해서 사용해보려고 했습니다만, 하기와 같은 에러가 나옵니다.
Canceledfutureforexecute_requestmessagebeforerepliesweredoneTheKernelcrashedwhileexecutingcodeinthethecurrentcellorapreviouscell. Pleasereviewthecodeinthecell(s) toidentifyapossiblecauseofthefailure. 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
올려주신 Jupyter Log 메시지 자체는 vscode에서 사용하시는 Jupyter plugin에서 발생하는 오류인데,
검색해보니까 커널이 (어떤 이유로든지) 죽어서 응답을 받지 못해서 발생하는 것으로 보입니다.
중요한건 커널이 왜 죽었을까, 인데요.... 혹시 어떤 셀을 실행하다가 문제가 발생했는지 알려주실 수 있을까요?
더불어 새로운 질문으로 올려주시면서 이 질문의 링크를 함께 남겨주시면 다른 분들이 참고하시기 좋을 것 같습니다.
괜찮으시면 위에 남겨주신 질문 링크 https://discuss.pytorch.kr/t/koalpaca/1342/8 를 포함하여 새 글로 질문을 올려주실 수 있으실까요?
[출처] https://discuss.pytorch.kr/t/koalpaca/1342
본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.