Reranker (CJK, small)
Try it in your browser: CheezOne/reranker-cjk-demo (transformers.js, int8, no server).
A 141M-parameter cross-encoder reranker for RAG and search in Chinese, Japanese, Korean and other languages. It is Apache-2.0 and runs on CPU.
It is distilled from BAAI/bge-reranker-v2-m3: the average score is 2.2 nDCG points lower and it runs 3.7× faster.
Quick start
from sentence_transformers import CrossEncoder
model = CrossEncoder("CheezOne/reranker-cjk-small")
model.rank("如何办理护照?", ["办理护照需要携带身份证到出入境管理局申请。", "今天北京天气晴朗。"])
Use in your RAG stack
LangChain (langchain 1.x):
from langchain_community.cross_encoders import HuggingFaceCrossEncoder
from langchain_classic.retrievers.document_compressors import CrossEncoderReranker # langchain<1.0: langchain.retrievers.document_compressors
reranker = CrossEncoderReranker(model=HuggingFaceCrossEncoder(model_name="CheezOne/reranker-cjk-small"), top_n=5)
docs = reranker.compress_documents(docs, query)
LlamaIndex:
from llama_index.core.postprocessor import SentenceTransformerRerank
reranker = SentenceTransformerRerank(model="CheezOne/reranker-cjk-small", top_n=5)
nodes = reranker.postprocess_nodes(nodes, query_str=query)
Haystack 3 (pip install sentence-transformers-haystack):
from haystack_integrations.components.rankers.sentence_transformers import SentenceTransformersSimilarityRanker
ranker = SentenceTransformersSimilarityRanker(model="CheezOne/reranker-cjk-small", top_k=5); ranker.warm_up()
ranker.run(query=query, documents=documents)
transformers.js (browser / Node, int8 ONNX):
import { AutoTokenizer, AutoModelForSequenceClassification } from "@huggingface/transformers";
const tok = await AutoTokenizer.from_pretrained("CheezOne/reranker-cjk-small");
const model = await AutoModelForSequenceClassification.from_pretrained("CheezOne/reranker-cjk-small", { dtype: "q8" });
const inputs = tok([query, query], { text_pair: [docA, docB], padding: true, truncation: true });
const scores = (await model(inputs)).logits.data; // higher = more relevant
All snippets above were run against this repo (2026-11-27). The model also loads on transformers 4.x.
Results (MIRACL reranking, nDCG@10)
| model | zh | ja | ko | th | id | en | avg |
|---|---|---|---|---|---|---|---|
| this model (141M) | 0.525 | 0.716 | 0.727 | 0.788 | 0.608 | 0.629 | 0.666 |
| BAAI/bge-reranker-v2-m3 (568M, our teacher) | 0.546 | 0.738 | 0.722 | 0.813 | 0.658 | 0.649 | 0.688 |
| hotchpotch/japanese-reranker-cross-encoder-small-v1 (118M) | 0.510 | 0.678 | 0.696 | 0.785 | 0.580 | 0.609 | 0.643 |
| cross-encoder/mmarco-mMiniLMv2-L12-H384-v1 (118M) | 0.498 | 0.640 | 0.679 | 0.768 | 0.552 | 0.580 | 0.620 |
| BAAI/bge-reranker-base (278M) | 0.460 | 0.561 | 0.586 | 0.686 | 0.508 | 0.552 | 0.559 |
Head-to-head with the other small mmBERT reranker. Same 100 queries per language for both models, run on CPU:
| model | zh | ja | ko | th | id | en | avg |
|---|---|---|---|---|---|---|---|
| this model | 0.534 | 0.707 | 0.719 | 0.786 | 0.567 | 0.650 | 0.661 |
| Horizon-Labs/multilingual-reranker-small | 0.527 | 0.701 | 0.693 | 0.779 | 0.567 | 0.649 | 0.653 |
The two models are on par. Only the Korean gap is clearly larger than the noise on 100 queries. Horizon-Labs' model was trained on MIRACL's training split; this one was not.
Good to know
- Scores are raw logits; apply a sigmoid for values in 0–1. Context up to 8k tokens; trained at 384.
- ONNX:
onnx/model.onnx(fp32) andonnx/model_quantized.onnx(int8, 230 MB; nDCG within 0.003 of PyTorch on zh/ja/ko). - Trained mostly on Chinese (77% of groups). Indonesian was never in the training data, so that column is zero-shot.
- Not evaluated on legal, medical or code domains. It is a reranker, not a retriever: use it on top of BM25 or an embedding model.
Details
- Teacher scores:
BAAI/bge-reranker-v2-m3on 551k query–passage pairs. - Data:
CheezOne/reranker-train-chinese-japanese-korean: T2Ranking (zh) and Mr. TyDi (ja/ko/th/en), 51,858 query groups, Apache-2.0. - Loss: listwise KL to the teacher + 0.05 × MSE. 2 epochs, lr 5e-5, max length 384, one L40 GPU.
- Reproduce:
scripts/rr_prep.py→scripts/rr_gpu.py teacher|train|eval→scripts/rr_export_onnx.py. - MIRACL candidate lists come from
mteb/MIRACLReranking. MIRACL queries were removed from our training data; passages can overlap with Mr. TyDi, since both come from Wikipedia.
License and citation
Apache-2.0. Model id: CheezOne/reranker-cjk-small.
@misc{cheezone_reranker_cjk_small,
title = {Reranker (CJK, small)}, author = {CheezOne}, year = {2026},
howpublished = {\url{https://huggingface.co/CheezOne/reranker-cjk-small}}
}
More from CheezOne: prompt-injection-guard-cjk-small · paraphrase-multilingual-MiniLM-L12-v2-zh-ja-ko-en · pixel-art-sprite-generator-16x16