]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model: EmbeddingGemma Adding Support for SentenceTransformers Dense Modules (#16367)
authorSaba Fallah <redacted>
Thu, 9 Oct 2025 06:39:18 +0000 (08:39 +0200)
committerGitHub <redacted>
Thu, 9 Oct 2025 06:39:18 +0000 (09:39 +0300)
commite08db4259521de493b7aeb49dadf29ebd1ee966a
treeccf94f4d35ffe2349ff9410abbd6f05dc01a7a58
parent12bbc3fa50b6df03318a4451c9a2210200a0b28d
model: EmbeddingGemma Adding Support for SentenceTransformers Dense Modules (#16367)

* model: EmbeddingGemma sentence-transformers dense linear projections support

* model: add support for EmbeddingGemma SentenceTransformers dense linear projections

Adding support for the Dense modules used in EmbeddingGemma models.
EmbeddingGemma is a SentenceTransformers model with additional modules beyond the base Transformer backbone.

See: https://developers.googleblog.com/en/gemma-explained-embeddinggemma-architecture-and-recipe/

* model: add support for EmbeddingGemma SentenceTransformers dense linear projections

- converting model with dense-layers is optional
- introduced dense config params

* Update convert_hf_to_gguf.py

Co-authored-by: Daniel Bevenius <redacted>
* fixed formatting issues

* Update src/llama-graph.cpp

Co-authored-by: Georgi Gerganov <redacted>
* - removed pooling_type_opt, always allow overriding pooling_type
- asserts checking dense features dims

* fix python lint

* fix ubuntu gcc build warning

* - fixed thread-safety test
- moved asserts to load_hparams

* - tidying up code
- simplifying graph-context expecting both dense weights

* minor : add TODO

---------

Co-authored-by: Daniel Bevenius <redacted>
Co-authored-by: Georgi Gerganov <redacted>
12 files changed:
convert_hf_to_gguf.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-context.cpp
src/llama-graph.cpp
src/llama-graph.h
src/llama-hparams.h
src/llama-model.cpp
src/llama-model.h