Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not found weight file #31

Open
Cguanqin opened this issue Mar 1, 2024 · 3 comments
Open

not found weight file #31

Cguanqin opened this issue Mar 1, 2024 · 3 comments
Labels
stat:awaiting response Status - Awaiting response from author type:support Support issues

Comments

@Cguanqin
Copy link

Cguanqin commented Mar 1, 2024

Build the image according to the dockerfile file, then run the container. Error: IsADirectoryError: [Errno 21] Is a directory: '/tmp/ckpt', it should be that there is no weight file in the directory '/tmp/ckpt'. Did not a weight file be generated when building the image? How to solve this problem?

@Cguanqin
Copy link
Author

Cguanqin commented Mar 1, 2024

[root@iZwz9fjpavyfd2ybhfxx1lZ gemma_pytorch]# docker run -t --rm \

-v /tmp/ckpt:/tmp/ckpt \
gemma:pytorch \
python scripts/run.py \
--ckpt=/tmp/ckpt \
--variant="2b" \
--prompt="The meaning of life is"

Traceback (most recent call last):
File "/workspace/gemma/scripts/run.py", line 79, in
main(args)
File "/workspace/gemma/scripts/run.py", line 48, in main
model.load_weights(args.ckpt)
File "/workspace/gemma/gemma/model.py", line 562, in load_weights
torch.load(
File "/opt/conda/lib/python3.10/site-packages/torch/serialization.py", line 986, in load
with _open_file_like(f, 'rb') as opened_file:
File "/opt/conda/lib/python3.10/site-packages/torch/serialization.py", line 435, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/opt/conda/lib/python3.10/site-packages/torch/serialization.py", line 416, in init
super().init(open(name, mode))
IsADirectoryError: [Errno 21] Is a directory: '/tmp/ckpt'

@pengchongjin
Copy link
Collaborator

Hi @Cguanqin, have you downloaded the checkpoint from Kaggle or HuggingFace Hub before running the docker?

You can follow the instruction here to get the checkpoint.
https://www.kaggle.com/models/google/gemma/frameworks/pyTorch

@tilakrayal tilakrayal added type:support Support issues stat:awaiting response Status - Awaiting response from author labels Apr 24, 2024
@TAOSHss
Copy link

TAOSHss commented Apr 25, 2024

Hi @Cguanqin, have you downloaded the checkpoint from Kaggle or HuggingFace Hub before running the docker?

You can follow the instruction here to get the checkpoint. https://www.kaggle.com/models/google/gemma/frameworks/pyTorch

I have confirmed that I have downloaded the model, but I am still encountering this error regardless of whether I specify the path where the model was downloaded or the path to the model file itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author type:support Support issues
Projects
None yet
Development

No branches or pull requests

4 participants