Skip to content

Conversation

bartowski1182
Copy link
Contributor

@bartowski1182 bartowski1182 commented Sep 30, 2025

layer.nextn.shared_head_head and layer.nextn.embed_tokens are both excluded from GLM 4.6 resulting in the model not loading after conversion/quantization, this marks those tensors as not required which makes it work

Before this change I got llama_model_load: error loading model: missing tensor 'blk.92.nextn.embed_tokens.weight'

With this change the model loads and runs successfully

Thanks compilade for pointing in the right direction

Workaround for conversion should anyone else come across this:

convert_hf_to_gguf.py currently only looks at model*.safetensor files

if you rename mtp.safetensors to model-mtp.safetensors it will work properly

Make sure to read the contributing guidelines before submitting a PR

layer.nextn.shared_head_head and layer.nextn.embed_tokens are both excluded from GLM 4.6 resulting in the model not loading after conversion/quantization, this marks those tensors as not required which makes it work
@bartowski1182 bartowski1182 requested a review from CISC as a code owner September 30, 2025 19:57
@bartowski1182 bartowski1182 changed the title Make a few GLM tensors not required Make a few GLM tensors not required (to support GLM 4.6) Sep 30, 2025
@CISC CISC merged commit e74c92e into ggml-org:master Sep 30, 2025
1 check passed
@CISC
Copy link
Collaborator

CISC commented Sep 30, 2025

Life's too short for CIs (I checked locally). :)

@bartowski1182
Copy link
Contributor Author

Thanks CISC! <3

yael-works pushed a commit to yael-works/llama.cpp that referenced this pull request Oct 15, 2025
…gml-org#16359)

* Make a few GLM tensors not required

layer.nextn.shared_head_head and layer.nextn.embed_tokens are both excluded from GLM 4.6 resulting in the model not loading after conversion/quantization, this marks those tensors as not required which makes it work

* Update llama-model.cpp

layer.nextn.shared_head_norm also not required in case of future models
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