๐ŸŽฏ Akal-Rerank: High-Precision Edge CPU Cross-Encoder Reranker & Abstention Gate (GGUF Edition)

llama.cpp logo
Base Model Footprint Akal-Embed Abstention AUROC

Akal-Rerank (akal-rerank-indo-q4_k_m.gguf, 119 MB & akal-rerank-indo-q8_0.gguf, 126 MB) is an ultra-compact Cross-Encoder Reranker (pooling=RANK) engineered for Stage-2 precision filtering and epistemic abstention gating in offline Retrieval-Augmented Generation (RAG) pipelines on GPU-less edge CPUs.

Built upon madebyaris/rerank-indonesia (12-layer XLM-RoBERTa sequence classifier, 118M parameters) and calibrated with a Contrastive Indonesian Query-Passage Importance Matrix (imatrix_rerank_indo_id.dat), Akal-Rerank-Indo reduces disk size by 73.5%, cuts Peak RAM up to 53.9% (550 MB vs 1,209 MB PyTorch FP32), and accelerates cold-start CLI execution by 3.35ร— (2.21s vs 7.41s) while preserving 0.9993โ€“0.9999 Pearson logit correlation with FP32.


๐ŸŽฏ Why Add a Cross-Encoder Reranker to Edge RAG?

While bi-encoder dense embeddings (Akal-Embed-Indo) compress queries and passages into separate 384-dimensional vectors for fast sub-15ms candidate search, two classic challenges arise in complex enterprise RAG:

  1. Fine-Grained Near-Duplicate Confusers: Documents with nearly identical vocabulary (e.g., SOP Pencucian Kasur Harian Pad Merah vs SOP Pemolesan Akhir Pad Putih) require token-by-token cross-attention across (query, passage) pairs to resolve subtle factual distinctions.
  2. Pre-LLM Epistemic Abstention Gate: Bi-encoder cosine similarity exhibits a narrow dynamic range on unanswerable queries (AUROC 86.97%). By evaluating the maximum cross-encoder logit score ($\max_i s_{\text{rerank}}(q, d_i) < \tau$), Akal-Rerank acts as a 99.85% AUROC (99.09% Balanced Accuracy) Abstention Gateโ€”intercepting out-of-domain or false-premise queries before invoking the 1B LLM generator!

๐Ÿ“Š Empirical Benchmarks (Intel Core i5-8250U, 4 Threads, Pure CPU)

1. Indonesian Domain Hard-Negative & Abstention Benchmark

Evaluated on 65 multi-domain Indonesian documents (including 25 near-duplicate confusers) across 67 queries (55 answerable + 12 unanswerable trap queries), reranking the Top-10 candidates retrieved by Akal-Embed-Indo Q4_K_M:

Model Variant Format / Precision Disk Size Peak RAM Hit@1 (Stage-1 $\rightarrow$ Stage-2) MRR@10 Abstention AUROC (โ†‘) Abstention Bal. Acc (โ†‘) Pearson vs FP32 Top-1 Agreement
(Stage-1 Bi-Encoder Alone) Akal-Embed-Indo Q4_K_M 119.0 MB 515.8 MB 96.36% 98.18% 86.97% 87.12% โ€” โ€”
Akal-Rerank-Indo Q4_K_M (Ours) GGUF Q4_K_M (+imatrix ID) 119.1 MB 550.3 MB 96.36% $\rightarrow$ 100.0% 100.0% 99.85% 99.09% ($\tau=4.48$) 0.999301 100.0%
Akal-Rerank-Indo Q8_0 (Ours) GGUF Q8_0 126.4 MB 547.1 MB 96.36% $\rightarrow$ 100.0% 100.0% 99.70% 98.18% ($\tau=4.98$) 0.999962 100.0%
rerank-indonesia (Un-calibrated) GGUF Q4_K_M (No imatrix) 119.1 MB 550.3 MB 96.36% $\rightarrow$ 100.0% 100.0% 99.70% 98.18% 0.998995 100.0%
rerank-indonesia (Base Reference) PyTorch FP32 448.8 MB 942.6 MB 96.36% $\rightarrow$ 100.0% 100.0% 99.70% 98.18% 1.000000 100.0%
mMiniLMv2-L12-mMARCO GGUF Q4_K_M (+imatrix ID) 119.1 MB 550.2 MB 96.36% $\rightarrow$ 100.0% 100.0% 99.85% 99.09% 0.998901 100.0%

2. MIRACL Indonesian Open-Domain Benchmark (mteb/MIRACLReranking id dev)

Evaluated on 150 Indonesian Wikipedia queries $\times$ Top-20 candidates (3,000 query-passage pairs, 362,963 tokens) filtered from 15,000 passages by Akal-Embed-Indo Q4_K_M:

Model Variant Disk Size Peak RAM (RSS) Hit@1 (Stage-1 $\rightarrow$ Stage-2) Hit@3 MRR@10 nDCG@10 Pearson vs FP32 Top-1 Agreement vs FP32 Throughput
(Stage-1 Bi-Encoder Alone) 119.0 MB 515.8 MB 60.00% 80.67% 70.51% 60.44% โ€” โ€” โ€”
Akal-Rerank-Indo Q8_0 (Ours) 126.4 MB 558.3 MB 60.00% $\rightarrow$ 68.67% (+8.67) 82.67% 76.54% (+6.03) 66.69% (+6.25) 0.999929 99.33% 1,351 tok/s
Akal-Rerank-Indo Q4_K_M (+imatrix) 119.1 MB 556.8 MB 60.00% $\rightarrow$ 68.00% (+8.00) 84.00% (+3.33) 76.23% (+5.72) 66.41% (+5.97) 0.998435 98.67% 1,255 tok/s
rerank-indonesia Q4_K_M (No imatrix) 119.1 MB 557.6 MB 60.00% $\rightarrow$ 68.00% (+8.00) 83.33% 76.35% 66.77% 0.997963 97.33% 1,258 tok/s
rerank-indonesia FP32 (PyTorch) 448.8 MB 1,208.7 MB 60.00% $\rightarrow$ 68.67% (+8.67) 82.67% 76.59% 66.71% 1.000000 100.00% 1,278 tok/s
mMiniLMv2-L12-mMARCO Q4_K_M (+imatrix) 119.1 MB 557.7 MB 60.00% $\rightarrow$ 58.67% (-1.33) 79.33% 69.85% (-0.66) 61.93% โ€” โ€” 1,256 tok/s
mMiniLMv2-L12-mMARCO Q8_0 126.4 MB 558.6 MB 60.00% $\rightarrow$ 58.00% (-2.00) 80.67% 69.65% (-0.86) 61.46% โ€” โ€” 1,359 tok/s

๐Ÿ”ฌ Key Scientific Finding โ€” The Multilingual Reranker Degradation Phenomenon:
Pairing a specialized Indonesian bi-encoder (Akal-Embed-Indo) with a generic multilingual cross-encoder (mMiniLMv2-L12-mMARCO) actually degrades Hit@1 on MIRACL-ID from 60.00% down to 58.00%โ€“58.67% because the generic cross-encoder lacks fine-grained Indonesian morphological calibration. Conversely, Akal-Rerank-Indo boosts Hit@1 to 68.00%โ€“68.67% (+8.0โ€“8.7 points) and MRR@10 to 76.23%โ€“76.54% (+5.7โ€“6.0 points). Furthermore, calibrating Q4_K_M with imatrix_rerank_indo_id.dat cuts Top-1 ranking disagreement against FP32 in half (98.67% vs 97.33% Top-1 agreement across 150 MIRACL queries).


๐ŸŽฏ Intended Use & Capability Boundaries

  • Recommended Top-K Budget on CPU: Cross-encoders jointly attend to (query + passage) tokens, costing 50โ€“60 ms per candidate document on a 4-core laptop CPU (`270โ€“300 msfor Top-5 candidates,550โ€“600 msfor Top-10). For interactive chat on CPU, we recommend retrieving **Top-5 candidates** withAkal-Embed-Indo` (15 ms) and reranking those Top-5 with Akal-Rerank-Indo (~280 ms) before passing the winning Top-2 passages to Akal-1B-Steered.
  • Abstention Threshold ($\tau \approx 4.48$): If the highest reranker logit score among all retrieved candidates falls below 4.48, the application can immediately return a polite abstention response ("Maaf, informasi tersebut tidak ditemukan dalam dokumen rujukan") in < 300 ms without running the LLM generator at all!

๐Ÿš€ Usage (llama.cpp CLI)

Pass query\tpassage pairs separated by <#sep#> using --pooling rank:

./llama-embedding -m akal-rerank-indo-q4_k_m.gguf \
  -p "Berapa batas waktu pelaporan kebocoran data menurut UU PDP?\tBerdasarkan UU No. 27 Tahun 2022, pengendali data wajib melapor paling lambat 3x24 jam (72 jam).<#sep#>Berapa batas waktu pelaporan kebocoran data menurut UU PDP?\tStandar enkripsi komunikasi server wajib menggunakan protokol TLS 1.3 dan AES-256." \
  --embd-separator "<#sep#>" \
  --pooling rank \
  --embd-normalize -1 \
  --embd-output-format array \
  -t 4

๐Ÿ”ฎ Coming Soon: Next-Gen Akal Decision Model (From Reranking to Single-Pass Intelligence)

Building upon the cross-encoder and scoring foundations established in Akal-Rerank-Indo, our next milestone expands beyond candidate scoring into a full System-1 Probabilistic Decision Engine (inspired by Jev & Laya, but specialized for low-spec edge CPUs):

  • Single-Pass Inference: Instant classification, intent routing, and tool selection in a single forward pass without autoregressive token generation.
  • Primitive Decisions: Choice (multi-class routing), Score (calibrated probabilities), and Boolean / Abstain Gate.
  • Low-End Hardware First: Sub-10ms pure CPU latency, < 120 MB disk size, < 200 MB RSS RAM, zero GPU dependency.

Stay tuned via the Akal LM Initiative!


๐Ÿ“ฆ Files in this Repository

  • akal-rerank-indo-q4_k_m.gguf (119 MB): Primary 4-bit Indonesian Cross-Encoder Reranker calibrated with imatrix_rerank_indo_id.dat (99.85% Abstention AUROC, 98.67%โ€“100% Top-1 agreement vs FP32).
  • akal-rerank-indo-q8_0.gguf (126 MB): 8-bit High-Precision edition (0.99993โ€“0.99996 Pearson correlation vs FP32, 68.67% MIRACL Hit@1).
  • imatrix_rerank_indo_id.dat (348 KB): Contrastive Indonesian query-passage activation importance matrix.
  • Akal_Vol3_Architecture_Research_Paper.pdf: Full bilingual research preprint (Vol. 3).

๐Ÿ“œ Citation

@article{baehaqi2026akalvol3,
  title={Pre-Quantization Weight-Space Surgery, Hybrid Speculative Decoding, and Cross-Encoder Reranking for Sovereign Edge RAG Systems on GPU-less CPUs},
  author={Baehaqi, Muhammad Luqni},
  journal={Akal LM Research Preprint Series},
  volume={3},
  year={2026},
  publisher={Akal LM Initiative (akal-lm)}
}
Downloads last month
214
GGUF
Model size
0.1B params
Architecture
bert
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for akal-lm/Akal-Rerank-GGUF