Model reference · open weights
ruri-reranker-large is an open-weight embedding model from cl-nagoya. 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 | cl-nagoya |
|---|---|
| Type | Embedding models |
| Task | Reranker |
| Parameters (lead) | 337M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Based on | cl-nagoya/ruri-reranker-stage1-large |
| Released | 2024-08-20 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import CrossEncoder
# Download from the 🤗 Hub
model = CrossEncoder("cl-nagoya/ruri-reranker-large")
inputs = [
[
"瑠璃色はどんな色?",
"瑠璃色(るりいろ)は、紫みを帯びた濃い青。名は、半貴石の瑠璃(ラピスラズリ、英: lapis lazuli)による。JIS慣用色名では「こい紫みの青」(略号 dp-pB)と定義している[1][2]。",
],
[
"瑠璃色はどんな色?",
"ワシ、タカ、ハゲワシ、ハヤブサ、コンドル、フクロウが代表的である。これらの猛禽類はリンネ前後の時代(17~18世紀)には鷲類・鷹類・隼類及び梟類に分類された。ちなみにリンネは狩りをする鳥を単一の目(もく)にまとめ、vultur(コンドル、ハゲワシ)、falco(ワシ、タカ、ハヤブサなど)、strix(フクロウ)、lanius(モズ)の4属を含めている。",
],
[
"ワシやタカのように、鋭いくちばしと爪を持った大型の鳥類を総称して「何類」というでしょう?",
"ワシ、タカ、ハゲワシ、ハヤブサ、コンドル、フクロウが代表的である。これらの猛禽類はリンネ前後の時代(17~18世紀)には鷲類・鷹類・隼類及び梟類に分類された。ちなみにリンネは狩りをする鳥を単一の目(もく)にまとめ、vultur(コンドル、ハゲワシ)、falco(ワシ、タカ、ハヤブサなど)、strix(フクロウ)、lanius(モズ)の4属を含めている。",
],
[
"ワシやタカのように、鋭いくちばしと爪を持った大型の鳥類を総称して「何類」というでしょう?",
"瑠璃色(るりいろ)は、紫みを帯びた濃い青。名は、半貴石の瑠璃(ラピスラズリ、英: lapis lazuli)による。JIS慣用色名では「こい紫みの青」(略号 dp-pB)と定義している[1][2]。",
],
]
scores = model.predict(inputs)
print(scores)
# [0.99999535 0.7374149 0.9970592 0.00682232]
result = model.rank(
query="瑠璃色はどんな色?",
documents=[
"ワシ、タカ、ハゲワシ、ハヤブサ、コンドル、フクロウが代表的である。これらの猛禽類はリンネ前後の時代(17~18世紀)には鷲類・鷹類・隼類及び梟類に分類された。ちなみにリンネは狩りをする鳥を単一の目(もく)にまとめ、vultur(コンドル、ハゲワシ)、falco(ワシ、タカ、ハヤブサなど)、strix(フクロウ)、lanius(モズ)の4属を含めている。",
"瑠璃、または琉璃(るり)は、仏教の七宝の一つ。サンスクリットの vaiḍūrya またはそのプラークリット形の音訳である。金緑石のこととも、ラピスラズリであるともいう[1]。",
"瑠璃色(るりいろ)は、紫みを帯びた濃い青。名は、半貴石の瑠璃(ラピスラズリ、英: lapis lazuli)による。JIS慣用色名では「こい紫みの青」(略号 dp-pB)と定義している[1][2]。",
],
)
print(result)
# [
# {'corpus_id': 2, 'score': 0.99999535},
# {'corpus_id': 1, 'score': 0.97759527},
# {'corpus_id': 0, 'score': 0.73741615},
# ]
| Model | #Param.(w/o Emb.) | JQaRA | JaCWIR | MIRACL |
|---|---|---|---|---|
| hotchpotch/japanese-reranker-cross-encoder-xsmall-v1 | 107M(11M) | 61.4 | 93.8 | 90.6 |
| hotchpotch/japanese-reranker-cross-encoder-small-v1 | 118M(21M) | 62.5 | 93.9 | 92.2 |
| hotchpotch/japanese-reranker-cross-encoder-base-v1 | 111M(86M) | 67.1 | 93.4 | 93.3 |
| hotchpotch/japanese-reranker-cross-encoder-large-v1 | 337M(303M) | 71.0 | 93.6 | 91.5 |
| hotchpotch/japanese-bge-reranker-v2-m3-v1 | 568M(303M) | 69.2 | 93.7 | 94.7 |
| BAAI/bge-reranker-v2-m3 | 568M(303M) | 67.3 | 93.4 | 94.9 |
| Ruri-Reranker-Small | 68M(43M) | 64.5 | 92.6 | 92.3 |
| Ruri-Reranker-Base | 111M(86M) | 74.3 | 93.5 | 95.6 |
| Ruri-Reranker-Large (this model) | 337M(303M) | 77.1 | 94.1 | 96.1 |
This model is published under the Apache License, Version 2.0.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys ruri-reranker-large for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (ruri-reranker-large 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":"ruri-reranker-large","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.