tencent/EVIE-4.5B
- License
- apache-2.0
- Size
- not mirrored yet
No official torrent yet β requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from tencent/EVIE-4.5B
All models by tencent βNo official torrent yet β requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from tencent/EVIE-4.5B
All models by tencent βHigh-Precision Late-Interaction Retrieval β’ Dynamic Prefix-MRL (64Dβ2048D) β’ Training-Free HAC Token Compression
π€ EVIE-4.5B (Prefix-MRL & HAC) Β β’Β π€ EVIE-8B (Flagship Teacher) Β β’Β π GitHub: Tencent/EVIE
π’ Release Announcement: All model weights, training pipelines, token compression algorithms (HAC), and evaluation suites have been fully open-sourced in this repository. Full technical details, architectural ablations, and the formal research paper will be updated in an upcoming release.
Performance comparison across modern multi-vector late-interaction visual document retrievers on ViDoRe:
EVIE-4.5B embeds document and query tokens with a single 2048D linear projection head trained via ARD. You can truncate the channel dimension on-the-fly without maintaining different models:
Raw late-interaction representations keep all visual patch vectors (~750 vectors/page), requiring substantial storage. EVIE integrates Hierarchical Agglomerative Clustering (HAC) in a joint semantic-position space to cluster page tokens at indexing time:
Protocol paired-all-pages-dedup+process_queries+ndcg2r-20260827 ($\text{MVT} = 1024$, bidirectional attention):
Documents can be URLs, local image paths, or PIL.Image objects. The example returns the full 2048-dimensional token embeddings. Scores can vary slightly with dtype and attention backend. To use a smaller Prefix-MRL dimension, slice and renormalize:
Student training executes Prefix-MRL plus ARD: capacity-aware relation distillation and margin distillation against frozen EVIE-8B, with a Preview-anchor term on the 128D prefix:
This repository is licensed under the Apache-2.0 License [blocked].
Query Text βββββββββΊ ColQwen3.5 (BiDir Attention) βββββΊ Elastic Multi-Vectors (64Dβ2048D) β MaxSim Matching β Doc Image βββββββββΊ ColQwen3.5 (Vision Encoder) βββββΊ HAC Compression βββΊ 32 Vectors / PageFull Projection (2048D) [========================================================] 66.02Prefix 1024D [============================] 65.94Prefix 512D [==============] 65.90Prefix 256D [=======] 65.68Prefix 128D [===] 65.27Prefix 64D [=] 64.51git clone https://github.com/Tencent/EVIE.gitcd EVIEpip install -r requirements.txtexport PYTHONPATH="$(pwd)/colpali${PYTHONPATH:+:$PYTHONPATH}"import torchfrom PIL import Imagefrom colpali_engine.models import ColQwen3_5, ColQwen3_5Processorfrom colpali_engine.models.qwen3_5.colqwen3_5.modeling_colqwen3_5 import set_active_head
model_id = "tencent/EVIE-4.5B"
# 1. Load model with FlashAttention and bidirectional attentionmodel = ColQwen3_5.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="cuda", attn_implementation="flash_attention_2",).eval()model.enable_bidirectional_attention()
# 2. Select any Matryoshka head: 64, 128, 256, 512, 1024, or 2048set_active_head(model, 128)
# 3. Process query and document imageprocessor = ColQwen3_5Processor.from_pretrained(model_id)images = [Image.open("examples/demo/pages/q3_revenue.png").convert("RGB")]queries = ["What is the total quarterly revenue?"]
image_batch = processor.process_images(images).to(model.device)query_batch = processor.process_queries(queries).to(model.device)
# 4. Generate multi-vector representations and late-interaction scorewith torch.inference_mode(): image_embeddings = model(**image_batch) model.rope_deltas = None # Reset RoPE deltas before text query forward query_embeddings = model(**query_batch)
scores = processor.score(query_embeddings, image_embeddings)print("Late-interaction MaxSim Relevance Score:", scores)pip install "sentence-transformers[image] @ git+https://github.com/huggingface/sentence-transformers.git"from sentence_transformers import MultiVectorEncoder
model = MultiVectorEncoder("tencent/EVIE-4.5B")
queries = [ "What is the variable represented on the y-axis of the graph?", "Total outlay is maximum in which year?",]documents = [ "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc1.jpg", "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc2.jpg", "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc3.jpg", "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc4.jpg",]
query_embeddings = model.encode_query(queries)document_embeddings = model.encode_document(documents)print(query_embeddings[0].shape, document_embeddings[0].shape)# torch.Size([23, 2048]) torch.Size([991, 2048])
scores = model.similarity(query_embeddings, document_embeddings)print(scores)# tensor([[17.2500, 7.6084, 6.7920, 4.8398],# [ 4.5312, 12.7812, 4.3530, 4.2368]])from torch.nn.functional import normalize
dimension = 128query_embeddings = [normalize(embedding[..., :dimension], dim=-1) for embedding in query_embeddings]document_embeddings = [normalize(embedding[..., :dimension], dim=-1) for embedding in document_embeddings]scores = model.similarity(query_embeddings, document_embeddings)EVIE/βββ model.safetensors # EVIE-4.5B weights (safetensors)βββ config.json # Model configuration (Prefix-MRL, max 2048)βββ processor_config.json # Multimodal processor configβββ infer.py # Standalone inference & scoring CLIβββ colpali/ # ColQwen3.5 + Prefix-MRL + ARDβββ code/β βββ teacher/ # EVIE-8B training arms and soup mergingβ βββ student/ # EVIE-4.5B Prefix-MRL / ARD distillationβ βββ shared/ # Data loaders, adapter merges, and 138-task eval harnessβ βββ compress/ # Training-free HAC token compression pipelineβββ examples/demo/ # 8-page retrieval demo (run.sh)βββ env.sh.example # Environment variables templatecp env.sh.example env.shsource env.sh
# Step 1: Train EVIE-8B teacher arms and mergebash code/teacher/run.sh
# Step 2: Distill EVIE-4.5B student with ARD lossexport TEACHER_DIR=../Evie-8Bbash code/student/run.sh
# Step 3: Run comprehensive 138-task evaluationMODEL_DIR=. RUN_NAME=evie-4.5b bash code/shared/eval_run.sh@misc{tencent2026evie, title = {EVIE: High-Performance Multilingual Visual Document Retrieval with Matryoshka Embeddings and Token Compression}, author = {Wang, Zifei and Wen, Wei}, year = {2026}, howpublished = {\url{https://github.com/Tencent/EVIE}}, note = {Corresponding author: Wei Wen <jawnrwen@tencent.com>}}