Views
No views yet
[!IMPORTANT] This model requires the patched llama.cpp runtime bundled inllama.cpp/. Stock llama.cpp does not currently recognize thet5gemma2architecture. Ollama, LM Studio,llama-serverand other stock llama.cpp frontends are not supported by this release.
KaLM-Embedding/KaLM-Reranker-V1-Nano.| File | Quantization | Size | SHA256 |
|---|---|---|---|
kalm-reranker-v1-nano-q8_0.gguf | Q8_0 | 406,523,488 bytes | 60f8b629f1b6b56c870bc345c404b9189acb7572d0fbf79670052c212792c9ac |
t5gemma2; physical tensors: 471;
text parameters: 368,424,192. The tokenizer is embedded
in the GGUF.-m/--model path and does not implement
llama.cpp's -hf option:1hf download KaLM-Embedding/KaLM-Reranker-V1-Nano-Q8_0-GGUF \
2 --local-dir KaLM-Reranker-V1-Nano-Q8_0-GGUF
3cd KaLM-Reranker-V1-Nano-Q8_0-GGUF
4sha256sum --check SHA256SUMS1MODEL_REPO="$PWD"
2git clone https://github.com/ggml-org/llama.cpp llama.cpp-src
3git -C llama.cpp-src checkout 277a105dc8f8643dab54331926a9830860a03292
4bash "$MODEL_REPO/llama.cpp/apply-patches.sh" "$MODEL_REPO/llama.cpp-src"
5
6cmake -S llama.cpp-src -B llama.cpp-src/build -G Ninja \
7 -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
8cmake --build llama.cpp-src/build --target llama-kalm-reranker -j1cmake -S llama.cpp-src -B llama.cpp-src/build-cpu -G Ninja \
2 -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=OFF
3cmake --build llama.cpp-src/build-cpu --target llama-kalm-reranker -j1llama.cpp-src/build/bin/llama-kalm-reranker \
2 -m kalm-reranker-v1-nano-q8_0.gguf -ngl 99 --require-gpu \
3 --query "What is the capital of China?" \
4 --passage "The capital of China is Beijing."1llama.cpp-src/build-cpu/bin/llama-kalm-reranker \
2 -m kalm-reranker-v1-nano-q8_0.gguf -ngl 0 \
3 --query "What is the capital of China?" \
4 --passage "The capital of China is Beijing."yes_logit, no_logit,
margin=yes_logit-no_logit, and score=sigmoid(margin). Logits can vary
slightly across hardware and backends; use the margin or score for ranking
rather than comparing against a hard-coded example logit.1llama.cpp-src/build/bin/llama-kalm-reranker \
2 -m kalm-reranker-v1-nano-q8_0.gguf -ngl 99 --require-gpu \
3 --jsonl examples/input.jsonl --out scores.jsonlqid, pid, query, passage, and
an optional instruction. Results preserve input order. The implementation
scores pairs sequentially and reuses one context; it is not a parallel batch
server.<Document>: {passage}, right padding, maximum 1024 tokens.yes=4443, no=1904, and score=sigmoid(yes_logit-no_logit).EVALUATION.md for the complete metrics and reproducibility
note.unsupported architecture: t5gemma2 means a stock or unpatched llama.cpp
binary is being used.llama-kalm-reranker: No such file or directory means the patched target
was not built, or the selected build directory is wrong.GGML_CUDA=ON
or cannot see the GPU. Keep --require-gpu enabled to turn fallback into
an explicit error.unknown argument: -hf is expected: this custom CLI requires a prior
hf download and a local -m path.manifest.json records model, tokenizer, quantization,
runtime and validation provenance.SHA256SUMS verifies the GGUF.llama.cpp/PATCHSET.json pins the runtime patch
base, final tested tree and patch hashes.LICENSE and
THIRD_PARTY_NOTICES.md. The bundled llama.cpp
patches retain the upstream MIT license in
llama.cpp/LICENSE.@misc{zhao2026kalmrerankerv1,
title={KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking},
author={Xinping Zhao and Jiaxin Xu and Ziqi Dai and Xin Zhang and Shouzheng Huang and Danyu Tang and Xinshuo Hu and Meishan Zhang and Baotian Hu and Min Zhang},
year={2026},
eprint={2606.22807},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2606.22807},
}
@misc{zhao2026kalmembeddingv2,
title={KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Model},
author={Xinping Zhao and Xinshuo Hu and Zifei Shan and Shouzheng Huang and Yao Zhou and Xin Zhang and Zetian Sun and Zhenyu Liu and Dongfang Li and Xinyuan Wei and Youcheng Pan and Yang Xiang and Meishan Zhang and Haofen Wang and Jun Yu and Baotian Hu and Min Zhang},
year={2025},
eprint={2506.20923},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2506.20923},
}
@misc{hu2025kalmembedding,
title={KaLM-Embedding: Superior Training Data Brings A Stronger Embedding Model},
author={Xinshuo Hu and Zifei Shan and Xinping Zhao and Zetian Sun and Zhenyu Liu and Dongfang Li and Shaolin Ye and Xinyuan Wei and Qian Chen and Baotian Hu and Haofen Wang and Jun Yu and Min Zhang},
year={2025},
eprint={2501.01028},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.01028},
}