Skip to content

Convert.py @staticmethod - #1327

Merged
ivanstepanovftw merged 2 commits into
ggml-org:masterfrom
blecaillon:patch-1
May 5, 2023
Merged

ivanstepanovftw merged 2 commits into
ggml-org:masterfrom
blecaillon:patch-1

Conversation

@blecaillon

@blecaillon blecaillon commented May 4, 2023 •

Copy link
Copy Markdown
Contributor

At line 698, @staticmethod before lazy_rebuild_tensor_V2 throws error at unpickle.load() as not callable

otherwise throw error at unpickle.load() as not callable
@blecaillon blecaillon changed the title Line 698 has one #staticmethod and should not Conert.py @staticmethod May 4, 2023
@blecaillon blecaillon changed the title Conert.py @staticmethod Convert.py @staticmethod May 4, 2023
@ivanstepanovftw

ivanstepanovftw commented May 4, 2023 •

Copy link
Copy Markdown
Contributor

Can you please share error message, OS name and python version? Just curious, can't reproduce..

@ivanstepanovftw ivanstepanovftw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 709 should be removed too then

@blecaillon

Copy link
Copy Markdown
Contributor Author

So I am running Python 3.9 on macOs 13.3.1 (a)

Here is the error (once i comment line 698, working great:)):

LLama.cpp % python3 convertTest.py ../llama-7b
Loading model file ../llama-7b/pytorch_model-00001-of-00002.bin
Traceback (most recent call last):
File "Users/LLM/llama.cpp/convertTest.py", line 1173, in
main()
File "/Users/LLM/llama.cpp/convertTest.py", line 1153, in main
model_plus = load_some_model(args.model)
File "/Users/LLM/llama.cpp/convertTest.py", line 1079, in load_some_model
models_plus.append(lazy_load_file(path))
File "/Users/LLM/llama.cpp/convertTest.py", line 873, in lazy_load_file
return lazy_load_torch_file(fp, path)
File "/Users/LLM/llama.cpp/convertTest.py", line 745, in lazy_load_torch_file
model = unpickler.load()
TypeError: 'staticmethod' object is not callable

@ivanstepanovftw

Copy link
Copy Markdown
Contributor

Reproduced with python 3.9 on fedora

@ivanstepanovftw
ivanstepanovftw merged commit a90e96b into ggml-org:master May 5, 2023
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* Line 698 has one #staticmethod and should not

otherwise throw error at unpickle.load() as not callable

* Update convert.py

---------

Co-authored-by: Ivan Stepanov <ivanstepanovftw@gmail.com>
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
* Line 698 has one #staticmethod and should not

otherwise throw error at unpickle.load() as not callable

* Update convert.py

---------

Co-authored-by: Ivan Stepanov <ivanstepanovftw@gmail.com>
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
* Line 698 has one #staticmethod and should not

otherwise throw error at unpickle.load() as not callable

* Update convert.py

---------

Co-authored-by: Ivan Stepanov <ivanstepanovftw@gmail.com>
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
* Line 698 has one #staticmethod and should not

otherwise throw error at unpickle.load() as not callable

* Update convert.py

---------

Co-authored-by: Ivan Stepanov <ivanstepanovftw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants