∞skylakegrep

release notes · v0.7.1

skylakegrep 0.7.1 — correct zero-vector fallback width

0.7.1 is a bug-fix release. It removes a way for a freshly built index to contain wrong-width zero vectors, and it silences three spurious BLAS warnings that appeared on every query on some macOS setups.

What changed

  • Zero-vector fallback width follows the configured model. When an embedding request failed before any request had succeeded, the fallback zero vector was hard-coded to 768 dimensions (the nomic-embed-text width) regardless of the configured model. With the default bge-m3 (1024-d), a clean skygrep index run was observed to store 20 of 1304 chunks as 768-d zeros. Those chunks were silently unsearchable, and the dimension-mismatch guard then advised a --reset of an index that had just been built. The width is now derived from the model name (Ollama tags stripped); a width observed from a real response still takes precedence, and unknown models keep their previous fallback.
  • Quiet cosine matmul. numpy 2.0 on Apple Accelerate raises divide/overflow/invalid RuntimeWarnings on float32 matrix @ vec even when every output is finite. The three cosine matmuls in storage.py now run under np.errstate; scores are unchanged.

Compatibility

  • Existing indexes are byte-compatible; no rebuild is required.
  • Indexes that already contain wrong-width zero vectors from an earlier version are still handled by the existing dimension-mismatch guard; rebuilding with skygrep index <repo> --reset makes those chunks searchable again.
  • No CLI, JSON, or configuration surface changed.

Verification

  • New tests/test_embeddings_zero_vector.py (9 tests) covers known-model widths, tag stripping, both embedder backends, precedence of an observed width, and the exact failure path (batch request fails, per-chunk fallback fails, no success yet) with the HTTP call mocked.
  • CI passed on Python 3.9, 3.10, 3.11, and 3.12 (pull request #12).
  • A real query against a freshly built index logged zero RuntimeWarnings after the change (three before).

Privacy

The change set (source, tests, and these notes) was scanned for absolute user paths, usernames, email addresses, IP addresses, credentials, and temporary-directory paths before publication. The only host reference is the unroutable loopback 127.0.0.1:1 used by a test to force a connection failure. No network, telemetry, or model-routing behaviour changed.

Known follow-ups

  • A chunk whose embedding failed is still persisted as a zero vector, so it is indistinguishable from a real chunk inside the database. Whether failed embeddings should be skipped or retried instead is a separate decision.