Model reference · open weights
MiniLM-L6-danish-reranker is an open-weight embedding model from KennethTM. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | KennethTM |
|---|---|
| Type | Embedding models |
| Task | Reranker |
| Parameters (lead) | 23M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2024-01-12 |
| Popularity | 559 downloads / month |
| Licence | Open weights |
About
New version available, trained on more data and otherwise identical KennethTM/MiniLM-L6-danish-reranker-v2
This is a lightweight (~22 M parameters) sentence-transformers model for Danish NLP: It takes two sentences as input and outputs a relevance score. Therefore, the model can be used for information retrieval, e.g. given a query and candidate matches, rank the candidates by their relevance.
The maximum sequence length is 512 tokens (for both passages).
The model was not pre-trained from scratch but adapted from the English version of cross-encoder/ms-marco-MiniLM-L-6-v2 with a Danish tokenizer.
Trained on ELI5 and SQUAD data machine translated from English to Danish.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model = AutoModelForSequenceClassification.from_pretrained('KennethTM/MiniLM-L6-danish-reranker')
tokenizer = AutoTokenizer.from_pretrained('KennethTM/MiniLM-L6-danish-reranker')
features = tokenizer(['Kører der cykler på vejen?', 'Kører der cykler på vejen?'], ['En panda løber på vejen.', 'En mand kører hurtigt forbi på cykel.'], padding=True, truncation=True, return_tensors="pt")
model.eval()
with torch.no_grad():
scores = model(**features).logits
print(scores)
The usage becomes easier when you have SentenceTransformers installed. Then, you can use the pre-trained models like this:
from sentence_transformers import CrossEncoder
model = CrossEncoder('KennethTM/MiniLM-L6-danish-reranker', max_length=512)
scores = model.predict([('Kører der cykler på vejen?', 'En panda løber på vejen.'), ('Kører der cykler på vejen?', 'En mand kører hurtigt forbi på cykel.')])
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys minilm-l6-danish-reranker for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (minilm-l6-danish-reranker below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minilm-l6-danish-reranker","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.