Instructions to use leeroy-jankins/boogr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use leeroy-jankins/boogr with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("leeroy-jankins/boogr") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use leeroy-jankins/boogr with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf leeroy-jankins/boogr:Q8_0 # Run inference directly in the terminal: llama cli -hf leeroy-jankins/boogr:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf leeroy-jankins/boogr:Q8_0 # Run inference directly in the terminal: llama cli -hf leeroy-jankins/boogr:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf leeroy-jankins/boogr:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf leeroy-jankins/boogr:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf leeroy-jankins/boogr:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf leeroy-jankins/boogr:Q8_0
Use Docker
docker model run hf.co/leeroy-jankins/boogr:Q8_0
- LM Studio
- Jan
- Ollama
How to use leeroy-jankins/boogr with Ollama:
ollama run hf.co/leeroy-jankins/boogr:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use leeroy-jankins/boogr with Docker Model Runner:
docker model run hf.co/leeroy-jankins/boogr:Q8_0
- Lemonade
How to use leeroy-jankins/boogr with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leeroy-jankins/boogr:Q8_0
Run and chat with the model
lemonade run user.boogr-Q8_0
List all available models
lemonade list
- Atomic Chat
✨ Overview
Boogr is derived from Google's Emeddinggemma.
The upstream model family is designed for dense retrieval and text embedding tasks such as:
- semantic search
- document retrieval
- chunk similarity
- passage ranking
- clustering
- sentence-level representation learning
Within Chonky, Boogr is the lightweight local English embedding option and is best suited for:
- default local installations
- offline embedding workflows
- rapid experimentation
- development and testing
- vectorizing chunked corpora on lower-resource systems
⚙️ Code Respository
🧰 Streamlit UI
🧠 Why Boogr Exists
Chonky supports both hosted and local embedding workflows. Boogr exists to give Chonky users a fully local, low-friction embedding path that avoids dependence on hosted provider APIs for common semantic-search tasks.
Boogr is especially useful when you want:
- local-only embeddings
- offline or restricted-network operation
- lower memory use than larger embedding models
- an English-first default embedder
- a model that is straightforward to distribute with the application
🔬 Base Model Lineage
Boogr is derived from:
Description
Boogr is a 300M parameter, state-of-the-art for its size, open embedding model from Google, built from Gemma 3 (with T5Gemma initialization) and the same research and technology used to create Gemini models. EmbeddingGemma produces vector representations of text, making it well-suited for search and retrieval tasks, including classification, clustering, and semantic similarity search. This model was trained with data in 100+ spoken languages.
The small size and on-device focus makes it possible to deploy in environments with limited resources such as mobile phones, laptops, or desktops, democratizing access to state of the art AI models and helping foster innovation for everyone.
Inputs and outputs
Input:
- Text string, such as a question, a prompt, or a document to be embedded
- Maximum input context length of 2048 tokens
Output:
- Numerical vector representations of input text data
- Output embedding dimension size of 768, with smaller options available (512, 256, or 128) via Matryoshka Representation Learning (MRL). MRL allows users to truncate the output embedding of size 768 to their desired size and then re-normalize for efficient and accurate representation.
Usage
These model weights are designed to be used with Sentence Transformers, using the Gemma 3 implementation from Hugging Face Transformers as the backbone.
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("google/embeddinggemma-300m")
# Run inference with queries and documents
query = "Which planet is known as the Red Planet?"
documents = [
"Venus is often called Earth's twin because of its similar size and proximity.",
"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
"Jupiter, the largest planet in our solar system, has a prominent red spot.",
"Saturn, famous for its rings, is sometimes mistaken for the Red Planet."
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# (768,) (4, 768)
# Compute similarities to determine a ranking
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.3011, 0.6359, 0.4930, 0.4889]])
Model Development
Hardware
EmbeddingGemma was trained using the latest generation of Tensor Processing Unit (TPU) hardware (TPUv5e), for more details refer to the Gemma 3 model card.
Software
Training was done using JAX and ML Pathways. For more details refer to the Gemma 3 model card.
Evaluation
Benchmark Results
The model was evaluated against a large collection of different datasets and metrics to cover different aspects of text understanding.
Full Precision Checkpoint
| MTEB (Multilingual, v2) | ||
|---|---|---|
| Dimensionality | Mean (Task) | Mean (TaskType) |
| 768d | 61.15 | 54.31 |
| 512d | 60.71 | 53.89 |
| 256d | 59.68 | 53.01 |
| 128d | 58.23 | 51.77 |
| MTEB (English, v2) | ||
|---|---|---|
| Dimensionality | Mean (Task) | Mean (TaskType) |
| 768d | 68.36 | 64.15 |
| 512d | 67.80 | 63.59 |
| 256d | 66.89 | 62.94 |
| 128d | 65.09 | 61.56 |
| MTEB (Code, v1) | ||
|---|---|---|
| Dimensionality | Mean (Task) | Mean (TaskType) |
| 768d | 68.76 | 68.76 |
| 512d | 68.48 | 68.48 |
| 256d | 66.74 | 66.74 |
| 128d | 62.96 | 62.96 |
QAT Checkpoints
| MTEB (Multilingual, v2) | ||
|---|---|---|
| Quant config (dimensionality) | Mean (Task) | Mean (TaskType) |
| Q4_0 (768d) | 60.62 | 53.61 |
| Q8_0 (768d) | 60.93 | 53.95 |
| Mixed Precision* (768d) | 60.69 | 53.82 |
| MTEB (English, v2) | ||
|---|---|---|
| Quant config (dimensionality) | Mean (Task) | Mean (TaskType) |
| Q4_0 (768d) | 67.91 | 63.64 |
| Q8_0 (768d) | 68.13 | 63.85 |
| Mixed Precision* (768d) | 67.95 | 63.83 |
| MTEB (Code, v1) | ||
|---|---|---|
| Quant config (dimensionality) | Mean (Task) | Mean (TaskType) |
| Q4_0 (768d) | 67.99 | 67.99 |
| Q8_0 (768d) | 68.70 | 68.70 |
| Mixed Precision* (768d) | 68.03 | 68.03 |
Note: QAT models are evaluated after quantization
* Mixed Precision refers to per-channel quantization with int4 for embeddings, feedforward, and projection layers, and int8 for attention (e4_a8_f4_p4).
Prompt Instructions
EmbeddingGemma can generate optimized embeddings for various use cases—such as document retrieval, question answering, and fact verification—or for specific input types—either a query or a document—using prompts that are prepended to the input strings.
Query prompts follow the form task: {task description} | query: where the task description varies by the use case, with the default task description being search result. Document-style prompts follow the form title: {title | "none"} | text: where the title is either none (the default) or the actual title of the document. Note that providing a title, if available, will improve model performance for document prompts but may require manual formatting.
Use the following prompts based on your use case and input data type. These may already be available in the EmbeddingGemma configuration in your modeling framework of choice.
Use Case (task type enum) |
Descriptions |
Recommended Prompt |
|---|---|---|
Retrieval (Query) |
Used to generate embeddings that are optimized for document search or information retrieval |
task: search result | query: {content} |
Retrieval (Document) |
title: {title | "none"} | text: {content} |
|
Question Answering |
task: question answering | query: {content} |
|
Fact Verification |
task: fact checking | query: {content} |
|
Classification |
Used to generate embeddings that are optimized to classify texts according to preset labels |
task: classification | query: {content} |
Clustering |
Used to generate embeddings that are optimized to cluster texts based on their similarities |
task: clustering | query: {content} |
Semantic Similarity |
Used to generate embeddings that are optimized to assess text similarity. This is not intended for retrieval use cases. |
task: sentence similarity | query: {content} |
Code Retrieval |
Used to retrieve a code block based on a natural language query, such as sort an array or reverse a linked list. Embeddings of the code blocks are computed using retrieval_document. |
task: code retrieval | query: {content} |
Usage and Limitations
These models have certain limitations that users should be aware of.
Intended Usage
Open embedding models have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development.
Semantic Similarity: Embeddings optimized to assess text similarity, such as recommendation systems and duplicate detection
Classification: Embeddings optimized to classify texts according to preset labels, such as sentiment analysis and spam detection
Clustering: Embeddings optimized to cluster texts based on their similarities, such as document organization, market research, and anomaly detection
Retrieval
- Document: Embeddings optimized for document search, such as indexing articles, books, or web pages for search
- Query: Embeddings optimized for general search queries, such as custom search
- Code Query: Embeddings optimized for retrieval of code blocks based on natural language queries, such as code suggestions and search
Question Answering: Embeddings for questions in a question-answering system, optimized for finding documents that answer the question, such as chatbox.
Fact Verification: Embeddings for statements that need to be verified, optimized for retrieving documents that contain evidence supporting or refuting the statement, such as automated fact-checking systems.
Limitations
Training Data
- The quality and diversity of the training data significantly influence the model's capabilities. Biases or gaps in the training data can lead to limitations in the model's responses.
- The scope of the training dataset determines the subject areas the model can handle effectively.
Language Ambiguity and Nuance
- Natural language is inherently complex. Models might struggle to grasp subtle nuances, sarcasm, or figurative language.
- Downloads last month
- 28
8-bit
Model tree for leeroy-jankins/boogr
Base model
google/embeddinggemma-300m