Skip to content

docs: preserve chemistry benchmark experiments and measurement boundaries - #4

Draft
xrl wants to merge 5 commits into
mainfrom
docs/benchmark-ledger
Draft

xrl wants to merge 5 commits into
mainfrom
docs/benchmark-ledger

Conversation

@xrl

@xrl xrl commented Oct 12, 2026 •

Copy link
Copy Markdown

Chemistry results currently span several PR comments with different preparation paths, schemas and timing boundaries. This documentation-only branch records eight experiment reports, a chronological index, a reusable template, sanitized native and tuning stage metrics, counter traces and a configuration-study harness.

The ledger makes the regressions and confounders explicit: exporter-dependent service timings are separate from full native preparation; the native flat baseline uses less CPU/memory but takes longer than matched Cheminee; nested descriptor performance is unmeasured. A source/effective-schema audit documents stored-byte versus fast-field scoring, learned routing versus exhaustive search, document retrieval, caching and persistent fingerprint duplication.

Experiment 005: the selected H12/B200/10s configuration averaged 376.86s to searchable versus 487.82s baseline (22.7% faster), with 9.1% more service CPU and mean peak RSS rising from 662.44 to 846.27 MiB. All twelve full runs passed complete restart readback and 26 query checks. The long run observed removal of all 30 obsolete splits at the 33.50-minute sampled boundary and shut down normally. This is configuration-only evidence at the frozen flat-schema revision.

Experiment 006: 280 measured requests per variant passed independent count/order/score oracles with result and predicate caches disabled. Query 1 averaged 1.249 s / 1.559 CPU core-seconds for all records; an empty intersection still averaged 1.248 s / 1.550 core-seconds. Instrumented work counters show 99,995 fingerprint decodes and Tanimoto calls in either case. All 36 stage intervals reconcile within explicit sampling bounds. This baseline is separate from prior cache-serving warm measurements; the completed combined candidate/batched-decode comparison is recorded separately in experiment 007.

Validation: make fmt; byte-identical public-harness exports; archive CRC/member SHA-256; Python AST and JSON parsing; local Markdown links; file line limits; git diff --check; per-repetition stage CPU reconciliation. No application source changes. Code PR #3 and its branch remain untouched.

Tracking:

  • Backfill historical exporter, batching, native preparation and nested-correctness reports.
  • Record physical schema/scorer differences and CPU configuration diagnosis.
  • Append experiment 005: ten audited 100k controls, two instrumented follow-ups and 43-minute lifecycle evidence.
  • Append experiment 006 eager query-cost baseline, exact query definitions, sanitized metrics and counter traces.
  • Complete experiment 007 candidate-first exact comparison: 20 matched cases × 10 repetitions, both 36-case pilots, and 96 measured held-out C4 responses passed. Query-specific 100k, caches-disabled query1/all improved 6.20x and empty 12.43x; batching and pruning are a combined change without a factorial ablation. Eight split hashes and executable identities are preserved. Candidate application source remains local.
  • Record experiment 008 bounded USearch feasibility: separate 10k canonical payload/topology, fresh-process reopen, shuffled final DocIds, masks, scratch leases and 24 component rejection cases; sanitizer query fixture passed. No production ANN or general recall claim.
  • Complete typed storage/adapter/lifecycle gates, ARM64 runtime validation and broader ANN evaluation; application source remains local.
  • Create tracking issue #5 after authorized Issues enablement; group repetitions within experiment records.

This PR remains draft while new studies are in progress. Future typed-vector implementation belongs to a separate branch; its results will not be mixed into the unchanged flat-schema tuning baseline. Large private diagnostic bundles and private artifact links are not included.

xrl commented Oct 12, 2026

Copy link
Copy Markdown
Author

Configuration study progress — screening only; full-scale repetitions are now running.

All rows use the unchanged flat-schema binary from 7d9a4f17a09cfb68b88f7d81cfa0aa2570ac677b, the first 10k molecules of the recovered corpus, four-core quota and 14 GiB limit. Each row below is one fresh screened run with a passed full stored-record restart audit. Main Tokio threads=2, scheduling capacity=4000m, merge concurrency=2 and uploads=12 remain fixed. QW_NUM_CPUS also changes actor pools, so it is not a chemistry-only knob.

CPU hint / batch / clients / commit s Acceptance s Acceptance cores All-searchable s Process CPU core-s Peak RSS MiB
4 / 200 / 1 / 30 46.62 2.17 64.66 101.29 517.9
9 / 200 / 1 / 30 37.21 2.75 63.26 102.62 549.2
12 / 200 / 1 / 30 36.50 2.94 64.55 107.51 575.2
24 / 200 / 1 / 30 41.53 2.72 65.59 113.05 662.3
12 / 200 / 4 / 30 37.09 2.95 67.16 109.55 573.4
12 / 200 / 1 / 10 36.64 3.01 44.66 110.33 585.6
4 / 200 / 1 / 10 48.01 2.19 54.03 105.03 535.3
12 / 1000 / 1 / 30 35.91 2.96 39.92 106.59 570.8

The 30-second commit boundary strongly affects this small workload: a slight change in acceptance timing can move the last documents into another split/publication cycle. The 39.92-second large-batch result is not yet evidence of a proportional full-scale speedup. Wider pools and concurrent clients already show diminishing returns. Short observations retain normal lifecycle work; they are not fully cleaned storage figures.

One prelaunch attempt rejected zombie compiler processes as competing work; the guard was corrected to inspect process state. The first large-batch screen overlapped documentation tooling and is excluded; the clean repeat appears above. Both attempts remain in local evidence. No production source, TensorFlow algorithm, schema or durability policy was changed. Full 100k runs, independent query checks, stage CPU and a long GC observation will be appended as experiment 005 after completion.

xrl commented Oct 12, 2026

Copy link
Copy Markdown
Author

Reproducibility handoff for an independent packed-vector study (recipe, not a timing result):

Use the public MOSES molsets==0.3.1 wheel, SHA-256 7f4450e3ebecebe79c3a2a55950c93daddee071120daf64a163d03481e811d34. The versioned sampler selects the exact records and reconstructs searchable metadata. Set STUDY_ROOT, extract the wheel under data/molsets, then run the sampler. The resulting 100,000-row raw-100k.ndjson is 20,032,857 bytes, SHA-256 9a63bf25bc02ba3c965bb050cd74ba1a059bc362b8fb210b8febb6a326ce2e5e. This is the recovered native study's corpus, not a claim that missing historical metadata bytes were recovered.

For a comparison-only preparation oracle, build and run descriptor_audit at the measured revision:

# From that revision's quickwit/ workspace, with pinned dynamic RDKit,
# TensorFlow and model assets configured as described in the ledger methods:
cargo build --release -p tantivy-rdkit-mapper --features descriptor-v1 --example descriptor_audit
target/release/examples/descriptor_audit < raw-100k.ndjson > native-100k.ndjson

The retained output SHA-256 is a6f7a3debee62623161497a41eb90534efe4b0f6649dfff0d87911817abaf919. All 100,000 prepared JSON values matched unchanged Cheminee, including both fingerprints, 43 descriptors, scaffold/cluster assignments and metadata. There are 99,989 distinct normalized structures. This offline oracle is never benchmark ingestion input; full-path ingestion uses raw SMILES.

The exact profile is morgan-r3-2048-lsb0-v1, RDKit 2026.09.1, preparation cheminee-fragment-tautomer-neutralize-v1: fragment-parent with skipStandardize=true, canonical tautomer, Cheminee custom neutralization; Morgan radius 3, 2048 bits, without chirality/feature invariants. Dependency and asset hashes must match for a faithful reproduction.

To export flat rows, iterate this oracle in record_id order, decode each morgan_fingerprint with standard base64, assert 256 bytes, and concatenate unchanged bytes. Row 0 corresponds to record_id 1; preserve an explicit mapping when engine DocIds differ. Bit j is (row[j // 8] >> (j % 8)) & 1. The complete payload is 25,600,000 bytes. Do not reinterpret bytes as signed scalar vectors or substitute Hamming for Tanimoto.

Independent exact similarity oracle: interpret each row as a little-endian integer. For query Q and row V, compute integer intersection=(Q & V).bit_count(), union=(Q | V).bit_count(), then Tanimoto=intersection/union. Preserve those integer counts as well as the score. The current eager implementation ranks and compares float32 scores; reproduce its float32 threshold boundary explicitly when auditing that legacy path. Any future exact-rational threshold behavior must be labeled separately. Sort descending score, then ascending record_id. All qualifying documents count toward num_hits even when only top-k is returned.

Recoverable query seeds are record IDs 1, 998 and 10000 at thresholds 0.3, 0.5 and 0.9 with k=100; additional existing probes use IDs 1, 50000 and 100000 at threshold 0.4 with k=10. These are in-corpus queries, not held-out evidence. Future held-out/filter/concurrency experiments need separate declared definitions. Hamming and Tanimoto can reverse rankings: Lucene packed-bit HNSW is architectural prior art, not a matched metric control. Different machines must report their hardware separately; no cross-environment latency ratio is implied.

No new export, oracle generation or timings were run to write this handoff; the active configuration experiment remains uncontended.

xrl commented Oct 12, 2026

Copy link
Copy Markdown
Author

Canonical fingerprint recipe addendum: byte identity with the independent Lucene fixture is confirmed.

For retained native oracle record IDs 1 through 10,000 in ascending order, base64-decode each 2048-bit Morgan fingerprint to exactly 256 bytes and concatenate unchanged bytes. No header, separator, IDs, padding, deduplication or trailing newline. Total: 2,560,000 bytes. SHA-256:

9e86a7574ed726a756816c70bb2fc801ba042c70f4b427d64b29d6e1503db82a

Bit order is LSB0: bit j = (byte[j/8] >> (j%8)) & 1. Profile: Morgan radius 3, 2048 bits, RDKit 2026.09.1, Cheminee fragment-parent/canonical-tautomer/custom-neutralization preparation. The source 100k raw workload SHA-256 remains 9a63bf25bc02ba3c965bb050cd74ba1a059bc362b8fb210b8febb6a326ce2e5e.

This was a byte-only read of retained oracle output, performed between benchmark engines; no chemistry rerun or additional performance measurement. The hash matches the Lucene fixture exactly. That establishes payload identity, not comparable end-to-end benchmark boundaries or hardware. Runtime-tuning experiment 005 is still in progress; its ninth control has passed stored readback and query audits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant