Feature Extraction
GGUF
llama.cpp
embeddings
multimodal
vision
audio
image-feature-extraction
audio-feature-extraction
Instructions to use MirrorNeuronLab/embeddinggemma-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MirrorNeuronLab/embeddinggemma-2-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M --embeddings
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible embeddings server: ./build/bin/llama serve -hf MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M --embeddings
- Llama new
- LM Studio
- Jan
- Ollama
How to use MirrorNeuronLab/embeddinggemma-2-GGUF with Ollama:
ollama run hf.co/MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use MirrorNeuronLab/embeddinggemma-2-GGUF with Docker Model Runner:
docker model run hf.co/MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M
- Lemonade
How to use MirrorNeuronLab/embeddinggemma-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MirrorNeuronLab/embeddinggemma-2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.embeddinggemma-2-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download reproduce/scripts/validate_dmr.py from MirrorNeuronLab/embeddinggemma-2-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 1.93 kB
-
https://huggingface.co/MirrorNeuronLab/embeddinggemma-2-GGUF/resolve/main/reproduce/scripts/validate_dmr.py
- Command line
-
hf download hf://MirrorNeuronLab/embeddinggemma-2-GGUF/reproduce/scripts/validate_dmr.py
-
curl -L -o validate_dmr.py https://huggingface.co/MirrorNeuronLab/embeddinggemma-2-GGUF/resolve/main/reproduce/scripts/validate_dmr.py
1.93 kB
| #!/usr/bin/env python3 | |
| import argparse | |
| import json | |
| from validation_common import ROOT, TEXTS, content_audio, content_image, cosine, fixtures, post | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--base-url", default="http://127.0.0.1:12435") | |
| parser.add_argument("--model", default="mirrorneuronlab/embeddinggemma-2:q4_k_m") | |
| args = parser.parse_args() | |
| url = args.base_url.rstrip("/") + "/engines/llama.cpp/v1/embeddings" | |
| def request(name, inputs): | |
| return post(url, dict(model=args.model, input=inputs, encoding_format="float"), "dmr-"+name) | |
| vectors, text = request("text", TEXTS) | |
| text.update(related_cosine=cosine(vectors[0], vectors[1]), unrelated_cosine=cosine(vectors[0], vectors[2])) | |
| assert text["related_cosine"] > text["unrelated_cosine"] | |
| repeat, repeated = request("repeat", TEXTS) | |
| repeated["max_abs_difference"] = max(abs(x-y) for a,b in zip(vectors, repeat) for x,y in zip(a,b)) | |
| assert repeated["max_abs_difference"] < 1e-5 | |
| reference = json.loads((ROOT / "logs/bf16-text.response.json").read_text()) | |
| reference = [item["embedding"] for item in sorted(reference["data"], key=lambda x: x["index"])] | |
| bf16_cosines = [cosine(a, b) for a, b in zip(vectors, reference)] | |
| assert min(bf16_cosines) > 0.90 | |
| image_path, audio_path = fixtures() | |
| _, image = request("image", [content_image(image_path)]) | |
| _, audio = request("audio", [content_audio(audio_path)]) | |
| _, mixed = request("mixed-batch", [TEXTS[0], content_image(image_path), content_audio(audio_path)]) | |
| report = dict(passed=True, model=args.model, endpoint=url, text=text, repeat=repeated, | |
| cosine_to_bf16_text=bf16_cosines, image=image, audio=audio, mixed_batch=mixed, | |
| scope="Functional smoke checks on four texts, one solid-color image, and one synthetic audio tone. Not a retrieval or multimodal quality benchmark.") | |
| (ROOT / "logs/dmr-validation.json").write_text(json.dumps(report, indent=2)+"\n") | |
| print(json.dumps(report, indent=2)) | |