Skip to content

Add experimental EmbeddingGemma 2 text profiles and isolated end-to-end validation - #1071

Open
jorgepb96 wants to merge 3 commits into
mainfrom
codex/embeddinggemma-2-desktop
Open

jorgepb96 wants to merge 3 commits into
mainfrom
codex/embeddinggemma-2-desktop

Conversation

@jorgepb96

Copy link
Copy Markdown
Owner

Summary

Adds experimental local EmbeddingGemma 2 Q8 text profiles at 512 and 256 dimensions. They share one pinned download and a dedicated CPU worker; existing defaults and historical embedding behavior are preserved. Selecting a different profile requires explicit preparation of compatible vectors.

The integration provides query/document roles and titles, full immutable embedding contracts, an 8192-token limit including prompts/special tokens, bounded batches/threads, query priority, cancellation and recovery, and compatible documentary retrieval and server exports. It also fixes extraction startup/context handling and concurrent collection updates found during real document import. XLSX becomes available to documentary preparation.

Settings clearly labels the family experimental and explains shared deletion. UI copy and specific runtime errors are localized in all eleven translated languages, including the worker's nested failure reason.

Related issue

Refs #1070. This remains open for the grounding, platform and performance gates listed below.

Type of change

  • Bug fix
  • New feature or improvement
  • Documentation or translation
  • Database, privacy, security, or infrastructure change

Validation

  • npm run lint, npm run typecheck, npm run build and npm run build:server-web.
  • npm run test:embeddinggemma:contracts: 35 passing tests.
  • Focused API/catalog/i18n/documentary regressions: 106 passing tests; real Server Web native-vault/security regressions: 3 passing tests.
  • Complete npm test inventory, via npm run test:ci (same test files, concurrency limited to two): 4,634 passed, 2 skipped. It found one stale generated sitemap after the dependency commit; npm run site:sitemap repaired it and all 3 sitemap tests pass on rerun. The original full-run log is retained with its failure and repair reference.
  • npm run test:e2e: general Electron UI smoke passes.
  • Final actual macOS ARM64 application package: both profiles run offline from ASAR; shared-family Settings, explicit profile rebuild, localized deletion confirmation and packaged license notices pass.
  • Isolated comparative/product campaigns, native interruption/restart, 10K Desktop capacity, long-context limits and disposable server publication/query.

The archived campaign exercises five product configurations in real Playwright/Electron processes: 40 imported documents, 120 retrieval queries, 12 Research Chat scenarios with two repetitions per configuration, semantic-candidate traces, resolvable citation navigation, incremental additions/edits/replacements, deletion/restoration, notebook exclusions, conversation attachments, model/vault changes, native failure/cancellation, restart and offline retrieval. Eight controlled configurations compare semantic, hybrid and lexical retrieval. Only DeepSeek Flash generation reaches a remote provider; embeddings remain local.

The M2/16 GB 512-profile Desktop run recorded hot p95 414 ms with 10,000 real generated chunks and a conservative resident-memory growth upper bound of 1.23 GiB. 2K/8K inputs are measured separately. The 256-profile product Recall@10 is 0.993; the 512-profile value is 0.998. The partly parallel synthetic corpus does not establish general multilingual quality.

Release limitations: the source-reviewed factual-answer sample fails the 95% grounding gate, although all captured citations resolve and reviewed insufficient-evidence scenarios are recognized. Windows x64, Linux x64 and macOS Intel native/package validation and separate 256-profile capacity remain pending. Both profiles therefore remain experimental and validatedProfiles is empty. The package is a local ad-hoc macOS ARM64 smoke build, not a Developer ID release signature.

See implementation and commands, campaign report and verification evidence. The audit archive includes authored fixtures, hashes, gold annotations, rankings, answers, source-grounding reviews and QA screenshots. It contains no model weights or real profiles.

Screenshots

The final packaged application running against a temporary QA profile:

Experimental shared EmbeddingGemma family and localized license details

Deletion confirmation identifies both profiles that share the download

Privacy and data review

  • No secrets, credentials, private vault content, protected personal/student data or confidential documents are included. The corpus contains authored fixtures and public-paper excerpts; source attribution is preserved.
  • New network access is explicit, documented and initiated by the user. Weights download from pinned upstream resources on demand; no weights are redistributed or mirrored.
  • No rosters, grades, student answers or protected data are sent to AI providers.
  • No AI grading, ranking, profiling or evaluation of students is introduced.
  • Database/scope/cache/export effects are documented and tested. No schema migration or default-model change is introduced. QA uses marked temporary roots, separate libraries/vaults/caches/databases and an OS isolation boundary; no real database opens escaped those profiles.

The isolated provider proxy enforces direct DeepSeek Flash, two concurrent paid calls and a campaign-wide $5 cap. Recorded committed/reserved spend is below $1.77. Content-bearing traces are restricted to marked QA profiles. Credentials are copied only as the expressly authorized encrypted file before QA launch and are absent from reports.

The resource registry records Apache-2.0 per asset and packages the attribution/dependency notices. The upstream model card's Prohibited Use Policy sentence remains documented as unresolved before any redistribution/mirroring; this PR does neither.

Contributor checklist

  • Written in English and references an existing issue.
  • Attached screenshots from isolated QA.
  • Read CLA.md; the existing public acceptance for GitHub account jorgepb96 matches the current agreement digest. No new acceptance is submitted on anyone's behalf.
  • Added/updated focused tests and existing role-aware test doubles.
  • Updated documentation and reproducible audit commands.
  • Updated all language tables for new static UI copy and runtime errors.
  • Preserved local-first behavior and privacy boundaries.
  • Read and followed CONTRIBUTING.md and CODE_OF_CONDUCT.md.

This branch has not been deployed

No deployments
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