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
File size: 1,820 Bytes
336c50f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #!/usr/bin/env python3
"""Run upstream conversion with a lossless Transformers 5 -> 4 config adapter.
The pinned upstream requirements use Transformers 4.57.6. Google's tokenizer
configuration uses Transformers 5's list-valued extra_special_tokens and
model_specific_special_tokens mapping. Supply the equivalent Transformers 4
arguments in memory; leave all checkpoint and upstream tool files untouched.
"""
import json
import pathlib
import runpy
import sys
from tokenizers import Tokenizer
from transformers import AutoTokenizer
root = pathlib.Path(__file__).resolve().parents[1]
original_loader = AutoTokenizer.from_pretrained
def load_compatible(model_path, *args, **kwargs):
path = pathlib.Path(model_path)
config = json.loads((path / "tokenizer_config.json").read_text())
extra = config.get("extra_special_tokens")
if isinstance(extra, list):
kwargs["extra_special_tokens"] = config["model_specific_special_tokens"]
kwargs["additional_special_tokens"] = extra
tokenizer = original_loader(model_path, *args, **kwargs)
original = Tokenizer.from_file(str(path / "tokenizer.json"))
assert tokenizer.get_vocab() == original.get_vocab(), "Tokenizer vocabulary or IDs changed"
for name, token in config.get("model_specific_special_tokens", {}).items():
assert tokenizer.convert_tokens_to_ids(token) == original.token_to_id(token), name
assert token in tokenizer.all_special_tokens, name
print(f"Tokenizer compatibility audit: all {len(tokenizer)} token strings/IDs preserved; all model-specific special tokens preserved.", flush=True)
return tokenizer
AutoTokenizer.from_pretrained = staticmethod(load_compatible)
sys.path.insert(0, str(root / "llama.cpp"))
runpy.run_path(str(root / "llama.cpp/convert_hf_to_gguf.py"), run_name="__main__")
|