Devotd Github
NewInference & serving

maralski/gemma-embed-swift v0.4.1 — Embedding Package for Apple Silicon

maralski/gemma-embed-swift is a Swift package that computes EmbeddingGemma 2 embeddings on Apple Silicon with its own Metal kernels.

Repositorymaralski/gemma-embed-swift ↗

maralski/gemma-embed-swift is a Swift package that computes EmbeddingGemma 2 embeddings on Apple Silicon with its own Metal kernels.

GitHub description: EmbeddingGemma 2 text, image and audio embeddings in-process optimised for Apple Silicon: a dependency-free Swift package with its own Metal kernels

stars
★ 4
Forks
0
Language
Swift
License
Apache-2.0
Latest release
v0.4.1
Read original source ↗View on GitHub ↗

The latest release of maralski/gemma-embed-swift is v0.4.1. This Swift package runs the text, image and audio encoders of EmbeddingGemma 2 on Apple Silicon. It uses its own Metal kernels, and the embedding computation runs inside the app process. The provided material contains nothing about what changed in v0.4.1, so the specifics cannot be confirmed.

The package is set up to run the model without external machine learning frameworks or llama.cpp. There are no dependencies beyond the Apple SDK, and the model weights have to be downloaded separately. According to the README it can produce 768-dimensional embeddings from the official GGUF weights, and with optional features enabled it embeds images and audio into the same vector space. It also handles mixed text, image and audio input, and it is described as supporting an output dimension reduction option and inputs of up to 8192 tokens. The license is Apache-2.0.

The README has a cosine similarity comparison table against llama.cpp, but the provided material has no figures from that table, so the size of the difference cannot be judged. The verifiable strength is therefore the scope of the implementation, embedding several input types on Apple Silicon without external dependencies, and no performance advantage has been demonstrated.