Downloads · 30 days
0
huixin77777/mts-attention-analysis
mts-attention-analysis is a machine learning model from huixin77777. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository contains scripts and custom models for analyzing attention patterns in vision-language models, specifically for the MTS (Multi-scale Token Selection) project based on Qwen2.5-VL.
Downloads · 30 days
0
Access
Public
Updated Jan 3, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py607 KB · 99%
From the Hugging Face model README
This repository contains scripts and custom models for analyzing attention patterns in vision-language models, specifically for the MTS (Multi-scale Token Selection) project based on Qwen2.5-VL.
scripts/run_fg_bg_analysis.sh: Foreground vs Background token attention analysis
scripts/qsub_save_paco_attention_50samples.pbs: PBS job script for saving attention
modeling_qwen2_5_vl.py: Main model with MTS token selectionmodeling_qwen2_5_vl_fast.py: Optimized versionmultiscale_image_processor.py: Multi-scale image processingmultiscale_processor_fast.py: Fast processorconfiguration_qwen2_5_vl.py: Model configurationimage_processing_qwen2_vl.py: Image preprocessingbash scripts/run_fg_bg_analysis.sh
qsub scripts/qsub_save_paco_attention_50samples.pbs
Required packages:
Environment variables:
SAVE_MTS_ATTENTION=1: Enable attention savingMTS_ATTENTION_DIR: Directory for attention weightsMTS_ATTENTION_LAYERS: Comma-separated layer indicesMTS_ATTENTION_MAX_SAMPLES: Maximum samplesUSE_GT_MASK=1: Use ground truth masksDISABLE_FAST_ATTENTION=1: Force vanilla attentionBased on Qwen2.5-VL-3B with:
Apache 2.0