Skip to content

convert : correct gemma 3n conversion #14450

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented Jun 29, 2025

@ngxson ngxson requested a review from ggerganov June 29, 2025 19:04
@github-actions github-actions bot added the python python script changes label Jun 29, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

Btw, the conversion of pretrained Gemma 3n models fails like this:

python convert_hf_to_gguf.py google/gemma-3n-E4B/ --outfile models/gemma-3n-e4b/ggml-model-f16.gguf --outtype f16

Traceback (most recent call last):
  File "llama.cpp/convert_hf_to_gguf.py", line 6718, in <module>
    main()
  File "llama.cpp/convert_hf_to_gguf.py", line 6712, in main
    model_instance.write()
  File "llama.cpp/convert_hf_to_gguf.py", line 410, in write
    self.prepare_metadata(vocab_only=False)
  File "llama.cpp/convert_hf_to_gguf.py", line 523, in prepare_metadata
    self.set_vocab()
  File "llama.cpp/convert_hf_to_gguf.py", line 4411, in set_vocab
    with open(self.dir_model / "chat_template.jinja") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'google/gemma-3n-E4B/chat_template.jinja'

@danielhanchen
Copy link
Contributor

Oh hi - this looks fine!
Re the jinja template missing - this is for a pretrained model right - I guess it should be an if statement?

@CISC
Copy link
Collaborator

CISC commented Jul 2, 2025

Btw, the conversion of pretrained Gemma 3n models fails like this:

FileNotFoundError: [Errno 2] No such file or directory: 'google/gemma-3n-E4B/chat_template.jinja'

Fixed in #14508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python python script changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants