Skip to content

Keep L6, warm on load, show a download percentage - #6

Open
aashutoshrathi wants to merge 2 commits into
mainfrom
warm-with-progress
Open

Keep L6, warm on load, show a download percentage#6
aashutoshrathi wants to merge 2 commits into
mainfrom
warm-with-progress

Conversation

@aashutoshrathi

Copy link
Copy Markdown
Contributor

Goal: less net wait, without giving up quality

Direction correction after the L3/defer experiment (#5). Keeping all-MiniLM-L6-v2 for its better retrieval quality, and cutting the felt wait a different way:

  • Warm on load, in the background. The model download starts on page load (in the Web Worker, off the main thread), so the ~23 MB overlaps with the time you spend reading the page. By the time you click the search box, it's usually already loaded — perceived wait ≈ 0.
  • Download percentage. The status now reads Setting up smart search… 47% (from transformers.js's progress_callback) instead of an item count. The item count only ever appeared on the rare fallback path where precomputed vectors are missing; on the normal path there's no per-item embedding, so a % of the model download is the meaningful signal.

Relationship to open PRs

Built on top of #4 (empty-description fix), so it includes those commits. It supersedes #5 (which swapped to the smaller L3 model and deferred the download — reverted here). Suggested: merge this, close #4 and #5.

Verified

On load, the model warms in the background with no interaction and the status settles to "on · ask in plain English" when ready; semantic search works on L6. The % updates during a real (non-localhost) download.

Items that ended with a secondary '[Source]' or '[Read]' link (often tweets) left
a dangling '... [Source.' tail in the description. tidy_desc now removes a trailing
bracketed source/read/tweet/link label. Regenerated index.html + vectors.f32.
Reverts the model swap/deferral direction in favour of less *net* wait:

- Stay on all-MiniLM-L6-v2 (better retrieval quality).
- Warm the model on load in the background (Web Worker), so the ~23 MB download
  overlaps with reading time instead of blocking a first search.
- Progress readout is now a download percentage ('Setting up smart search… 47%')
  from transformers.js's progress_callback, instead of an item count (which only
  ever appeared on the rare no-precomputed-vectors fallback path anyway).

Built on the empty-description fix (PR #4); supersedes the L3/defer branch (PR #5).
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