PARAS MADAN
All writing

Latest in AI

Tencent OmniEVIE-4B: how to test page and video retrieval

Build a small OmniEVIE index, separate CPU search from GPU encoding, and test whether retrieved pages and clips point to the right evidence.

A search system can return the right PDF and still fail the user. If the answer sits in one table on page 43, the returned document is only a starting point. Tencent's OmniEVIE-4B is a retrieval model for text, document images and video that can also help locate evidence within a matched item.

Tencent's public OmniEVIE repository appeared on November 24 and links to the 4B weights. The project lists Apache 2.0 for the released code and models. The performance figure worth reading closely is Tencent's reported 54.2 ms for a single CPU thread searching one million already-indexed records. That's the search stage, not the time from receiving a question to showing a result.

Size the index and the encoder separately

OmniEVIE represents an item with multiple small vectors. The compressed configuration keeps up to 128 vectors of 64 dimensions per record, quantized to int8. The search runs cheap comparisons over the broader pool and spends more work on the narrowed shortlist. Tencent gives 8.82 GiB per million records as an index footprint figure for that configuration.

Those records might be rendered pages, not entire PDFs. A collection of 20,000 manuals with 50 indexed pages each is already a million page records. Treat the estimate as a starting point for the index and measure memory for your real ID strings, metadata, index loading and concurrent requests separately. It doesn't cover the encoder or the source material.

Run a small mixed-media fixture

The package requirements include FlashAttention. Use the CUDA path in Tencent's setup for the first test rather than assuming the single-thread CPU result implies CPU-only model inference.

Use a couple of synthetic page images, short clips and text notes. The shipped CLI lets you index them together and query a target modality:

omnievie --weights tencent/OmniEVIE-4B index fixture.pt pages/ clips/ notes/
omnievie --weights tencent/OmniEVIE-4B search fixture.pt \
  --text "Where is the maximum load shown?" --target image --top 3

Render PDFs to page images beforehand. The encoder dispatches by file extension and does not list PDF as a supported input type. Preserve the document ID and page number when naming each image so the application can open the original page.

Measure a hit and its evidence as separate steps

The CLI prints a score and a record ID. It doesn't print a bounding box. Use the Python image localization method on a retrieved page when your interface needs to highlight evidence. The released method takes the source image and encodes it again. Keep the original page accessible and include localization in your timings instead of adding the CPU search figure to a latency target as though the rest were free.

For a useful evaluation, create similar pages that differ in one value, one unit or one column label. Grade whether the right page appears in the first few results, then grade whether the highlight actually includes the relevant cell. Do the same for clips with an expected time interval. A correct asset with a wrong highlight still leaves work for the reader.

Compare against the simpler route

Measure query encoding, index search and evidence localization in separate timers, plus the total across them. Include loaded and cold-start runs and report p95 at the concurrency your app needs. Compare against the search system you have already, such as text extraction plus a conventional text index. The extra model work makes sense only if the new route finds evidence that the simpler one misses, or helps users verify it faster.


I'm Paras. I work at the intersection of AI, engineering and distribution.

I help AI teams write technical guides that show developers how to measure a feature on real workloads.

Book a 30-minute call