Image-Text-to-Text
Transformers
Safetensors
English
qts_plus_qwen2_5_vl_causal_lm
text-generation
multimodal
vision
video
long-video
token-selection
compression
qwen2.5-vl
qtsplus
conversational
custom_code
Instructions to use AlpachinoNLP/QTSplus-3B-FT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlpachinoNLP/QTSplus-3B-FT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AlpachinoNLP/QTSplus-3B-FT", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AlpachinoNLP/QTSplus-3B-FT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AlpachinoNLP/QTSplus-3B-FT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlpachinoNLP/QTSplus-3B-FT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlpachinoNLP/QTSplus-3B-FT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/AlpachinoNLP/QTSplus-3B-FT
- SGLang
How to use AlpachinoNLP/QTSplus-3B-FT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AlpachinoNLP/QTSplus-3B-FT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlpachinoNLP/QTSplus-3B-FT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AlpachinoNLP/QTSplus-3B-FT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlpachinoNLP/QTSplus-3B-FT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use AlpachinoNLP/QTSplus-3B-FT with Docker Model Runner:
docker model run hf.co/AlpachinoNLP/QTSplus-3B-FT
Add files using upload-large-folder tool
Browse files16 unmodified lines17181920212223242526272829303132333435363738398 unmodified lines4849505152535416 unmodified lines[](https://arxiv.org/abs/2511.11910)[](https://qtsplus.github.io/)[](https://github.com/Siyou-Li/QTSplus)## Model DescriptionQTSplus-3B-FT is a Qwen2.5-VL–based multimodal LLM finetuned with Query‑Aware Token Selector (QTS+), a lightweight visual token selection module that acts as an information gate between the vision encoder and the LLM.- Query‑aware selection: scores vision tokens via cross‑attention against the input text query.- Adaptive retention: predicts an instance‑specific budget and keeps only the most relevant tokens.- Temporal reasoning: a small re‑encoder preserves temporal order with absolute time cues.- Efficient long‑video understanding: up to 89% vision token compression and 28% end‑to‑end latency reduction on long videos (see paper for details).Model sources- Paper: Seeing the Forest and the Trees (document.pdf; arXiv:2511.11910)- Website: https://qtsplus.github.io/- Code: https://github.com/Siyou-Li/QTSplus## Intended Uses & LimitationsIntended uses8 unmodified lines## Quick StartThe repository is designed around a conda‑based Python 3.11 environment with a CUDA‑enabled GPU. The commands below are taken directly from `environment.sh` and provide a reproducible setup on recent Linux distributions.1. **Create and activate the conda environment**16 unmodified lines1718192021222324252627282930313233348 unmodified lines4344454647484916 unmodified lines[](https://arxiv.org/abs/2511.11910)[](https://qtsplus.github.io/)[](https://github.com/Siyou-Li/QTSplus)## Model DescriptionQTSplus-3B-FT is a Qwen2.5-VL–based multimodal LLM finetuned with Query‑Aware Token Selector (QTSplus), a lightweight visual token selection module that acts as an information gate between the vision encoder and the LLM.- Query‑aware selection: scores vision tokens via cross‑attention against the input text query.- Adaptive retention: predicts an instance‑specific budget and keeps only the most relevant tokens.- Temporal reasoning: a small re‑encoder preserves temporal order with absolute time cues.- Efficient long‑video understanding: up to 89% vision token compression and 28% end‑to‑end latency reduction on long videos (see paper for details).## Intended Uses & LimitationsIntended uses8 unmodified lines## Quick StartThe repository is designed around a conda‑based Python 3.11 environment with a CUDA‑enabled GPU.1. **Create and activate the conda environment**
README.md+3-8