eCity-Omni
eCity-Omni: Improving Time Awareness of Omni Large Language Models
eCity-Omni is an omni-modal (video + audio + text) large language model, supporting video temporal grounding and multimodal open-ended QA. This document only covers the inference pipeline from model invocation to prediction.
1. Model Release
All weights are hosted in the HuggingFace model repository eCityAI-Sup/eCity-Omni:
| Weights | Description |
|---|---|
Base model files (HF format: config.json, tokenizer, pytorch_model-*.bin, plus large-v3.pt and the BEATs encoder) | The original unpruned omni-modal model. Always required as --model_path; it provides the tokenizer, vision tower, and speech encoders. |
ecity_omni_7p984b_pruned_grpo.pt | Recommended. The final released model: MLP-pruned to 7.98B parameters, then recovered via SFT and GRPO training. Applied on top of the base model with --native_pruned_ckpt. |
ecity_omni_7p984b_pruned_sft.pt | The SFT-recovered pruned model (7.98B parameters, no GRPO stage). Same usage as above. |
The two .pt files are patches that replace the language backbone of the base model; the vision tower and speech encoder always come from the base model files.
2. Environment Setup
conda create -n eCity-Omni python=3.10 -y
conda activate eCity-Omni
pip install torch==2.3.0+cu118 torchvision==0.18.0+cu118 torchaudio==2.3.0+cu118 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
# flash-attn prebuilt wheel (Linux, cu118, py3.10):
# https://github.com/Dao-AILab/flash-attention/releases/download/v2.6.0/flash_attn-2.6.0+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install flash_attn-2.6.0+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
ffmpeg must also be installed on the system (used to extract audio from videos).
3. Download Weights
The ./models/eCity-Omni directory does not exist in the repository; it is created by the download command below. It will contain the base model files (HF format: config.json, tokenizer, pytorch_model-*.bin, large-v3.pt, the BEATs encoder) and the two pruning .pt patches, all from the same HuggingFace repository:
pip install -U "huggingface_hub[cli]"
huggingface-cli download eCityAI-Sup/eCity-Omni --local-dir ./models/eCity-Omni
4. Single-Video Inference (multimodel.py)
Given a video path and a question, a single command runs ffmpeg audio extraction → uniform frame sampling + timestamps → model inference → result printing; temporary audio files are cleaned up automatically.
Temporal grounding with the final (pruned + GRPO) model:
export PYTHONPATH=./
python multimodel.py \
--model_path ./models/eCity-Omni \
--native_pruned_ckpt ./models/eCity-Omni/ecity_omni_7p984b_pruned_grpo.pt \
--video_path /path/to/video.mp4 \
--question "In which segment does the footage show ...?"
To use the SFT-recovered variant instead, point --native_pruned_ckpt to:
--native_pruned_ckpt ./models/eCity-Omni/ecity_omni_7p984b_pruned_sft.pt
A patch report is printed to the console during loading to confirm the pruned weights were applied successfully. Without --native_pruned_ckpt, the original unpruned base model is used directly:
python multimodel.py \
--model_path ./models/eCity-Omni \
--video_path /path/to/video.mp4 \
--question "In which segment does the footage show ...?"
Temporal Grounding Output Format
By default, the script appends the same format instruction as the training data to the question:
Give the timestamps in the fromat: From second{} to second{}.
(Note: the fromat typo is intentional — the instruction must match the training data verbatim.)
The model answers in the form From second{X} to second{Y}., and the script parses and prints:
[42.0, 58.5]
That is [start, end] with one decimal place; if parsing fails, the raw model output is printed instead.
Arguments
| Argument | Default | Description |
|---|---|---|
--model_path | ./models/eCity-Omni | Path to the base model (HF-format directory) |
--video_path | (required) | Input video |
--question | (required) | Question text |
--frame_num | 64 | Number of uniformly sampled frames |
--max_new_tokens | 1024 | Maximum generation length |
--temperature | 0.0 | 0 = greedy decoding (reproducible for evaluation) |
--no_grounding_prompt | off | Do not append the format instruction; output the raw natural-language answer (for open-ended QA) |
--native_pruned_ckpt | none | Path to a pruned .pt patch; if provided, the pruning patch is applied on top of the base model |
5. FAQ
On a server without internet access: couldn't connect to huggingface.co ... openai/clip-vit-large-patch14
When loading the vision tower, eCityOmni/model/multimodal_encoder/oryx_vit.py downloads the CLIP image processor config (a few KB) from HuggingFace. Choose one of the following fixes:
- Set a mirror before running:
export HF_ENDPOINT=https://hf-mirror.com - On a machine with internet access, download
preprocessor_config.jsonofopenai/clip-vit-large-patch14, copy it to the server, and changeCLIPImageProcessor.from_pretrained(...)inoryx_vit.pyto the local path - If another user on the same machine already has the file in their HF cache:
export HF_HOME=/path/to/their/.cache/huggingface
On a server without internet access: downloading Whisper speech-encoder weights
On first run, the speech encoder downloads the Whisper weights (the model size is specified by speech_encoder in the base model's config.json) from openaipublic.azureedge.net into ~/.cache/whisper. Pre-download them on a machine with internet access and copy them to the same path on the server.
Citation
@article{chronusomni,
title={ChronusOmni: Improving Time Awareness of Omni Large Language Models},
author={Chen, Yijing and Wu, Yihan and Guan, Kaisi and Ren, Yuchen and Wang, Yuyue and Song, Ruihua and Ru, Liyun},
journal={arXiv preprint arXiv:2512.09841},
year={2025}
}
Acknowledgement
eCity-Omni is built on the open-source base model ChronusOmni — we thank its authors for releasing the model. Our code is conducted on Ola and LLaVA.
License
This project is released under the Apache-2.0 License.