Skip to content

Bringup/jina embeddings v3 hf - #2679

Open
willg-nv wants to merge 3 commits into
NVIDIA:mainfrom
willg-nv:bringup/jina-embeddings-v3-hf
Open

willg-nv wants to merge 3 commits into
NVIDIA:mainfrom
willg-nv:bringup/jina-embeddings-v3-hf

Conversation

@willg-nv

@willg-nv willg-nv commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Add native FP32 text embeddings for jinaai/jina-embeddings-v3-hf, including default, query, and document roles.

Background

Related to #2666. The jina_embeddings_v3 family supports one text input with mean pooling and L2-normalized output.

Exit Criteria

  • Build/load the pinned checkpoint through the family and native task interfaces.
  • Preserve tokenization, role-specific retrieval adapters, pooling, and embedding normalization.
  • Enforce the committed independent-reference comparisons and pass the applicable repository checks before claiming full readiness.

Implementation

  • Add a family-owned rotary encoder builder with query/passage LoRA adapter selection.
  • Add native Unicode/tokenizer handling and the text-to-embedding runtime interface.
  • Add ownership coverage, a C++ tokenizer helper, and a pinned-checkpoint E2E recipe for all three roles and multilingual input.

This adds family-specific bundles and dependencies without changing shared public API/ABI layouts or the shared bundle container format. Family dependencies are declared in requirements.txt.

Change categories

  • Model or runtime behavior
  • Public API
  • ABI
  • Bundle or artifact format
  • Dependencies
  • Documentation only
  • CI or developer tooling

Validation

Commands and Results

The E2E test compares 1,024-dimensional native embeddings with the upstream reference, enforces absolute-error/cosine and normalization checks, and checks that the retrieval roles change the output. These describe tests added in the diff, not an execution result.

Reproduction after preparing the pinned checkpoint, family dependencies, and native runtime required by the test:

python3 -m pytest families/jina_embeddings_v3/tests/test_support.py -q
python3 -m pytest families/jina_embeddings_v3/tests/test_e2e.py --e2e-testcase jina-embeddings-v3-hf -q

These commands were not rerun for this description-only update. No build, inference, accuracy, performance, or full-premerge pass is asserted here; see the PR checks for public execution results.

Hardware, Environment, and Revisions

PR head: e5fb9dedcc4def80fd3554ea708731bddb14fba3. The committed recipe pins jinaai/jina-embeddings-v3-hf at d18862d9a48706220815554fac3ebb4dfa46fc28. FP32, one text input and one device; the committed recipe uses a 256-token profile. The family requirements pin Transformers and PEFT. Execution requires a CUDA-capable GPU and TensorRT. A tested GPU/OS/CUDA/TensorRT matrix is not asserted by this description.

Not Run / Remaining Gaps

Other task adapters, batching, reduced precision, quantization, and distributed execution are outside this change. The recipe does not establish maximum-context behavior or retrieval benchmark/performance qualification.

Contributor Self-Review

  • I have completed a self-review of this change.

Notes For Future Readers

Review tokenizer behavior and adapter selection together with the embedding comparisons. The checkpoint's retrieval adapter assets are required in addition to the base encoder weights.

Public model reference: jinaai/jina-embeddings-v3-hf.

Risk level

  • Low
  • Medium
  • High

Tokenizer and retrieval-adapter differences can change embedding semantics even when shapes remain valid; shared embedding interfaces remain unchanged.

Build the rotary encoder and select the published query or passage LoRA adapter inside one TensorRT graph. Default embeddings retain the unadapted base model; all roles use masked mean pooling and L2 normalization.

Cover native SentencePiece normalization, pinned checkpoint parity against Transformers and PEFT, multilingual inputs and role-dependent embeddings through the text embedding Task API.

Signed-off-by: Will Guo <willg@nvidia.com>
Signed-off-by: Will Guo <willg@nvidia.com>
…tatic runtime contracts

Signed-off-by: Will Guo <willg@nvidia.com>
@willg-nv willg-nv self-assigned this Nov 25, 2026
@willg-nv
willg-nv requested a review from yifeif-nv as a code owner November 25, 2026 08:15
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Explain Change →

Note

CodeRabbit ASCII loading animation

Currently processing new changes in this PR. This may take a few minutes, please wait...

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f536b2f and e5fb9de.

Files selected for processing: 14

  • families/jina_embeddings_v3/__init__.py
  • families/jina_embeddings_v3/model.py
  • families/jina_embeddings_v3/requirements.txt
  • families/jina_embeddings_v3/runtime/CMakeLists.txt
  • families/jina_embeddings_v3/runtime/charsmap.h
  • families/jina_embeddings_v3/runtime/plugin.cpp
  • families/jina_embeddings_v3/runtime/tokenizer.h
  • families/jina_embeddings_v3/runtime/unigram_tokenizer.cpp
  • families/jina_embeddings_v3/support.py
  • families/jina_embeddings_v3/tests/__init__.py
  • families/jina_embeddings_v3/tests/cpp/test_tokenizer.cpp
  • families/jina_embeddings_v3/tests/manifests/jina-embeddings-v3-hf.json
  • families/jina_embeddings_v3/tests/test_e2e.py
  • families/jina_embeddings_v3/tests/test_support.py

@willg-nv willg-nv linked an issue Nov 25, 2026 that may be closed by this pull request
2 tasks done

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.

Feature: support jinaai/jina-embeddings-v3-hf

1 participant