Skip to content

2.26.8

Choose a tag to compare

@KennethEnevoldsen KennethEnevoldsen released this 18 Oct 12:04
· 215 commits to main since this release

2.26.8 (2026-10-18)

Fix

  • fix: citation check only looks up new citations on PRs (#5701)

  • fix: citation check only looks up new citations on PRs

  • add citation_cache json (161131c)

Unknown

  • model: EmbeddingGemma 2 (#5588)

  • Add EmbeddingGemma 2 ModelMeta for text, text-vision, and text-audio

This PR registers three modular entries for the EmbeddingGemma 2 model family in mteb/models/model_implementations/google_embeddinggemma.py:

  1. google/embeddinggemma-2-text (271.0M parameters): Text backbone for MTEB (Multilingual v2, English v2, Code v1).
  2. google/embeddinggemma-2-text-vision (438.8M parameters): Text-vision model for MIEB (lite).
  3. google/embeddinggemma-2-text-audio (576.6M parameters): Text-audio model for MAEB.

Model Details

Checklist

  • I have filled out the ModelMeta object to the extent possible
  • I have ensured that my model can be loaded using
    • mteb.get_model(model_name, revision) and
    • mteb.get_model_meta(model_name, revision)
  • I have tested the implementation works on a representative set of tasks.
  • The model is public, i.e., is available either as an API or the weights are publicly available to download
  • I reproduced results from the original paper (if applicable) on at least one benchmark, and I am including the results in the PR description.
  • Add canonical google/embeddinggemma-2 ModelMeta and loader wrapper

  • Add EmbeddingGemma 2 per-task evaluation recipe and reference wrapper

The model-card numbers for MTEB(Multilingual, v2), MTEB(eng, v2),
MTEB(Code, v1) and MIEB(lite) were produced with one instruction and one
max sequence length per task, so a task-type prompt dictionary cannot
reproduce them. This commit makes the exact setup part of the reference
implementation:

  • EMBEDDING_GEMMA_2_RECIPES: inline (instruction, max_seq_length) tables
    per benchmark (131 + 41 + 12 + 53 entries; grouped by benchmark because
    17 tasks use different sequence lengths in Multilingual vs eng), plus the
    MIEB asymmetric-task and no-prompt-on-image-input sets.
  • EmbeddingGemma2Wrapper(SentenceTransformerEncoderWrapper): a thin
    subclass that loads only the requested modality towers, sets the
    per-task max_seq_length and writes the "task: {instruction} | query: "
    / "title: {title} | text: {body}" templates into the batch text before
    delegating to the parent (which handles multimodal inputs, MRL
    truncation via embed_dim and normalisation).
  • The four ModelMetas now use modality-specific loaders of this wrapper.

Reproduced with public weights/datasets on mteb 2.20.3 (768d):
MTEB(Multilingual, v2) 61.05 (card 61.36), MTEB(eng, v2) 67.66 (68.46),
MTEB(Code, v1) 77.48 (78.68), MIEB(lite) 65.22 Mean(TaskType) (64.64,
clean images; the card's MIEB run JPEG re-encoded every image).

  • Use one google/embeddinggemma-2 ModelMeta with use_image/use_audio experiments

Per review (one model entry, settings as experiments): replace the
-text / -vision-text / -audio-text ModelMetas with a single
google/embeddinggemma-2 entry whose loader is EmbeddingGemma2Wrapper.

  • use_image / use_audio are the wrapper's experiment kwargs; they
    select which towers are loaded (text is always on) and are recorded as
    experiment_kwargs, so MIEB results live under
    google__embeddinggemma-2/<rev>/experiments/use_image=True/.

  • A mteb_model_meta setter (same pattern as uembed_models.py) reports the
    modalities, n_parameters and memory_usage_mb of the towers actually
    loaded: text 271M, text+image 439M, text+audio 577M, all 744M.

  • embed_dim lists the supported MRL sizes [768, 512, 256, 128] so
    embed_dim= can be passed as an experiment.

  • Simplify EmbeddingGemma 2 wrapper and fix text-less batches

  • One flat EMBEDDING_GEMMA_2_TASK_RECIPE table instead of four per-benchmark
    tables and a recipe kwarg: mteb keeps one result per task, and for the
    tasks shared between benchmarks the entry kept is the one the reported
    score was computed with (the alternative gives the same score for most).

  • Drop default_max_seq_length and the config/model kwargs merging; tower
    bookkeeping is a small table; no torch/logging imports.

  • Fix encode() for batches without text: the batch size is now taken from
    whichever column is present (image, audio or video) instead of assuming
    "image", which raised KeyError on audio/video tasks and produced empty
    document texts for image-corpus retrieval tasks.

  • Add MAEB recipe, 16kHz audio resampling, prompt-first ordering, and simplified task types

  • Make media/text ordering explicit and keep image blocks within max_seq_length

  • media_first kwarg (default False = text before image/audio, as in the
    previous commit). media_first=True reproduces the model-card MIEB(lite)
    run: the internal pipeline inserted images at text position 0, and the
    image-first scores match the internal per-task numbers more closely
    (mean |delta| 1.56 vs 2.15 over the order-sensitive tasks; e.g.
    VidoreShiftProject internal 54.85 -> image-first 55.74 / text-first 65.31).
    Overall text-first is ~+0.4 Mean(TaskType).

  • With text before an image, long captions pushed the 256-token image block
    past max_seq_length and the processor raised "Mismatch in image token
    count" (WebQAT2ITRetrieval). Text preceding an image is now truncated so
    the full image block always fits.

  • removed max-len tuning and unreasonable prompt selection

also extended the defaults to be slightly more appropricate. E.g. use fact checking for task of the subtask claim verification and code retrieval for retrieval tasks containing code.

  • fix prog lang

Co-authored-by: Sara Smoot <sarasmoot@google.com>
Co-authored-by: Kenneth Enevoldsen <kennethcenevoldsen@gmail.com> (1e8ccf6)

  • fix remaining av wrappers (#5651)

  • fix: AuroLA-Omni keeps the checkpoint's image size

The model card caps pixels for video only. The processor-level max_pixels
also capped images, shrinking a 1080p image from a 78x138 to a 12x20 patch
grid. Video is unchanged (its cap is set per call).

  • fix: Jina v5 omni applies its eval video size on transformers 5

custom_st's _align_eval_processor only sets the video size when it is a
dict; on transformers 5 it is a SizeDict, so the eval limits
(longest 12845056, shortest 262144) were skipped. 32 frames at 1080p now
give a 16x28x52 grid instead of 16x40x72.

  • fix: UEmbed sizes video frames like its reference code

min_pixels/max_pixels passed to AutoVideoProcessor.from_pretrained are
dropped, so videos kept the processor defaults (16 frames at 1080p gave
about 12k tokens). UEmbed sizes a frame list with qwen-vl-utils
(total_pixels=1076832*32) and calls the processor with do_resize=False;
the wrapper now does the same, giving the reference's grids and pixels.

  • fix: UNITE applies qwen-vl-utils' minimum video frame size

The reference sets only a 360420 video max_pixels, so qwen-vl-utils'
VIDEO_MIN_PIXELS (128
28*28) is the floor. Only longest_edge was set, so
small clips stayed at the processor floor of 3136 px. Grids now match
qwen-vl-utils on transformers 4.57.

  • fix: PE-AV uses its fused heads only against the matching modality

video_plus_text is trained only against audio and audio_plus_text only
against video (PeAudioVideoModel.forward). They were also used when the
other side was text or the same media (EgoSchema, OmniVideoBench, CoVR,
CLDAT2A, ClothoMoment, SpeechEdit, XModBench VT2T/AT2T/AT2I), where
matching pairs scored about 0.15. Those tasks use the summed embeddings
again.

  • fix: UME-R1 samples 8 frames, as its eval does

The official video eval (video.yaml) uses num_frames: 8 for every video
set; the wrapper sampled at 2 fps up to 64 frames.

  • fix: msclap keeps the end-of-text token on long captions

msclap pads text to text_len but does not truncate, so the GPT-2 encoder
always pools on the appended <|endoftext|>. Truncating at 77 tokens cut it
off for longer captions. Text is now cut only at the encoder's position
limit; embeddings match msclap's preprocess_text for short and long
captions (2022 and 2023).

  • fix: VideoCollator skips a row's missing audio or video

Mixed-modality datasets can hold None for one modality; the collator tried
to resample it and crashed.

  • fix: LCO-Embedding picks the prompt's modality per item, as its template does

The authors' chat template ends each item with 'Summarize the above
<modality>', preferring image, then video, then audio, then text. mteb chose
one word per batch, preferring audio, so video+audio inputs said 'audio'
and mixed batches gave items the wrong word.

  • fix: GVE uses qwen-vl-utils' minimum video frame size

The model card sets only max_pixels=2002828 for video, so qwen-vl-utils'
VIDEO_MIN_PIXELS (1282828) is the floor, not 42828. Small clips now get
the card's grids.

  • docs: note per-clip forwards for encoders whose pooling does not mask padding

  • fix: install extras for AuroLA-Omni, PE-AV and VideoPrism

AuroLA loads through sentence-transformers' multimodal path (the card asks
for sentence-transformers and transformers 5), not qwen-vl-utils;
PeAudioVideoModel and VideoPrism ship with transformers 5.

  • fix: VideoPrism keeps the frames mteb sampled

Its video processor configs have do_sample_frames=True with num_frames 16 or
8, so any other frame count was re-sampled (large: 16 -> 8) or crashed
(fewer frames than num_frames). Default runs were unaffected.

  • fix: VLM2Vec-V2 gives video classification its MMEB instruction

MMEB-V2 puts a dataset instruction on the video side of video
classification (e.g. UCF101: 'What activities or sports are being performed
by the person in the video?'). Classification passes no prompt_type, so the
video got none. Kinetics-700, SSv2, UCF101, HMDB51 and Breakfast now get
MMEB's instructions.

  • fix: LanguageBind autocast accepts any device spelling

torch.autocast takes a device type; str(self.device) failed for an integer
device such as 0.

  • fix: OmniVinci encodes one item at a time and pads odd frame sizes

Its remote processor's pad_fn cuts the padding to the sequence's own
length, so any batch with a sequence under half the longest crashed
("Sizes of tensors must match"), e.g. MSR-VTT queries and video documents;
batched audio embeddings also changed with their batch-mates. Every input
now goes one at a time. H.264 also rejects odd frame sizes (NExT-QA has
500x375 clips), so frames are padded to even sizes before writing the mp4.

  • fix: ColQwen2.5-Omni runs long videos: checkpoint video size, smaller scoring batches

colpali's process_videos lets the Qwen2.5-Omni processor defaults (up to
602112 px per frame) override the checkpoint's 200704 px; video is now
processed with colpali's prompt plus the checkpoint's size (a 64-frame
480p clip: 12566 -> 7542 tokens). Scoring used colpali's default batch of
128 documents, which needs ~70 GiB for video documents; it now uses 16.
DiDeMo ran out of memory before (207 GiB) and now completes (R@1 0.517).

  • chore: lock qwen-vl-utils for the uembed extra

  • fix: VideoPrism requires transformers 5.13

VideoPrismVisionModel and VideoPrismClipModel first ship in transformers
5.13.0 (not in any 5.12.x); checked the base checkpoint loads and runs on
5.13.0. Adds a videoprism extra (in the conflict group, like the other
transformers-pinning extras) and relocks.

  • fix: MuQ-MuLan similarity accepts tensors (reranking tasks crashed)

  • Jina v5 omni: pass the eval video size through processor_kwargs

Review feedback: build the video processor with the eval sizes and pass it in
processor_kwargs instead of setting the size after loading. A processor-level
size kwarg doesn't work: custom_st's min/max pixels for images override it.

  • UEmbed: resize video tensors directly instead of round-tripping through PIL

Review feedback: apply qwen-vl-utils' total-pixel resize to the frame tensor.
The released qwen-vl-utils (0.0.14) rounds frame-list inputs to 64 pixels
first (fixed upstream in QwenLM/Qwen3-VL@fe12058, not yet released); the
direct resize follows the fixed code.

  • Jina v5 omni: only build the video processor when loading by name

Fixes the wrapper tests, which pass an already loaded model, and the
lowest-dependency run, whose transformers has no AutoVideoProcessor. (ac38ebd)