Instructions to use dvps/dvps-fm-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dvps/dvps-fm-v1 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("dvps/dvps-fm-v1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from dvps/dvps-fm-v1: direct link, hf CLI and curl.
- Browser
- Download file 22.7 kB
-
https://huggingface.co/dvps/dvps-fm-v1/resolve/main/README.md
- Command line
-
hf download hf://dvps/dvps-fm-v1/README.md
-
curl -L -o README.md https://huggingface.co/dvps/dvps-fm-v1/resolve/main/README.md
base_model: Qwen/Qwen2.5-Omni-7B
base_model_relation: finetune
library_name: transformers
pipeline_tag: other
license: cc-by-nc-sa-4.0
language:
- en
tags:
- multimodal
- qwen2.5-omni
- remote-sensing
- earth-observation
- ecg
- cardiac-mri
- speech-recognition
- lipreading
DVPS-FM-v1
Overview
Introduction
DVPS-FM-v1 is a multi-modal model based on the Qwen2.5-Omni-7B. In addition to Qwen's vision and audio towers, it uses four frozen domain encoders (TerraMind, a version of MedGemma SigLIP finetuned on ECGs, and the Auto-AVSR audio and video encoders), each connected to the language model through a trained projector. It accepts text, images, video, audio, Sentinel-1/2 rasters, ECG plots and cardiac MRI slices, lip-region video and produces text.
The model was finetuned on a mixture of 17 datasets from three application domains: geo-intelligence, cardiology, and language communication. It is released as a single checkpoint with the language model, encoders, and projectors.
- Parameters: 10.08B (22.4 GB of safetensors; language model in BF16, encoders in FP32).
- Input modalities: text, RGB image, video, audio, Sentinel-1 GRD + Sentinel-2 L2A, ECG or cardiac MRI image, lip-region video.
- Output: text only.
- Loading: a single
from_pretrainedcall withtrust_remote_code=True.
Model Architecture
ββββββββββββββββββββββββββ frozen encoders βββββββββββββββββββββββββββββ
text ββββββββββΊ β Qwen tokenizer β
RGB image/video β Qwen2.5-Omni vision tower β
raw audio βββββΊ β Qwen2.5-Omni audio tower β
S1GRD + S2L2A ββΊβ TerraMind v1 Large βββββββββββΊ projector ββΊ 128 Γ <|terramind|> ββββΊ Qwen2.5-Omni-7B Thinker βββΊ text
ECG / MRI βββββΊ β MedGemma-4B SigLIP βββββββββββΊ projector ββΊ 256 Γ <|medgemma|> β (28 layers, finetuned)
speech ββββββββΊ β Auto-AVSR audio encoder ββββββΊ projector ββΊ 80 Γ <|autoavsr_audio|> β
mouth video βββΊ β Auto-AVSR visual encoder βββββΊ projector ββΊ 80 Γ <|autoavsr_video|> β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Source | Finetuned |
|---|---|---|
| Language model | Qwen2.5-Omni-7B Thinker | Yes, all attention and MLP projections |
| Vision and audio towers | Qwen2.5-Omni-7B | No |
terramind |
TerraMind v1 Large, S1GRD (2 ch) + S2L2A (12 ch), 128Γ128 px | Projector only |
medgemma |
convaiinnovations/medgemma-4b-ecginstruct SigLIP, 896 px |
Projector only |
autoavsr_audio |
Auto-AVSR ASR base (LRS3 + VoxCeleb2), 16 s window | Projector only |
autoavsr_video |
Auto-AVSR VSR base, 88Γ88 grayscale mouth ROI | Projector only |
Supported Tasks
| Domain | Task | Input | Example prompt |
|---|---|---|---|
| Geo-intelligence | Multispectral captioning, QA, grounding | <terramind> S1 + S2 patch |
"Describe the land cover in this Sentinel scene." |
| High-resolution remote-sensing VQA | RGB image | "Is there a road next to the residential area?" | |
| Counting and area estimation | RGB image | "How many buildings are there?" | |
| Cardiology | ECG question answering | <medgemma> ECG plot (one per marker) |
"Does this ECG show atrial fibrillation?" |
| ECG diagnosis and explanation | <medgemma> ECG plot |
"List the diagnoses supported by this ECG and explain why." | |
| Cardiac MRI view, sequence, and structures | <medgemma> MRI slice |
"Which cardiac structures are visible in this slice?" | |
| Language communication | Speech recognition | audio | "Transcribe the audio into text." |
| Video-speech recognition / lipreading | <autoavsr_video> |
"Transcribe what the speaker says." | |
| Audio-visual speech recognition | <autoavsr_audio> + <autoavsr_video> |
"Transcribe what the speaker says." | |
| Spoken language understanding | audio | "What is the speaker's intent?" | |
| Spoken math to LaTeX | audio | "Write the spoken equation in LaTeX." | |
| Multilingual instruction following | text | Any text instruction | |
| General | Image question answering | RGB image | Any question about the image |
QuickStart
Model Description and Download
| Model | Description |
|---|---|
| DVPS-FM-v1 | The Qwen2.5-Omni-7B Thinker with the TerraMind, MedGemma, and Auto-AVSR encoders and their projectors, supporting text, image, audio, video, multispectral EO, ECG, and lip-video input, with text output. |
hf download dvps/dvps-fm-v1 --local-dir dvps-fm-v1
The repository contains the weights (model-0000X-of-00005.safetensors and the index),
config.json, the processor and tokenizer files, the custom code
(modeling_omni.py, configuration_omni.py, processor_omni.py, encoders_*.py),
and two support files:
terramind_mask_token.pt: TerraMind's pretrained missing-modality token, loaded on the first single-modality TerraMind input.auto_avsr/: theespnetmodules of Auto-AVSR (Apache-2.0, seeauto_avsr/LICENSE) that define the Auto-AVSR encoder architecture.
All paths in the configs are relative to the repository. The custom code resolves them in the local directory, or downloads them from the Hub repo the model was loaded from.
Transformers Usage
Installation
The model was tested with Transformers 5.2.0, plus the libraries used by the extra encoders. We strongly recommend a fresh environment.
pip install "transformers==5.2.0" accelerate
pip install qwen-omni-utils -U # native image/audio/video handling
pip install terratorch # TerraMind backbone
pip install av librosa soundfile torchaudio torchvision # Auto-AVSR and audio I/O
All encoder weights are already in the checkpoint, and the Auto-AVSR code is bundled, so nothing else needs to be cloned or downloaded.
Code Snippet
import torch
from transformers import AutoModelForCausalLM, AutoProcessor
MODEL_PATH = "dvps/dvps-fm-v1" # or a local download
processor = AutoProcessor.from_pretrained(MODEL_PATH, trust_remote_code=True)
processor.tokenizer.padding_side = "left"
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH, trust_remote_code=True, dtype=torch.bfloat16
).to("cuda").eval()
conversation = [
{
"role": "user",
"content": [
{"type": "text", "text": "<medgemma>\nDoes this ECG show signs of myocardial infarction?"},
],
},
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)
inputs = processor(
text=text,
encoder_samples={"medgemma": "/path/to/ecg_plot.png"},
return_tensors="pt",
padding=True,
).to("cuda")
output_ids = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(processor.batch_decode(output_ids[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])
The model code builds TerraMind outside the meta device and recomputes the rotary buffers after loading, so no loading workarounds are needed.
Batch inference across domains
encoder_samples maps each encoder name to a list with one entry per conversation in
the batch. Use None for conversations that don't use that encoder. Native Qwen
images and audio go through qwen_omni_utils.process_mm_info as usual.
import numpy as np
from qwen_omni_utils import process_mm_info
# Multispectral Sentinel patch through TerraMind
conversation1 = [
{"role": "user", "content": [
{"type": "text", "text": "<terramind>\nDescribe the land cover in this scene."},
]},
]
# Two ECGs compared in one question: two markers, two payloads, in order
conversation2 = [
{"role": "user", "content": [
{"type": "text", "text": "<medgemma>\n<medgemma>\nDid the QRS duration change between these two ECGs?"},
]},
]
# Audio-visual speech recognition through Auto-AVSR
conversation3 = [
{"role": "user", "content": [
{"type": "text", "text": "<autoavsr_audio><autoavsr_video>\nTranscribe what the speaker says."},
]},
]
# Native RGB image through Qwen's vision tower
conversation4 = [
{"role": "user", "content": [
{"type": "image", "image": "/path/to/aerial.png"},
{"type": "text", "text": "How many buildings are there?"},
]},
]
conversations = [conversation1, conversation2, conversation3, conversation4]
encoder_samples = {
"terramind": [
{"S1GRD": np.load("s1.npy"), "S2L2A": np.load("s2.npy")}, # (2, 128, 128), (12, 128, 128)
None, None, None,
],
"medgemma": [None, ["ecg_t0.png", "ecg_t1.png"], None, None],
"autoavsr_audio": [None, None, "clip.wav", None],
"autoavsr_video": [None, None, "clip_mouth.mp4", None], # 88x88 mouth crops
}
text = processor.apply_chat_template(conversations, add_generation_prompt=True, tokenize=False)
audios, images, videos = process_mm_info(conversations, use_audio_in_video=False)
inputs = processor(
text=text,
audio=audios,
images=images,
videos=videos,
encoder_samples=encoder_samples,
return_tensors="pt",
padding=True,
).to("cuda")
output_ids = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(processor.batch_decode(output_ids[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Usage Tips (Recommended Reading)
GPU memory
The model has 10.08B parameters: 8.93B in BF16 (the Qwen Thinker) and 1.15B in FP32 (the extra encoders and projectors), about 22.4 GB of weights. Activations come on top: a MedGemma image adds 256 tokens, a TerraMind patch 128, and each Auto-AVSR stream 80 per 16 s window. Inference fits on one 64 GB A100; training used 4 samples per 64 GB A100 at a 4,096-token cutoff.
Encoder markers
Every extra-encoder input needs a text marker. The processor expands each marker into the encoder's placeholder tokens:
| Marker | Expands to | Payload |
|---|---|---|
<terramind> |
128 Γ <|terramind|> |
dict with S1GRD and/or S2L2A (array or .npy path). One modality may be missing; it is replaced by the TerraMind mask token. |
<medgemma> |
256 Γ <|medgemma|> |
Image path, bytes, or PIL image |
<autoavsr_audio> |
80 Γ <|autoavsr_audio|> |
Audio path, (array, sampling_rate), or array at 16 kHz |
<autoavsr_video> or <lipread> |
80 Γ <|autoavsr_video|> |
Mouth-crop video path or array |
The number of markers in a conversation must equal the number of payloads for that encoder, and payloads are consumed in marker order. Place markers before the question, as in training.
Structured answers
Several training tasks used fixed answer formats. Prompts that request the same format match the training distribution:
- ECG-QA:
Return your answer in JSON with the format {'answer': '<answer>', 'reason': '<reason>'} - RSVQA-HR and BigEarthNet binary/MCQA: a single word, or a letter
aβd. - BigEarthNet grounding: unit-normalized boxes, as in the training data.
Evaluation
Performance of DVPS-FM-v1
DVPS-FM-v1 beats base Qwen2.5-Omni-7B by large margins on almost every in-domain task, including RSVQA-HR, ECG-Instruct, ECG-QA, Speech2LaTeX, and LNQA. General text and multimodal abilities are largely kept.
Columns:
- Qwen2.5-Omni-7B: the untuned base model.
- DVPS-FM-v1: this release.
The best score in each row is in bold. β means lower is better.
Geo-intelligence
| Benchmark | Metric | Qwen2.5-Omni-7B | DVPS-FM-v1 |
|---|---|---|---|
| RSVQA-HR | Presence acc. | 63.84 | 92.04 |
| Comparison acc. | 72.40 | 91.52 | |
| Count acc. | 33.26 | 69.10 | |
| Area acc. | 4.74 | 59.08 | |
| VRSBench-VQA | Accuracy | 43.62 | 49.36 |
| LLM-judge acc. | β | 59.36 | |
| VRSBench-Caption | BLEU-1 | 13.59 | 19.67 |
| METEOR | 23.94 | 13.81 | |
| CIDEr | 0.02 | 2.60 | |
| VRSBench-Grounding | acc@0.5 | 39.10 | pending |
| mIoU | 37.09 | pending | |
| BigEarthNet.txt (S1+S2) | Binary QA acc. | 58.36 α΅ | 70.04 |
| MCQA acc. | 30.66 α΅ | 59.92 | |
| Caption BLEU-2 | 5.40 α΅ | 42.92 | |
| Caption BLEU-4 | 0.90 α΅ | 32.20 | |
| Bounding-box mIoU | 9.17 α΅ | pending |
Language communication
| Benchmark | Metric | Qwen2.5-Omni-7B | DVPS-FM-v1 |
|---|---|---|---|
| LipCrops, audio (Qwen audio tower) | WER β | 12.62 | 8.85 |
| CER β | 8.89 | 6.25 | |
| Word F1 | 92.22 | 94.43 | |
| LipCrops, audio + video (Qwen towers) | WER β | 21.35 | 7.93 |
| CER β | 18.88 | 5.58 | |
| LipCrops, Auto-AVSR audio + video | WER β | β | 20.44 |
| CER β | β | 15.17 | |
| Word F1 | β | 87.21 | |
| LipCrops, Auto-AVSR audio only | WER β | β | 22.57 |
| Speech2LaTeX, sentences | TeXBLEU | 82.92 | 86.04 |
| CER β | 28.87 | 13.70 | |
| Speech2LaTeX, equations | TeXBLEU | 79.78 | 90.05 |
| CER β | 138.68 | 30.30 | |
| LNQA | LLM-judge binary acc. | 69.54 | 77.98 |
| Content-word F1 | 37.81 | 65.56 | |
| Aya | LLM-judge acc. | 47.81 | 41.85 |
| ROUGE-L | 11.47 | 17.07 |
Cardiology
| Benchmark | Metric | Qwen2.5-Omni-7B | DVPS-FM-v1 |
|---|---|---|---|
| ECG-Instruct PTB-XL | MCQA acc. | 57.04 | 93.97 |
| Diagnosis set acc. | 30.08 | 61.92 | |
| Diagnosis set F1 | 46.77 | 75.90 | |
| Superclass macro AUC | 50.90 | 82.01 | |
| METEOR (open) | 17.27 | 33.96 | |
| LLM-judge acc. (explained) | 42.07 | 64.58 | |
| LLM-judge acc. (open) | 33.36 | 38.07 | |
| ECG-Instruct MIMIC | MCQA acc. | 37.03 | 89.99 |
| Diagnosis set acc. | 29.60 | 72.34 | |
| Diagnosis macro F1 | 20.25 | 55.07 | |
| METEOR (open) | 19.85 | 44.72 | |
| CIDEr (open) | 5.18 | 63.44 | |
| LLM-judge acc. (explained) | 33.51 | 67.47 | |
| LLM-judge acc. (open) | 19.14 | 43.24 | |
| ECG-QA PTB-XL | Single-verify set acc. | 54.45 | 73.00 |
| Single-choose set acc. | 27.02 | 62.42 | |
| Single-query set acc. | β | 27.56 | |
| Comparison-consecutive-verify set acc. | 56.19 | 74.42 | |
| Comparison-irrelevant-verify set acc. | 46.72 | 82.86 | |
| ECG-QA MIMIC-IV | Single-verify set acc. | β | 73.10 |
| Single-choose set acc. | β | 59.72 | |
| Single-query set acc. | β | 12.66 | |
| M&Ms-2 (cardiac MRI) | View acc. | 51.30 α΅ | 99.38 |
| LV / RV cavity presence acc. | β | 94.28 / 94.30 | |
| Structures exact match | 35.73 α΅ | 94.17 | |
| Caption ROUGE-L | 34.82 α΅ | 98.43 |
α΅ Base Qwen on RGB renders of the S1/S2 patches.
α΅ Base Qwen with the MRI slices as native images; DVPS-FM-v1 reads them through <medgemma>.
General capabilities (forgetting)
How much of the Qwen2.5-Omni-7B backbone's general ability survives DVPS training. Text benchmarks are scored with lm-evaluation-harness.
| Benchmark | Metric | Qwen2.5-Omni-7B | DVPS-FM-v1 |
|---|---|---|---|
| MMLU-redux | Exact match | 74.17 | 73.51 |
| MMLU-Pro | Exact match | 45.62 | 42.40 |
| GPQA Diamond (CoT, 0-shot) | Exact match (flexible) | 28.79 | 29.80 |
| GSM8K (CoT) | Exact match (flexible) | 78.09 | 74.98 |
| MATH | math-verify | 71.60 | 58.66 |
| HumanEval (instruct) | pass@1 | 68.90 | 73.17 |
| MBPP (instruct) | pass@1 | 62.20 | 59.60 |
| MMBench | Accuracy | 87.69 | 86.00 |
| MMMU | MCQA accuracy | 54.31 | 53.60 |
| OmniBench | Accuracy | 49.56 | 43.61 |
| MMAU | Accuracy | β | 75.70 |
| LibriSpeech test-clean / test-other | WER β | β | 2.01 / 3.96 |
| RefCOCO | acc@0.5 | 92.35 | pending |
| RefCOCO+ | acc@0.5 | 84.35 | pending |
| RefCOCOg | acc@0.5 | 88.80 | pending |
Setting for Evaluation
- Decoding strategy: All models use greedy decoding (
do_sample=False). - Harness: DVPS-BENCH (
evals/DVPS-BENCH). Raw predictions and configs for this checkpoint are stored with the DVPS-BENCH results. - Sample counts: Up to 5,000 test samples per benchmark or question type. BigEarthNet captioning uses 970, BigEarthNet grounding 1,582, LipCrops 2,298, and Speech2LaTeX about 2,850 per split.
- Generation length: 32 tokens for RSVQA-HR; 64 for VRSBench VQA/grounding and ECG-QA; 256 for captions and transcription; 512 for BigEarthNet and Speech2LaTeX sentences.
- Task instructions: The benchmark prompts are used as given. Some tasks append an output-format instruction:
| Task | Appended instruction |
|---|---|
| ECG-QA | Return your answer in JSON with the format {'answer': '<answer>', 'reason': '<reason>'} |
| VRSBench grounding | Return your answer in JSON with the format {bbox_format} (percent coordinates) |
| RSVQA-HR | Per question type, a short-answer instruction (yes/no, number, or area bucket) |
- Answer parsing: Binary and MCQA answers match by prefix (
yes/no,aβd). Boxes are parsed in unit (BigEarthNet) or percent (VRSBench) coordinates. LLM-judge metrics score free-text answers as correct or incorrect against the reference. - Majority baselines: Always predicting the most frequent answer scores 35.18 (PTB-XL) and 47.18 (MIMIC) on ECG-Instruct MCQA, 93.75 / 92.14 on M&Ms-2 LV / RV presence, and 48.60 on OmniBench.
- Held-out caveat: Speech2LaTeX has no validation split. Its test splits were used to monitor loss during training, so those scores are not fully held out.
Notes on the results
- Grounding: note on bboxes.
- VRSBench captioning: captions follow the short style of the training data.
- ECG-QA question types: set accuracy is 3β29 on query-type questions and 74β85 on yes/no verify questions.
- Speech2LaTeX: CER is 40.4 on equations and 17.8 on sentences. Validation loss on equations is 0.593.
Limitations
- Data coverage. The ECGs come from PTB-XL (Germany) and MIMIC-IV-ECG (one US hospital system), and the Sentinel data is mostly European (BigEarthNet).
- Task coverage. See the notes on the results above for tasks with low scores, including bounding-box grounding on RGB images and open-ended ECG questions.
- Cross-domain prompts. The model accepts inputs that go through different
encoders in one prompt, such as an ECG (
<medgemma>) and a Sentinel-1/Sentinel-2 patch (<terramind>). Training examples use a single domain, so an answer that has to reason over both is not reliable. Several payloads for one encoder, as in the two-ECG comparison prompts, and Auto-AVSR audio together with lip video for the same utterance, are the combinations the training mixture covers. - Not for clinical or operational use. Cardiology outputs are not clinically validated and must not be used for diagnosis, triage, or treatment. Earth observation outputs should not drive safety-critical decisions without independent verification.
Training
Data mixture (18 datasets, interleaved sampling)
| Domain | Dataset | Input path | Prob. |
|---|---|---|---|
| Geo-intelligence | BigEarthNet S1+S2 | <terramind> |
0.145 |
| GeoChat | RGB image | 0.06 | |
| RSVQA-HR | RGB image | 0.065 | |
| RSTeller | RGB image | 0.06 | |
| Language communication | Aya | text | 0.07 |
| LipCrops video | <autoavsr_video> |
0.073 | |
| LipCrops audio + video | <autoavsr_audio> + <autoavsr_video> |
0.037 | |
| Audio-FLAN SLU | audio | 0.075 | |
| Speech2LaTeX sentences | audio | 0.03 | |
| Speech2LaTeX equations | audio | 0.02 | |
| Cardiology | ECG-QA PTB-XL (paraphrased) | <medgemma> |
0.055 |
| ECG-QA MIMIC-IV-ECG (paraphrased) | <medgemma> |
0.06 | |
| ECG-Instruct PTB-XL | <medgemma> |
0.045 | |
| ECG-Instruct MIMIC | <medgemma> |
0.055 | |
| ACDC | <medgemma> |
0.03 | |
| M&Ms-2 | <medgemma> |
0.02 | |
| EMIDEC | <medgemma> |
0.03 | |
| General | LNQA | RGB image | 0.07 |
Hyperparameters and compute
| Setting | Value |
|---|---|
| Framework | custom version of LLaMA-Factory SFT |
| Schedule | cosine schedule |
| Method | LoRA (r=16, Ξ±=32, dropout 0) on all Thinker linear layers, plus full training of the 4 projectors; 107.8M trainable parameters. LoRA weights are merged into the released checkpoint. |
| Precision | BF16 mixed; trainable parameters in FP32 |
| Batch | 4 per GPU Γ 16 GPUs Γ 4 gradient accumulation = 256 |
| Learning rate | 1e-4 peak, cosine to 60,000 steps, 1% warmup; 9.87e-5 at this checkpoint |
| Sequence length | 4,096 tokens, no packing, streaming |
| Image / video limits | 262,144 / 16,384 pixels |
| Samples seen | ~1.28M (5,000 steps Γ batch 256) |
| Model selection | Lowest probability-weighted validation loss, evaluated every 500 steps on up to 1,024 samples per dataset |
| Hardware | 4 nodes, 16xNVIDIA A100 64 GB (Leonardo Booster, CINECA) |
| Wall-clock |
License
CC BY-NC-SA 4.0. You may share and adapt the model for non-commercial use with attribution, and derivatives must stay under the same license.
The weights also depend on components and training data with their own terms: Qwen2.5-Omni-7B (Apache-2.0), TerraMind v1 (Apache-2.0), the Auto-AVSR checkpoints and code (Apache-2.0), and the datasets listed above. MIMIC-IV-ECG is under a PhysioNet credentialed data use agreement.
The use of MedGemma's ECG-Instruct SigLIP (convaiinnovations/medgemma-4b-ecginstruct)
is governed by the Health AI Developer Foundations terms of use.
Citation
@misc{dvpsfm2026,
title = {DVPS-FM-v1},
author = {{DVPS Consortium}},
year = {2026},
howpublished = {\url{https://huggingface.co/dvps-ai/dvps-fm-v1}},
note = {Hugging Face model repository, version v1}
}
Framework versions
- Transformers 5.2.0
- PyTorch 2.10.0
- PEFT 0.18.1