Thanks to visit codestin.com
Credit goes to github.com

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

Merged
merged 2 commits into from
Jul 3, 2025

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

@ngxson ngxson merged commit 0c2ee38 into ggml-org:master Jul 3, 2025
4 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Jul 3, 2025
* origin/master:
Fix conditional enabling following arch checks for ggml-sycl (ggml-org#14504)
convert : correct gemma 3n conversion (ggml-org#14450)
kv-cache : use ggml_set_rows (ggml-org#14285)
ggml : fix FA mask dim 2 and 3 (ggml-org#14505)
ggml : remove kompute backend (ggml-org#14501)
CUDA: add dynamic shared mem to softmax, refactor general usage (ggml-org#14497)
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