Skip to content

MIP-0085 T7: meaning spike (throwaway, not for merge) - #189

Closed
brunogbv wants to merge 1 commit into
mainfrom
mip-0085/7-meaning-spike
Closed

brunogbv wants to merge 1 commit into
mainfrom
mip-0085/7-meaning-spike

Conversation

@brunogbv

@brunogbv brunogbv commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Throwaway, not for merge. This is MIP-0085 task 7's meaning spike. The code under spike/meaning/ exists so the numbers in the report can be reproduced. It should be closed unmerged once the report lands.

The report is in the umbrella: marola-dev/marola#890, the MIP-0085 appendix "Meaning spike (task 7)". Issue #96 is resolved by that umbrella PR, not by this one.

  • nodetext.py: one text per graph node (label words, docstring and leading comment, path words).
  • static_embed.py: the stdlib query path (BertNormalizer, BertPreTokenizer and WordPiece from tokenizer.json; model.safetensors rows read with struct; mean, L2 norm, cosine).
  • build_vectors.py, parity.py: model2vec 0.9.0 side (CI only, needs numpy); parity is MIP-0085 §7's query_vector_parity.
  • bench.py, questions.json: right first, bytes, latency for plain route query, BM25, potion-2M, potion-8M.

Tested: ruff check and ruff format --check on spike/ and the repo; parity.py (worst 1−cos 7.9e-14 / 1.1e-13 on 50 strings, 0 token-id mismatches on 1,766 node texts); bench.py over 20 questions. No model files or vectors are committed.

BM25, potion-base-2M and potion-base-8M over one text per graph node, scored
on routing-bench.yaml's five meaning questions plus fifteen extra ones. The
stdlib query path (WordPiece from tokenizer.json, safetensors read with
struct) is checked against model2vec 0.9.0. The report is in the umbrella's
MIP-0085 appendix.

Tested: ruff check + format --check spike/ and the repo; parity.py (worst 1-cos 7.9e-14 and 1.1e-13 on 50 strings, 0 token-id mismatches on 1766 node texts); bench.py over 20 questions
Co-Authored-By: Claude <noreply@anthropic.com>
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