Dev.to AI 🤖 Ai 👁 0 📖 7 min read

PrismRerank-8B GGUF on Your Own Device: A Local RAG Reranker, 144 KiB per Token of Cache, and Which Quant Fits 8, 12 and 16 GB

TL;DR Flintglass published PrismRerank-8B-GGUF on Hugging Face on December 5, 2026: four GGUF files (Q4_K_M to Q8_0) of an Apache 2.0 reranker fine-tuned from Qwen/Qwen3-Reranker-8B. A reranker is the second stage of a

TL;DR

Flintglass published PrismRerank-8B-GGUF on Hugging Face on December 5, 2026: four GGUF files (Q4_K_M to Q8_0) of an Apache 2.0 reranker fine-tuned from Qwen/Qwen3-Reranker-8B. A reranker is the second stage of a RAG pipeline: it reads a query and a candidate passage together and answers "yes" or "no". That makes it a good fit for a laptop, because it can run next to your vector index with no network call. We did not run it. We read the model config, pulled the header of the Q4_K_M file, and worked out what it costs in memory.

  • The files run from 4.68 GiB (Q4_K_M) to 8.11 GiB (Q8_0). The card lists them as about 5.0 to 8.7 GB, which is the same sizes in decimal gigabytes.
  • The KV cache is 144 KiB per token at f16 (computed: 36 layers, 8 KV heads, head size 128). A batch of 32K tokens in flight needs 4.5 GiB of cache, as much as the whole Q4_K_M file.
  • Of the 4.68 GiB in Q4_K_M, 3.88 GiB is the transformer body, 0.48 GiB the output matrix (Q6_K) and 0.33 GiB the token embedding.
  • Plan on 8 GB with Q4_K_M and about 8K tokens in flight (7.3 GiB), on 12 GB with Q8_0 at 8K (10.7 GiB), and on 16 GB with Q8_0 at 32K (14.1 GiB).

Every size comes from Hugging Face file listings, the model config and the parsed header. Fit tables are plans, not measurements. Run your own documents before you rely on them.

Sources: flintglass/PrismRerank-8B-GGUF, flintglass/PrismRerank-8B, Qwen/Qwen3-Reranker-8B.

PrismRerank-8B GGUF file sizes by quantization

What does a reranker do on your own device?

A vector search returns the 20 to 100 passages whose embeddings sit closest to the query. A reranker re-scores each one by reading the pair in full, which is slower per item but much better at telling apart passages about the same entity. On a local stack the flow is:

  1. Embed the query, fetch the top-k passages from a local index.
  2. Build one prompt per passage: instruction, query, document.
  3. Run one forward pass per prompt and compare the logits of the tokens yes and no.
  4. Sort by the yes score and hand the best few passages to the answering model.

There is no decoding loop. Each pair costs one prefill, so the memory story is different from a chat model: the weights are fixed, and the KV cache scales with how many prompt tokens you hold at once, not with how long an answer grows.

What is inside the model?

The card says PrismRerank-8B is fine-tuned from Qwen/Qwen3-Reranker-8B, tagged Apache 2.0, with training that excludes MS MARCO. The config and the GGUF header agree on the shape:

Field Value
Architecture qwen3 (dense, no experts)
Layers 36, all full attention
Hidden size 4096
Feed-forward size 12,288
Attention 32 query heads, 8 KV heads, head size 128
Vocabulary 151,669
Context in the GGUF 40,960 (the card advertises 32K)
RoPE base 1,000,000

Because the model is dense, every weight is read for every token of every pair. The speed trick of mixture-of-experts models, reading only a fraction of the file per token, does not apply here. Reranking is instead a prefill workload: it is limited by compute on long batches and by memory for the cache.

How big is the KV cache, really?

Each layer stores a key and a value per KV head per token. With 8 KV heads of size 128 in 36 layers:

layers, kv_heads, head_dim = 36, 8, 128
f16 = 2  # bytes
per_token = layers * 2 * kv_heads * head_dim * f16   # K and V
print(per_token, per_token / 1024)                   # 147456 bytes -> 144.0 KiB

for toks in (4_096, 8_192, 32_768, 40_960):
    print(toks, round(per_token * toks / 2**30, 3), "GiB")
# 4K 0.562, 8K 1.125, 32K 4.5, 40K 5.625

"Tokens in flight" is the number that matters. If you score 16 pairs of 512 tokens in one batch, that is 8,192 tokens and 1.125 GiB of cache. If you score 32 pairs of 1,024 tokens, it is 32,768 tokens and 4.5 GiB. A single long document up to the 40,960 limit costs 5.6 GiB on its own. Because each pair is independent, you can lower the number by shrinking the batch, at the price of more passes.

KV cache by tokens in flight for PrismRerank-8B at f16

With a q8_0 cache (34 bytes per 32 values) the figure falls to about 76.5 KiB per token. Whether your runtime supports a quantized cache for the reranking path is something to test, not assume.

What does the Q4_K_M file actually contain?

We downloaded the first 8 MiB of PrismRerank-8B-Q4_K_M.gguf, which holds the metadata and all 399 tensor descriptors, and summed tensor sizes by role using the GGML block sizes. The sum reproduces the 4.68 GiB file.

Group Format Size
Attention, feed-forward and norms for 36 layers mostly Q4_K, some Q6_K 3.88 GiB
Output matrix (4096 x 151,669) Q6_K 0.48 GiB
Token embedding (4096 x 151,669) Q4_K 0.33 GiB
File total 4.68 GiB

Inside the body, 3.13 GiB is Q4_K and 0.75 GiB is Q6_K, so the builder kept some tensors at higher precision, as the Q4_K_M recipe does. The output matrix matters more than usual here. A reranker only reads two logits, yes and no, and the file still carries all 151,669 rows. Whether a runtime computes the full projection or only those rows depends on the build, so check it before you budget time for it.

What do the published scores say?

The card reports zero-shot results on BEIR and related sets for the full-precision model: an All-7 average NDCG@10 of 72.15% against 71.26% for the Qwen3-Reranker-8B base, BEIR-5 at 61.43% against 60.29%, and the largest single gain on ArguAna, 63.97% against 61.59%. It also reports a held-out set released by the same authors, where it scores 800 of 800. These are the authors' numbers on their own evaluation setup. We did not reproduce them, and the card does not state scores for the quantized files, so measure the Q4_K_M file on your own corpus if retrieval quality is the reason you are choosing it.

Which quant fits 8, 12 and 16 GB?

The plan adds the file, an f16 KV cache for 8K and for 32K tokens in flight, and 1.5 GiB for compute buffers and the runtime (our assumption, check your own load log). Sizes in GiB.

Build File Plan, 8K in flight Plan, 32K in flight
Q4_K_M 4.68 7.3 10.7
Q5_K_M 5.45 8.1 11.4
Q6_K 6.26 8.9 12.3
Q8_0 8.11 10.7 14.1

Plan totals for 8K and 32K tokens in flight per build

How to read it:

  • 8 GB device: Q4_K_M with 8K tokens in flight plans at 7.3 GiB. That is tight once the operating system and your vector index take their share, so keep batches small.
  • 12 GB device: Q8_0 at 8K plans at 10.7 GiB and fits. Q5_K_M at 32K plans at 11.4 GiB and also fits. Q6_K at 32K plans at 12.3 GiB and does not.
  • 16 GB device: every file fits at 32K in flight, Q8_0 included at 14.1 GiB.

If the answering model runs on the same machine, subtract its weights and cache first. A reranker and a chat model sharing 16 GB is a real budget question, and in that case Q4_K_M with a small batch leaves the most room.

How long will reranking take?

The prefill cost is roughly 2 floating-point operations per parameter per token. For a model of about 8 billion parameters:

params = 8.2e9           # approximate, from the Qwen3-8B family
docs, tokens_per_pair = 50, 512
flops = 2 * params * docs * tokens_per_pair
print(f"{flops:.2e}")                      # 4.20e+14
for tflops in (10, 50):                    # illustrative sustained throughput
    print(tflops, "TFLOPS ->", round(flops / (tflops * 1e12), 1), "s")
# 10 TFLOPS -> 42.0 s, 50 TFLOPS -> 8.4 s

These figures are illustrative arithmetic, not benchmarks. They show why the candidate count matters: halving the candidates from 50 to 25, or the passage length from 512 to 256 tokens, halves the time. For interactive use, rerank the top 20 with short passages, or use a smaller model from the same suite. The card lists 0.6B and 4B siblings.

Does it run in llama.cpp?

The header reports architecture qwen3, which llama.cpp has long supported, and the card gives a llama-cli command that sends one pair and reads the answer. We did not run it. Before you build a pipeline, load the smallest file, send one pair with the exact system prompt from the card (the answer must be yes or no), and compare the scores against the full-precision model on a few dozen of your own query and passage pairs.

FAQ

How much memory does PrismRerank-8B need?
The Q4_K_M file is 4.68 GiB. Add 1.1 GiB of f16 cache for 8K tokens in flight and about 1.5 GiB of buffers: roughly 7.3 GiB.

How large is the KV cache?
144 KiB per token at f16, from 36 layers, 8 KV heads and head size 128. A 32K batch needs 4.5 GiB.

What is a reranker used for?
It re-scores the passages that a vector search returned, by reading each query and passage together. The best few go to the answering model.

Which file should I start with?
On 8 GB, Q4_K_M. On 12 GB, Q8_0 with a modest batch. On 16 GB, Q8_0, with room for a larger batch.

Are the scores and timings on this page measured?
The benchmark scores are the model card's, for the full-precision model. The file sizes and cache figures are computed from the files and config. The timing is arithmetic, not a benchmark.

Further reading

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.