Skip to content

feat: add nanobeir bench - #62

Merged
stephantul merged 1 commit into
mainfrom
nanobeoir
Oct 27, 2026
Merged

stephantul merged 1 commit into
mainfrom
nanobeoir

Conversation

@stephantul

Copy link
Copy Markdown
Contributor

Adds a little NanoBEIR bench

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The PR adds an operator-run benchmark workflow without changing model behavior.

The PR appears safe to merge, with non-blocking fixes recommended for hidden errors and reuse of old local models.

Reviews (1) · Last reviewed commit: "add nanobeir bench" · Reviewed by Greptile

Comment thread scripts/nanobeir.py
if quantize == "model2vec-int8":
model, quantize = str(model2vec_int8(model)), "none"
cmd = [str(binary), f"data={data}", f"model={model}", f"quantize={quantize or 'none'}"]
out = subprocess.run(cmd, check=True, text=True, capture_output=True).stdout

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Failure details are hidden

build() and score() capture the child process output but never show it when the command fails. A compile error or model-loading failure leaves the user with only CalledProcessError, hiding why the benchmark stopped. Print the captured output before raising, or let errors reach the terminal.

Comment thread scripts/nanobeir.py
Comment on lines +93 to +94
out = WORK / "models" / f"{model.replace('/', '--')}-int8"
if not (out / "model.safetensors").exists():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Changed local models are skipped

model2vec_int8() reuses its saved model based only on the input path and the presence of model.safetensors. Replacing a local model at the same path and rerunning with :model2vec-int8 still scores the old saved copy. Check whether the source changed before reusing it, or rebuild local models on each run.

@stephantul
stephantul merged commit 3cd26f9 into main Oct 27, 2026
6 checks passed
@stephantul
stephantul deleted the nanobeoir branch October 27, 2026 12:38
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