]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model : add grok-2 support (#15539)
authorSigbjørn Skjæret <redacted>
Sun, 14 Sep 2025 21:00:59 +0000 (23:00 +0200)
committerGitHub <redacted>
Sun, 14 Sep 2025 21:00:59 +0000 (23:00 +0200)
commitb8e09f08b9a91c0401bc67d17a17c90756420346
tree88e907803f3fc85d8d24d682887967e4b51ac875
parent6c019cb04e86e2dacfe62ce7666c64e9717dde1f
model : add grok-2 support (#15539)

* add grok-2 support

* type fix

* type fix

* type fix

* "fix" vocab for invalid sequences

* fix expert tensor mapping and spaces in vocab

* add chat template

* fix norm tensor mapping

* rename layer_out_norm to ffn_post_norm

* ensure ffn_post_norm is mapped

* fix experts merging

* remove erroneous FFN_GATE entry

* concatenate split tensors and add more metadata

* process all expert layers and try cat instead of hstack

* add support for community BPE vocab

* fix expert feed forward length and ffn_down concat

* commit this too

* add ffn_up/gate/down, unsure if sequence is right

* add ffn_gate/down/up to tensor names

* correct residual moe (still not working)

* mess--

* fix embedding scale being applied twice

* add built in chat template

* change beta fast for grok if default value

* remove spm vocab in favor of community bpe vocab

* change attention temp length metadata type to integer

* update attention temp length metadata

* remove comment

* replace M_SQRT2 with std::sqrt(2)

* add yarn metadata, move defaults to hparams
16 files changed:
common/common.h
convert_hf_to_gguf.py
convert_hf_to_gguf_update.py
gguf-py/gguf/constants.py
gguf-py/gguf/gguf_writer.py
gguf-py/gguf/tensor_mapping.py
src/llama-arch.cpp
src/llama-arch.h
src/llama-chat.cpp
src/llama-chat.h
src/llama-context.cpp
src/llama-graph.cpp
src/llama-hparams.h
src/llama-model.cpp
src/llama-vocab.cpp
src/llama-vocab.h