--- license: apache-2.0 base_model: google/embeddinggemma-2 pipeline_tag: feature-extraction library_name: coreml tags: - embedding - coreml - apple-neural-engine --- # EmbeddingGemma 2 (text) for Core ML and the Apple Neural Engine A Core ML conversion of the text model of [google/embeddinggemma-2](https://huggingface.co/google/embeddinggemma-2) (revision `914f7f89142e33e77833254d9c9b90c3cef7303b`), made by Nemosine for on-device search on iOS 18+ and macOS 15+. Converted with `nemos/tool/coreml_embedding/convert_gemma2.py`. - Text only (no vision or audio encoders), 768-dimensional output with Matryoshka truncation to 512/256/128 as in the original. - Float16 weights and compute, no quantization or pruning. - One multifunction package: `s128`, `s256`, `s512`, `s1024`, `s2048` (fixed sequence lengths sharing one copy of the weights). - Inputs: `input_ids` (int32, BOS … EOS, zero-padded) and `attention_mask` (float32, 1 for tokens, 0 for padding). Output: `embedding`, a mean-pooled, L2-normalized 768-d vector. - Prompts are the original model's: `task: search result | query: {query}` and `title: {title | none} | text: {text}`. - Agreement with the original float32 model: see `conversion_report.json`. ## License and modifications EmbeddingGemma 2 is developed by Google DeepMind and released under the Apache License 2.0 (see LICENSE). This repository contains a modified version; NOTICE describes the modifications. Use is subject to the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy). Google DeepMind and Gemma are named only to identify the origin of the work; this conversion is not endorsed by them.