ruri-v3-reranker-310m-mlx
Model Summary
This is an MLX conversion of
cl-nagoya/ruri-v3-reranker-310m, a Japanese reranker
model developed by the Ruri project (Nagoya University / cl-nagoya).
This is an unofficial, community-produced conversion for running the model
natively on Apple Silicon via the mlx-embeddings
package, instead of PyTorch/sentence-transformers. All credit for the original
model goes to the cl-nagoya team.
- Live demo: Ruri Atlas — explore Japanese & English sentence embeddings as a 3-D map in your browser (WebGPU), switch embedding models, toggle the reranker, and see where a prompt-injection lands. Nothing is sent to a server.
Usage
pip install -U mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("masahiroid/ruri-v3-reranker-310m-mlx")
texts = [
"クエリ: 猫はどこにいますか?",
"文章: 猫はソファの上で寝ている。",
]
output = generate(model, tokenizer, texts=texts)
embeddings = output.text_embeds
# cosine similarity
q, d = embeddings[0], embeddings[1]
sim = mx.sum(q * d) / (mx.sqrt(mx.sum(q * q)) * mx.sqrt(mx.sum(d * d)))
print(float(sim))
Specs
| Item | Value |
|---|---|
| Base model | cl-nagoya/ruri-v3-reranker-310m |
| Architecture | ModernBERT |
| Precision | bfloat16 (no quantization) |
| Framework | MLX via mlx-embeddings |
Notes
- This is a community conversion, not an official release from the Ruri / cl-nagoya team.
Security
Audited against its upstream with model-audit-lite: weight format, bundled code, and a machine-readable lineage (ML-BOM). Details, checksums and how to reproduce: SECURITY.md.
モデルの概要
本モデルは、名古屋大学(cl-nagoya)が開発した日本語リランカー(reranker)モデル
cl-nagoya/ruri-v3-reranker-310mを、mlx-embeddings
パッケージでApple Silicon上でネイティブに動かせるようMLX形式に変換した
非公式のコミュニティ版です。原モデルの開発チームに感謝いたします。
- ライブデモ: Ruri Atlas — 日本語・英語の文の埋め込みを、ブラウザ上(WebGPU)で3Dの地図として見られます。埋め込みモデルの切り替え、リランカーのON/OFF、プロンプトインジェクションの効き方の可視化もできます。文章はサーバーに送られません。
実行方法
pip install -U mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("masahiroid/ruri-v3-reranker-310m-mlx")
texts = [
"クエリ: 猫はどこにいますか?",
"文章: 猫はソファの上で寝ている。",
]
output = generate(model, tokenizer, texts=texts)
embeddings = output.text_embeds
# cosine similarity
q, d = embeddings[0], embeddings[1]
sim = mx.sum(q * d) / (mx.sqrt(mx.sum(q * q)) * mx.sqrt(mx.sum(d * d)))
print(float(sim))
スペック仕様
| Item | Value |
|---|---|
| ベースモデル | cl-nagoya/ruri-v3-reranker-310m |
| アーキテクチャ | ModernBERT |
| 精度 | bfloat16(量子化なし) |
| フレームワーク | MLX via mlx-embeddings |
備考
- 本変換は非公式のコミュニティ版です。cl-nagoyaチームによる公式リリースではありません。
セキュリティー
model-audit-lite で変換元と突き合わせて監査済みです(重みの形式、同梱コード、機械可読な系譜=ML-BOM)。詳細・チェックサム・再現方法は SECURITY.md をご覧ください。