Paper | Code | ModelScope mirror
This repository contains the query-side LoRA adapter of the PEARL retriever from PEARL: Personalized Streaming Video Understanding with Runtime-Defined Concepts. PEARL keeps a memory of clip embeddings for a streaming video. To answer Past-Time questions about concepts that users define at runtime, it retrieves past clips from this memory. The adapter fine-tunes only how Qwen3-VL-Embedding-2B encodes text memory queries. Video clips are still encoded by the frozen base model, so a memory built with the original encoder stays valid.
| Base model | Qwen/Qwen3-VL-Embedding-2B |
| Adapter | LoRA, rank 16, alpha 32, dropout 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj in all 28 language-model layers (vision encoder unchanged) |
| Trainable parameters | 6.4M |
| Weights | adapter_model.safetensors, FP32, 25.7 MB |
| Applied to | Text memory queries only. Video clips and concept references use the frozen base model. |
| License | Apache-2.0 |
The adapter is trained on PSVU-10K, the training set released with PEARL. PSVU-10K contains 10k question groups built from YouTube videos of 155 source works. It is split by source work into 9k training groups and 1k validation groups, and its concepts are entities. The retriever is trained on the 5,384 Past-Time training questions. Each query is the retrieval query that PEARL's question rewriting produces with the base Qwen3-VL-8B. Its positives are the annotated evidence clips, and its negatives are verified negative clips.
The loss is a multi-positive contrastive loss. For each question, a softmax at temperature τ = 0.07 runs over its evidence clips and verified negatives, and the loss averages over all evidence clips. Clip embeddings come from the frozen base model and stay fixed during training.
| Hyperparameter | Value |
|---|---|
| Steps | 2,244 |
| Learning rate | 2e-5 |
| Optimizer | AdamW, weight decay 0.01 |
| Gradient clipping | 1.0 |
| Effective batch size | 8 |
| Temperature τ | 0.07 |
| Max input length | 8,192 tokens |
| Precision | BF16 |
| Seed | 42 |
The table shows retrieval on the entity concepts of PSVU-Bench with Qwen3-VL-8B+PEARL. Recall@k counts Past-Time questions whose annotated evidence is among the top-k retrieved clips. Hit also counts the adjacent clips that PEARL passes to the answering VLM.
| Retriever | R@1 | R@4 | Hit |
|---|---|---|---|
| Qwen3-VL-Embedding-2B | 7.85 | 22.25 | 34.82 |
| + PEARL query LoRA (this adapter) | 14.66 | 32.46 | 44.50 |
Pair this retriever with a trained answering VLM, which learns to answer from the retrieved evidence. With PEARL-Qwen3-VL-8B-LoRA, Qwen3-VL-8B+PEARL reaches an Overall accuracy of 61.41 on PSVU-Bench (Real-Time 62.62, Past-Time 60.19), up from 52.38 without training. The same retriever adapter also serves the trained LLaVA-OV-7B (PEARL-LLaVA-OV-7B-LoRA, Overall 45.07) and Qwen2-VL-7B (PEARL-Qwen2-VL-7B-LoRA, Overall 47.01) answering VLMs.
The adapter is meant to run inside the PEARL pipeline. Set up the repository as described in its README and download this repository. Load the adapter on the embedding model, and enable it only when encoding memory queries:
import sys
sys.path.insert(0, "PEARL/third_party/Qwen3-VL-Embedding")
from peft import PeftModel
from src.models.qwen3_vl_embedding import Qwen3VLEmbedder
embedder = Qwen3VLEmbedder(model_name_or_path="Qwen/Qwen3-VL-Embedding-2B")
embedder.model = PeftModel.from_pretrained(
embedder.model, "zyh200727/PEARL-Retriever-Qwen3-VL-Embedding-2B-LoRA", is_trainable=False)
embedder.model.eval()
# Memory queries (text): adapter enabled
query_emb = embedder.process([{"text": "What was <Alice> holding when she left the kitchen?"}])
# Video clips and concept references: frozen base encoder
with embedder.model.disable_adapter():
clip_emb = embedder.process([{"video": "clip_0001.mp4"}])
Because clips are encoded by the base model, an existing clip memory can be reused unchanged. To run the full pipeline with the released adapters, see the PEARL README.
The adapter weights are released under the Apache-2.0 License (see LICENSE). Use of the base model is subject to its own license.
@article{zheng2026pearl,
title={PEARL: Personalized Streaming Video Understanding with Runtime-Defined Concepts},
author={Zheng, Yuanhong and An, Ruichuan and Lin, Xiaopeng and Liu, Yuxing and Yang, Sihan and Zhang, Huanyu and Li, Haodong and Zhang, Qintong and Zhang, Renrui and Li, Guopeng and Zhang, Yifan and Li, Yuheng and Zhang, Wentao},
journal={arXiv preprint arXiv:2603.20422},
year={2026},
archivePrefix={arXiv},
eprint={2603.20422},
primaryClass={cs.CV}
}
Qwen/Qwen3-VL-Embedding-2B