Downloads · 30 days
181
31% of all-time downloads
xCloudinfo/xVITA-Rerank-300M-zhTW-GGUF
xVITA-Rerank-300M-zhTW-GGUF is a text ranking model from xCloudinfo. Use it for the text ranking task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
云碩科技(xCloudinfo)自研繁體中文重排序模型(cross-encoder reranker)的GGUF量化版, 供llama.cpp部署使用。RAG檢索第二段:嵌入模型撈出候選段落,本模型逐一細讀 (查詢, 段落)配對重新打分,把真正相關的段落拉到第一名。
Downloads · 30 days
181
31% of all-time downloads
All-time downloads
592
Public
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.2 GB · 100%
From the Hugging Face model README
云碩科技(xCloudinfo)自研繁體中文重排序模型(cross-encoder reranker)的GGUF量化版, 供llama.cpp部署使用。RAG檢索第二段:嵌入模型撈出候選段落,本模型逐一細讀 (查詢, 段落)配對重新打分,把真正相關的段落拉到第一名。
搭配的嵌入模型:xVITA-Embed-300M-zhTW-GGUF。 完整精度權重(safetensors)為私有發行,如有微調或研究合作需求請聯繫云碩科技。
| 檔案 | 大小 | 說明 |
|---|---|---|
xVITA-Rerank-300M-zhTW-f16.gguf | 593 MB | 完整精度,與原版排序完全一致 |
xVITA-Rerank-300M-zhTW-Q8_0.gguf | 318 MB | 推薦。排序品質與f16相同 |
xVITA-Rerank-300M-zhTW-Q4_K_M.gguf | 230 MB | 最省資源;排序保持但分數校準有偏移(見下) |
每一階量化都與原版safetensors用同一組測試(20題 × 6候選含干擾洗牌)比對過:
| 版本 | 正解排名一致 | 分數校準偏差(sigmoid後最大) |
|---|---|---|
| f16 | 20/20(完整排序也20/20) | 0.026 |
| Q8_0 | 20/20 | 0.106 |
| Q4_K_M | 20/20 | 0.672 |
三版的正解排名全部保持;排序差異僅發生在分數趨近零的干擾項互換位置。 Q4_K_M的絕對分數不可靠(校準偏移大),只可用於取排序, 不要拿它的分數當過濾閾值;需要分數閾值請用Q8_0或f16。
llama-server -m xVITA-Rerank-300M-zhTW-Q8_0.gguf \
--rerank --pooling rank --ctx-size 2048 --port 8100
curl http://localhost:8100/v1/rerank -H "Content-Type: application/json" -d '{
"query": "依據海商法,船舶的定義範圍為何?",
"documents": [
"勞動基準法第三十條規定勞工每日正常工作時間不得超過八小時。",
"海商法第一條:本法稱船舶者,謂在海上航行,或在與海相通之水面或水中航行之船舶。"
],
"top_n": 2
}'
回傳的 relevance_score 為原始logit;需要0~1機率請自行套sigmoid。
本模型的底座mmBERT沿用Gemma-2的256k SentencePiece詞表。轉檔時已內嵌 SentencePiece詞表資訊,2026-08之後的llama.cpp版本可直接載入;若載入後 中文被逐字切分(一句話切出3倍以上的token數),代表你的llama.cpp版本過舊,請更新。
| 項目 | 內容 |
|---|---|
| 底座 | jhu-clsp/mmBERT-base(Johns Hopkins,MIT,ModernBERT架構,8192 ctx) |
| 訓練資料 | 云碩自有繁中語料(醫療/台灣通識與法規/海事)三線合併去重252,849對,抽樣60,000對訓練 |
| 困難負例 | 由xVITA-Embed-300M-zhTW從檢索top-2~60挖掘,每題7個 |
| 評測(三領域,各500題、池約3萬段落) | 通識hit@1 79.2→95.0%;醫療38.0→81.8%;海事77.8→99.4% |
上表三個領域的數字取自各自的驗證集;跨批次的絕對分數不可直接互相比較(每次評測會抽出自己的驗證集),同一次評測內的「檢索器vs加上重排序」對照才有意義。
上表量的是訓練過的三個領域,只能證明模型在看過的東西上有效。我們另外量了它在完全沒有 訓練過的語料上還剩多少效果,方法與上表一致:同一顆重排序模型、同一顆檢索器 (xVITA-Embed-300M-zhTW),各500題,比較「只有檢索器」與「檢索器加上重排序」 在同一組查詢上的差異。
| 評測集 | 檢索器hit@1 | 加上重排序hit@1 | nDCG@10提升 |
|---|---|---|---|
| 訓練領域(醫療/通識/海事) | — | 93.3% | +0.2245 |
| 未訓練領域・書面(政府公開文件,檢索池5,132段) | 61.8% | 87.2% | +0.1371 |
| 未訓練文體・口語(會議逐字稿,檢索池4,053段) | 20.8% | 18.8% | +0.0799 |
換領域可用。 完全沒有看過的政府公開文件,hit@1由61.8% 提升到87.2%, nDCG提升仍保有訓練領域的六成。
換文體會弱化。 口語逐字稿上的提升只剩三成六。有兩點必須說清楚,否則這張表會被誤讀:
建議用途:書面文件的RAG,例如法規、公文、技術文件、專業領域知識庫。 若您的查詢或語料屬於會議逐字稿、客服對話等口語文體,請以本節的方法在自己的資料上 先量一次再決定,不要直接套用上表數字。
量測條件:epochs=0 純評測,不更新權重;檢索器與線上部署為同一顆並套用相同檢索前綴;
訓練與驗證以段落(而非配對)切分,避免同一段落的多個問題跨集洩漏;
每輪先跑「段落對自己」的哨兵檢查,兩組均為100%。
MIT,與底座mmBERT-base一致。
云碩科技(xCloudinfo Corp. Limited)專注於地端私有化人工智慧解決方案。xVITA是云碩自研模型的品牌名稱。
其他模型請見 https://hf.co/xCloudinfo。
The GGUF quantized release of xCloudinfo's in-house Traditional Chinese reranker (cross-encoder reranker), for deployment with llama.cpp. It is the second stage of RAG retrieval: the embedding model pulls out candidate passages, and this model reads each (query, passage) pair closely and re-scores it, moving the truly relevant passage up to first place.
Companion embedding model: xVITA-Embed-300M-zhTW-GGUF. The full-precision weights (safetensors) are a private release; for fine-tuning or research collaboration, please contact xCloudinfo.
| File | Size | Notes |
|---|---|---|
xVITA-Rerank-300M-zhTW-f16.gguf | 593 MB | Full precision; ranking identical to the original |
xVITA-Rerank-300M-zhTW-Q8_0.gguf | 318 MB | Recommended. Ranking quality the same as f16 |
xVITA-Rerank-300M-zhTW-Q4_K_M.gguf | 230 MB | Lowest resource use; ranking preserved but score calibration drifts (see below) |
Every quantization tier was compared against the original safetensors on the same test set (20 queries × 6 candidates, including shuffled distractors):
| Version | Correct-answer rank agreement | Score calibration deviation (max, after sigmoid) |
|---|---|---|
| f16 | 20/20 (full ranking also 20/20) | 0.026 |
| Q8_0 | 20/20 | 0.106 |
| Q4_K_M | 20/20 | 0.672 |
The correct-answer rank is preserved in all three versions; ranking differences occur only where distractors with scores close to zero swap places. The absolute scores of Q4_K_M are not reliable (large calibration drift); use it only to obtain a ranking, and do not use its scores as a filtering threshold. If you need a score threshold, use Q8_0 or f16.
llama-server -m xVITA-Rerank-300M-zhTW-Q8_0.gguf \
--rerank --pooling rank --ctx-size 2048 --port 8100
curl http://localhost:8100/v1/rerank -H "Content-Type: application/json" -d '{
"query": "依據海商法,船舶的定義範圍為何?",
"documents": [
"勞動基準法第三十條規定勞工每日正常工作時間不得超過八小時。",
"海商法第一條:本法稱船舶者,謂在海上航行,或在與海相通之水面或水中航行之船舶。"
],
"top_n": 2
}'
The returned relevance_score is the raw logit; if you need a 0~1 probability, apply a sigmoid yourself.
This model's base, mmBERT, uses Gemma-2's 256k SentencePiece vocabulary. The SentencePiece vocabulary information was embedded at conversion time, so llama.cpp versions from 2026-08 onward can load it directly; if, after loading, Chinese is split character by character (a sentence yields 3 or more times as many tokens), your llama.cpp version is too old; please update.
| Item | Details |
|---|---|
| Base | jhu-clsp/mmBERT-base (Johns Hopkins, MIT, ModernBERT architecture, 8192 ctx) |
| Training data | xCloudinfo's own Traditional Chinese corpora (medical / Taiwan general knowledge and regulations / maritime), three lines merged and deduplicated into 252,849 pairs, of which 60,000 pairs were sampled for training |
| Hard negatives | Mined by xVITA-Embed-300M-zhTW from retrieval ranks top-2~60, 7 per query |
| Evaluation (three domains, 500 queries each, pool of about 30,000 passages) | General knowledge hit@1 79.2→95.0%; medical 38.0→81.8%; maritime 77.8→99.4% |
The numbers for the three domains in the table above come from each domain's own validation set; absolute scores across batches cannot be compared directly with one another (each evaluation draws its own validation set). Only the "retriever vs. retriever plus reranker" comparison within the same evaluation is meaningful.
The table above measures the three domains seen in training, which only shows the model works on what it has seen. We also measured how much of the effect remains on corpora never seen in training at all, using the same method as above: the same reranker and the same retriever (xVITA-Embed-300M-zhTW), 500 queries each, comparing "retriever only" against "retriever plus reranker" on the same set of queries.
| Evaluation set | Retriever hit@1 | With reranker hit@1 | nDCG@10 gain |
|---|---|---|---|
| Training domains (medical / general knowledge / maritime) | — | 93.3% | +0.2245 |
| Untrained domain · written (government public documents, retrieval pool of 5,132 passages) | 61.8% | 87.2% | +0.1371 |
| Untrained register · spoken (meeting transcripts, retrieval pool of 4,053 passages) | 20.8% | 18.8% | +0.0799 |
It carries over to new domains. On government public documents it had never seen, hit@1 rose from 61.8% to 87.2%, and the nDCG gain still retains sixty percent of the gain on the training domains.
It weakens on a different register. On spoken transcripts, only thirty-six percent of the gain remains. Two points must be made clear, or this table will be misread:
Recommended use: RAG over written documents, such as regulations, official documents, technical documents, and specialist knowledge bases. If your queries or corpora are in a spoken register, such as meeting transcripts or customer-service dialogue, first measure on your own data using the method in this section before deciding, rather than applying the numbers in the table above directly.
Measurement conditions: epochs=0, pure evaluation with no weight updates; the retriever is the same one as in the online deployment, with the same retrieval prefix applied; training and validation are split by passage (not by pair), so that multiple questions about the same passage do not leak across sets; each round first runs a "passage against itself" sentinel check, which scored 100% for both groups.
MIT, the same as the base mmBERT-base.
xCloudinfo Corp. Limited (云碩科技) builds on-premises, private AI solutions. xVITA is xCloudinfo's in-house model brand.
More models: https://hf.co/xCloudinfo