Instructions to use brokkai/Muninn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use brokkai/Muninn with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("brokkai/Muninn", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Muninn
Muninn is a 346M-parameter multilingual retriever for natural-language-query → code-function retrieval, with an 8,192-token serving context and 2,048-dimensional embeddings.
It is trained from voyageai/voyage-4-nano and uses a bidirectional Qwen3 encoder.
Muninn supports Matryoshka truncation at 512, 1,024, 1,536, and 2,048 dimensions. We
recommend 2,048 dimensions: that is the native evaluation setting, and truncating to 512
cost roughly two recall points at depth on Quarry.
Usage
Muninn requires trust_remote_code=True because this repository includes the custom
Qwen3BidirectionalModel implementation.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"BrokkAI/Muninn",
trust_remote_code=True,
truncate_dim=2048,
)
model.max_seq_length = 8192
queries = ["Where is retry backoff calculated for failed HTTP requests?"]
documents = [
"src/net/client.py/HttpClient/retry_delay\n"
"class HttpClient:def retry_delay(self, attempt):\n"
" return min(60, 2 ** attempt)"
]
query_embeddings = model.encode(queries, prompt_name="query", normalize_embeddings=True)
document_embeddings = model.encode(
documents, prompt_name="document", normalize_embeddings=True
)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
The exact inference prompts are:
query: Represent the query for retrieving supporting documents:
document: Represent the document for retrieval:
Document format
Quarry results use the header format produced by swerank_document_text() before the
document prompt is applied. For a free function:
{path}/{function_name}
{source}
For a class method:
{path}/{ClassName}/{function_name}
class {ClassName}:{source}
The worked usage example above is therefore the exact representation of a method named
HttpClient.retry_delay in src/net/client.py. Preserve this shape when comparing against
reported results.
Quarry results
Quarry contains 6,525 synthetic behavioral
queries over real repository revisions. The metric is strict all-gold micro recall@k: for
each query, |gold ∩ top-k| / |gold|, followed by a flat mean over queries. Models use their
native dimensions and the header document format above.
TODO: Competitive results are being rerun and will be added here when the complete comparison is finalized.
Languages
C, C++, C#, Go, Java, JavaScript, PHP, Python, Rust, Scala, and TypeScript.
License and attribution
Muninn is released under the Apache License 2.0. It is derived from
voyageai/voyage-4-nano, also released
under Apache-2.0. See LICENSE for the full license text.
- Downloads last month
- -
Model tree for brokkai/Muninn
Base model
voyageai/voyage-4-nano