v11b: render-faithful extraction, 256-token sentence chunks, IVF,SQ4 (3,009,820 chunks)
Browse filesv11b: rebuilt from the 2026-05/06 Kiwix dumps with a render-faithful extractor and token-budget
chunking, and re-indexed as IVF4096,SQ4 with a residual-quantile range. 3,009,820 chunks.
Three defects in the previous revision, each measured before it was changed. Logs are in eval/.
1. Chunks were cut by character count. One ME5 token is 3.95 characters in English but 2.01 in
Japanese and 1.98 in Chinese, so 13.7% of the published Japanese chunks and 18.5% of the Chinese
ones ran past the 512-token window and lost 21.7% / 27.0% of their tokens at the encoder,
silently. v11b packs whole sentences to a 256-token budget.
2. The Kiwix licence footer, 184 characters of English legal text, sat inside 97.1% of the published
Japanese chunks and 92.9% of the Chinese ones. v11b extracts from id="mw-content-text" and
removes the footer and navboxes as markup.
3. IndexIVFPQ(m=64) returned 45-47% of the exact top-10 and cost 7.8 MRR in Japanese, 10.7 in
English. v11b uses IVF4096,SQ4 with the quantiser range clipped to the 0.1-99.9 percentile of
the residuals: top-10 agreement 81.6% -> 85.2% at the same 4 bits. Downstream that clip is worth
+0.7 MRR, which is inside this benchmark's noise.
Retrieval on this artifact, whole corpus, nprobe 128: en 60.9 MRR / ja 56.3 / zh 55.5. Against the
previous published store on questions regenerated from the OLD extractor's own output, so the
comparison does not favour the new one: ja MRR 26.6 -> 43.3.
Not uniformly better: indexed-article coverage falls in two of three languages (ja 94.8 -> 94.2%,
zh 97.0 -> 95.8%; en 88.2 -> 91.3%).
Three rounds of adversarial review preceded this release and all three returned NO-GO or FAILS.
Round 1 rejected the first rebuild. Round 2 found sixteen unsupported statements in the draft
release note. Round 3 found that the acceptance script had not been re-run on the Japanese and
Chinese indexes after they were re-encoded, and three measurements that round 2 had itself got
wrong. The script was re-run on the shipped files and both passed. All three rounds, with every
correction, are in eval/REVIEW.md. Every reviewer was a model instance commissioned by the author,
not an independent judge, and no claim here is peer reviewed or independently replicated.
Breaking: chunk_id is now a content hash and the row count changed, so offsets or ids from the
previous revision are invalid. The previous revision stays reachable by its commit SHA.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- eval/noise_floor.log +16 -0
- eval/noise_floor.py +29 -0
- eval/reindex_clip.log +16 -0
- eval/reindex_clip_en.log +8 -0
- eval/remeasure_v2.log +9 -0
- eval/remeasure_v2.py +66 -0
- eval/verify_ja_final.log +11 -0
- eval/verify_zh_final.log +11 -0
- figures/figF_index.png +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
standard error of MRR, reconstructed from the reported rates (per-question ranks not retained)
|
| 2 |
+
en: n=400 MRR=60.9 recall@1=53.5
|
| 3 |
+
SD upper bound 0.488 -> SE 2.44 MRR points
|
| 4 |
+
SD estimate 0.448 -> SE 2.24 MRR points
|
| 5 |
+
ja: n=303 MRR=56.3 recall@1=50.8
|
| 6 |
+
SD upper bound 0.496 -> SE 2.85 MRR points
|
| 7 |
+
SD estimate 0.467 -> SE 2.69 MRR points
|
| 8 |
+
zh: n=310 MRR=55.5 recall@1=49.4
|
| 9 |
+
SD upper bound 0.497 -> SE 2.82 MRR points
|
| 10 |
+
SD estimate 0.465 -> SE 2.64 MRR points
|
| 11 |
+
|
| 12 |
+
Unpaired 95% interval for the difference of two such means is about 2*sqrt(2)*SE,
|
| 13 |
+
i.e. 6.5-7.8 MRR points. Our comparisons reuse the same questions, so the paired standard error
|
| 14 |
+
is smaller than this, but we did not retain the per-question ranks needed to compute it.
|
| 15 |
+
Conclusion: the '~2.4 points' figure used in the draft is roughly one unpaired standard error
|
| 16 |
+
for English and understates it for Japanese and Chinese. It is a rough noise scale, not a test.
|
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""The paper claimed 'differences under ~2.4 MRR points are inside the standard error' with no log
|
| 3 |
+
behind it. Per-question reciprocal ranks were not retained, so bound the standard error from the
|
| 4 |
+
reported recall@1 / recall@5 / MRR instead. RR takes values in {1, 1/2, ..., 1/10, 0}."""
|
| 5 |
+
import numpy as np
|
| 6 |
+
out=[]
|
| 7 |
+
def p(s):
|
| 8 |
+
print(s, flush=True); out.append(s)
|
| 9 |
+
# (lang, n, recall@1, recall@5, MRR) from final_eval_{lang}.log, nprobe 128
|
| 10 |
+
R=[("en",400,53.5,71.8,60.9),("ja",303,50.8,63.0,56.3),("zh",310,49.4,64.2,55.5)]
|
| 11 |
+
p("standard error of MRR, reconstructed from the reported rates (per-question ranks not retained)")
|
| 12 |
+
for lang,n,r1,r5,m in R:
|
| 13 |
+
p1,m_=r1/100,m/100
|
| 14 |
+
# upper bound: RR in [0,1] so E[RR^2] <= E[RR]
|
| 15 |
+
var_hi=m_-m_**2
|
| 16 |
+
# point estimate: mass p1 at RR=1, the rest spread over 1/2..1/10 with mean (m-p1)/(1-p1)
|
| 17 |
+
rest_mean=(m_-p1)/(1-p1) if p1<1 else 0.0
|
| 18 |
+
# those non-top-1 items have RR <= 1/2, so E[RR^2 | not top1] <= 0.5 * rest_mean
|
| 19 |
+
var_pt=(p1*1.0+(1-p1)*0.5*rest_mean)-m_**2
|
| 20 |
+
p(f" {lang}: n={n} MRR={m} recall@1={r1}")
|
| 21 |
+
p(f" SD upper bound {np.sqrt(var_hi):.3f} -> SE {100*np.sqrt(var_hi/n):.2f} MRR points")
|
| 22 |
+
p(f" SD estimate {np.sqrt(var_pt):.3f} -> SE {100*np.sqrt(var_pt/n):.2f} MRR points")
|
| 23 |
+
p("")
|
| 24 |
+
p("Unpaired 95% interval for the difference of two such means is about 2*sqrt(2)*SE,")
|
| 25 |
+
p("i.e. 6.5-7.8 MRR points. Our comparisons reuse the same questions, so the paired standard error")
|
| 26 |
+
p("is smaller than this, but we did not retain the per-question ranks needed to compute it.")
|
| 27 |
+
p("Conclusion: the '~2.4 points' figure used in the draft is roughly one unpaired standard error")
|
| 28 |
+
p("for English and understates it for Japanese and Chinese. It is a rough noise scale, not a test.")
|
| 29 |
+
open("noise_floor.log","w").write("\n".join(out)+"\n")
|
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wiki_zh_me5_2026-05_v11b: 3,367,718 chunks, 4 embedding parts
|
| 2 |
+
training on 262,144 vectors (stride 12)
|
| 3 |
+
range refit on residuals: mean width 0.682x of min/max
|
| 4 |
+
added 841,929/3,367,718
|
| 5 |
+
added 1,683,858/3,367,718
|
| 6 |
+
added 2,525,787/3,367,718
|
| 7 |
+
added 3,367,718/3,367,718
|
| 8 |
+
wrote 1.77 GB (525 B/vector) in 515s
|
| 9 |
+
wiki_ja_me5_2026-06_v11b: 3,009,820 chunks, 4 embedding parts
|
| 10 |
+
training on 262,144 vectors (stride 11)
|
| 11 |
+
range refit on residuals: mean width 0.688x of min/max
|
| 12 |
+
added 752,455/3,009,820
|
| 13 |
+
added 1,504,910/3,009,820
|
| 14 |
+
added 2,257,365/3,009,820
|
| 15 |
+
added 3,009,820/3,009,820
|
| 16 |
+
wrote 1.58 GB (526 B/vector) in 406s
|
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wiki_en_me5_2026-06_v11b: 15,648,632 chunks, 4 embedding parts
|
| 2 |
+
training on 262,144 vectors (stride 59)
|
| 3 |
+
range refit on residuals: mean width 0.690x of min/max
|
| 4 |
+
added 3,912,158/15,648,632
|
| 5 |
+
added 7,824,316/15,648,632
|
| 6 |
+
added 11,736,474/15,648,632
|
| 7 |
+
added 15,648,632/15,648,632
|
| 8 |
+
wrote 8.15 GB (521 B/vector) in 1268s
|
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
== A. the licence footer as it actually appears in the published stores
|
| 2 |
+
ja: 90 distinct footer string(s) in the first 20,000 chunks; most common seen 19,150 times, 184 characters
|
| 3 |
+
'This article is issued from Wikipedia . The text is available under Creative Commons Attribution-Share Alike 4.0 unless otherwise noted. Additional terms may apply for the media files.'
|
| 4 |
+
zh: 111 distinct footer string(s) in the first 20,000 chunks; most common seen 17,984 times, 184 characters
|
| 5 |
+
'This article is issued from Wikipedia . The text is available under Creative Commons Attribution-Share Alike 4.0 unless otherwise noted. Additional terms may apply for the media files.'
|
| 6 |
+
== B. mean pairwise cosine, disjoint random pairs across the whole shipped vector set
|
| 7 |
+
en: 20,000 disjoint random pairs from all 15,648,632 shipped vectors — mean cosine 0.6948, sd 0.0300, p5 0.6472, p95 0.7424
|
| 8 |
+
ja: 20,000 disjoint random pairs from all 3,009,820 shipped vectors — mean cosine 0.7153, sd 0.0288, p5 0.6699, p95 0.7636
|
| 9 |
+
zh: 20,000 disjoint random pairs from all 3,367,718 shipped vectors — mean cosine 0.7533, sd 0.0283, p5 0.7098, p95 0.7997
|
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Corrections to two measurements the adversarial review showed were wrong.
|
| 3 |
+
|
| 4 |
+
A. footer string length — misc_measure.py §A reported len() of a hard-coded string that does not
|
| 5 |
+
occur in any store. Measure the real footer as it appears in the published artifacts.
|
| 6 |
+
B. mean pairwise cosine — resource_and_coverage.py §C drew 2000+2000 indices from the FIRST 4,000
|
| 7 |
+
vectors of embedding part 0 and allowed self-pairs. Draw disjoint random pairs across the whole
|
| 8 |
+
shipped vector set, excluding self-pairs.
|
| 9 |
+
"""
|
| 10 |
+
import gzip, json, os, re, numpy as np
|
| 11 |
+
OLD = {"ja": "/home/happy/デスクトップ/mobius_ai/MOBIUS_MMV/data/wiki_ja_me5",
|
| 12 |
+
"zh": "/home/happy/デスクトップ/mobius_ai/MOBIUS_MMV/data/wiki_zh_me5"}
|
| 13 |
+
NEW = {"en": "/home/happy/デスクトップ/mobius_ai/MOBIUS_MMV/data/wiki_en_me5_2026-06_v11b",
|
| 14 |
+
"ja": "/home/happy/デスクトップ/mobius_ai/MOBIUS_MMV/data/wiki_ja_me5_2026-06_v11b",
|
| 15 |
+
"zh": "/home/happy/デスクトップ/mobius_ai/MOBIUS_MMV/data/wiki_zh_me5_2026-05_v11b"}
|
| 16 |
+
out=[]
|
| 17 |
+
def p(s):
|
| 18 |
+
print(s, flush=True); out.append(s)
|
| 19 |
+
|
| 20 |
+
p("== A. the licence footer as it actually appears in the published stores")
|
| 21 |
+
pat = re.compile(r"This article is issued from Wikipedia.*?(?:media files\.|\Z)", re.S)
|
| 22 |
+
for lang in ("ja","zh"):
|
| 23 |
+
f=os.path.join(OLD[lang],"wiki_chunks.jsonl.gz")
|
| 24 |
+
seen={}
|
| 25 |
+
with gzip.open(f,"rt",encoding="utf-8") as fh:
|
| 26 |
+
for i,ln in enumerate(fh):
|
| 27 |
+
if i>=20000: break
|
| 28 |
+
m=pat.search(json.loads(ln)["text"])
|
| 29 |
+
if m: seen[m.group(0)]=seen.get(m.group(0),0)+1
|
| 30 |
+
if not seen:
|
| 31 |
+
p(f" {lang}: no match in the first 20,000 chunks"); continue
|
| 32 |
+
top=sorted(seen.items(), key=lambda kv:-kv[1])
|
| 33 |
+
s,n=top[0]
|
| 34 |
+
p(f" {lang}: {len(seen)} distinct footer string(s) in the first 20,000 chunks; "
|
| 35 |
+
f"most common seen {n:,} times, {len(s)} characters")
|
| 36 |
+
p(f" {s!r}")
|
| 37 |
+
|
| 38 |
+
p("== B. mean pairwise cosine, disjoint random pairs across the whole shipped vector set")
|
| 39 |
+
rng=np.random.default_rng(11)
|
| 40 |
+
NPAIR=20000
|
| 41 |
+
for lang in ("en","ja","zh"):
|
| 42 |
+
d=NEW[lang]
|
| 43 |
+
parts=sorted(f for f in os.listdir(d) if f.startswith("emb_part") and f.endswith(".f16"))
|
| 44 |
+
sizes=[os.path.getsize(os.path.join(d,f))//(1024*2) for f in parts]
|
| 45 |
+
total=sum(sizes)
|
| 46 |
+
idx=rng.choice(total, size=2*NPAIR, replace=False)
|
| 47 |
+
a_idx, b_idx = idx[:NPAIR], idx[NPAIR:]
|
| 48 |
+
def fetch(ids):
|
| 49 |
+
v=np.empty((len(ids),1024), dtype=np.float32)
|
| 50 |
+
order=np.argsort(ids); ids_s=ids[order]
|
| 51 |
+
base=0; pi=0
|
| 52 |
+
fh=open(os.path.join(d,parts[0]),"rb")
|
| 53 |
+
for k,gid in enumerate(ids_s):
|
| 54 |
+
while gid>=base+sizes[pi]:
|
| 55 |
+
base+=sizes[pi]; pi+=1; fh.close()
|
| 56 |
+
fh=open(os.path.join(d,parts[pi]),"rb")
|
| 57 |
+
fh.seek((gid-base)*1024*2)
|
| 58 |
+
v[order[k]]=np.frombuffer(fh.read(1024*2), dtype=np.float16).astype(np.float32)
|
| 59 |
+
fh.close(); return v
|
| 60 |
+
A=fetch(a_idx); B=fetch(b_idx)
|
| 61 |
+
A/=np.linalg.norm(A,axis=1,keepdims=True); B/=np.linalg.norm(B,axis=1,keepdims=True)
|
| 62 |
+
cos=np.sum(A*B,axis=1)
|
| 63 |
+
p(f" {lang}: {NPAIR:,} disjoint random pairs from all {total:,} shipped vectors — "
|
| 64 |
+
f"mean cosine {cos.mean():.4f}, sd {cos.std():.4f}, p5 {np.percentile(cos,5):.4f}, "
|
| 65 |
+
f"p95 {np.percentile(cos,95):.4f}")
|
| 66 |
+
open("remeasure_v2.log","w").write("\n".join(out)+"\n")
|
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/happy/デスクトップ/mobius_ai/venv313/lib/python3.13/site-packages/transformers/utils/hub.py:110: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
|
| 2 |
+
warnings.warn(
|
| 3 |
+
manifest: {"stage1_done": true, "chunk_count": 3009820, "zim_source": "wikipedia_ja_all_mini_2026-06.zim", "n_workers": 14, "extractor": "render_faithful_v3 (zim-footer, head/h1 title, HTML entities, inline-tag spacing; navbox by markup; no CJK-space rule)", "title_prefix": true, "prose_facts_split": true, "chunker": "bplus_sentence_token_budget", "token_budget": 256, "min_chunk_chars": 25, "min_article_chars": 25, "overlap": 0, "dedup": "exact sha1-20 over chunk text", "dropped_duplicates": 5, "stage2_done": true, "model": "intfloat/multilingual-e5-large", "passage_prefix": "passage: ", "metric": "INNER_PRODUCT", "wiki_url_base": "https://ja.wikipedia.org/wiki/", "dim": 1024, "index_type": "IndexIVFScalarQuantizer", "quantizer": "QT_4bit", "index_kind": "IVF,SQ4", "nlist": 4096, "bytes_per_vector": 525.5878291725087, "recommended_nprobe": 128, "embeddings_fp16": "emb_part{1..N}.f16 — raw float16, 1024 dims, row-major, index-aligned (re-index without re-embedding)", "buffer_size_chunks": 8000000, "index_size_gb": 1.582, "chunks_size_gb": 0.585, "index_memory_gb": 1.541, "gpu_count": 2, "batch_size_used": 512, "n_parts": 4, "reindexed_at": "2026-09-15T15:22:50+0900", "range_fit": "residual quantiles 0.001-0.999 (measured +3.6 pt top-10 fidelity, +0.7 MRR over FAISS min/max on 205,789 ja vectors)", "reindex_note": "rebuilt from the stored fp16 vectors; no re-embedding"}
|
| 4 |
+
faiss ntotal 3009820 d 1024
|
| 5 |
+
chunk lines 3009820 ALIGNED
|
| 6 |
+
unique chunk_id True
|
| 7 |
+
tokens p50=132 p95=252 max=257 >512: 0.00%
|
| 8 |
+
query: 量子力学の基本原理 -> [('量子力学', 0.886), ('量子力学', 0.881), ('量子力学の数学的基礎', 0.877), ('量子重力理論', 0.874), ('量子重力理論', 0.871)]
|
| 9 |
+
query: What causes auroras? -> [('Amazon Relational Database Service', 0.801), ('CE-7.5', 0.799), ('X-Radar Powered by PetaMap', 0.798), ('FORMOSAT-2', 0.797), ('雷雨喘息', 0.792)]
|
| 10 |
+
|
| 11 |
+
ACCEPTANCE PASSED
|
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/happy/デスクトップ/mobius_ai/venv313/lib/python3.13/site-packages/transformers/utils/hub.py:110: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
|
| 2 |
+
warnings.warn(
|
| 3 |
+
manifest: {"stage1_done": true, "chunk_count": 3367718, "zim_source": "wikipedia_zh_all_mini_2026-05.zim", "n_workers": 14, "extractor": "render_faithful_v3 (zim-footer, head/h1 title, HTML entities, inline-tag spacing; navbox by markup; no CJK-space rule)", "title_prefix": true, "prose_facts_split": true, "chunker": "bplus_sentence_token_budget", "token_budget": 256, "min_chunk_chars": 25, "min_article_chars": 25, "overlap": 0, "dedup": "exact sha1-20 over chunk text", "dropped_duplicates": 19, "stage2_done": true, "model": "intfloat/multilingual-e5-large", "passage_prefix": "passage: ", "metric": "INNER_PRODUCT", "wiki_url_base": "https://zh.wikipedia.org/wiki/", "dim": 1024, "index_type": "IndexIVFScalarQuantizer", "quantizer": "QT_4bit", "index_kind": "IVF,SQ4", "nlist": 4096, "bytes_per_vector": 524.9939929649692, "recommended_nprobe": 128, "embeddings_fp16": "emb_part{1..N}.f16 — raw float16, 1024 dims, row-major, index-aligned (re-index without re-embedding)", "buffer_size_chunks": 8000000, "index_size_gb": 1.768, "chunks_size_gb": 0.692, "index_memory_gb": 1.724, "gpu_count": 2, "batch_size_used": 512, "n_parts": 4, "reindexed_at": "2026-09-15T15:16:04+0900", "range_fit": "residual quantiles 0.001-0.999 (measured +3.6 pt top-10 fidelity, +0.7 MRR over FAISS min/max on 205,789 ja vectors)", "reindex_note": "rebuilt from the stored fp16 vectors; no re-embedding"}
|
| 4 |
+
faiss ntotal 3367718 d 1024
|
| 5 |
+
chunk lines 3367718 ALIGNED
|
| 6 |
+
unique chunk_id True
|
| 7 |
+
tokens p50=139 p95=254 max=258 >512: 0.00%
|
| 8 |
+
query: 量子力学的基本原理 -> [('量子力學入門', 0.917), ('量子力学', 0.907), ('量子力學入門', 0.893), ('量子力学', 0.893), ('量子電動力學', 0.891)]
|
| 9 |
+
query: What causes auroras? -> [('陰影帶', 0.813), ('极光', 0.806), ('萘茜', 0.8), ('白克蘭電流', 0.8), ('R136c', 0.798)]
|
| 10 |
+
|
| 11 |
+
ACCEPTANCE PASSED
|
|
Git LFS Details
|
|
Git LFS Details
|