mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Mirror of https://github.com/zotero/zotero.git
Passages can be embedded by a local llama.cpp server serving the same model, configured from Settings -> Advanced. The server is trusted only because its vectors match the local model's, never by name: - Zotero.Embeddings.Endpoint: verify() embeds calibration passages locally and remotely (plus one chunk-length text) and stores a typed verdict (ok, unreachable, unauthorized, not-embeddings, width-mismatch, low-agreement, context-too-small) keyed to the URL and model version. Passages route to the endpoint only while a matching verdict says ok; queries always embed locally. - Every batch carries a sentinel text whose local vector is cached, so a server switched to another model or pooling is caught on that batch and nothing wrong is stored. Three consecutive failures skip the endpoint for the rest of the run; a run start rechecks a verified endpoint. - MODELS gains `serving` (GGUF repo and quant) for both bekko models; getCommand() renders the llama.cpp command with a 4096 context. - Preferences: status line and Configure Endpoint dialog with the URL, the facts the server must match, a copyable command, typed errors, and a Stop Using Endpoint button. Also fixes two tokenizer defects in the runtime's transformers.js that the endpoint comparison exposed, both affecting every locally embedded bekko vector: - Metaspace's leading word marker was never prepended (the runtime needs the legacy add_prefix_space flag). `leadingSpace: true` in MODELS adds it in embedMany(). Short texts had drifted to cosine 0.83-0.95 against the reference. - Newlines and repeated spaces were tokenized differently from the reference. Whitespace runs now collapse to one space in both embedding paths. |
||
|---|---|---|
| .github/workflows | ||
| app | ||
| chrome | ||
| defaults/preferences | ||
| document-worker@6d0c0ce45d | ||
| js-build | ||
| note-editor@acec74d09b | ||
| reader@c6edbfff75 | ||
| resource | ||
| scripts | ||
| scss | ||
| styles@dff7452b24 | ||
| test | ||
| translators@60f2d542ff | ||
| types/gecko | ||
| .babelrc | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| chrome.manifest | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| COPYING | ||
| eslint.config.mjs | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| update.rdf | ||
| version | ||
Zotero
Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
Please post feature requests or bug reports to the Zotero Forums. If you're having trouble with Zotero, see Getting Help.
For more information on how to use this source code, see the Zotero documentation.