Image-Text-to-Text
Transformers
Safetensors
infinite_vl
feature-extraction
vision-language-model
linear-attention
gated-deltanet
infinitevl
multimodal
conversational
custom_code
Instructions to use hustvl/InfiniteVL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hustvl/InfiniteVL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hustvl/InfiniteVL", 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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hustvl/InfiniteVL", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hustvl/InfiniteVL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hustvl/InfiniteVL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hustvl/InfiniteVL", "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/hustvl/InfiniteVL
- SGLang
How to use hustvl/InfiniteVL 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 "hustvl/InfiniteVL" \ --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": "hustvl/InfiniteVL", "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 "hustvl/InfiniteVL" \ --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": "hustvl/InfiniteVL", "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 hustvl/InfiniteVL with Docker Model Runner:
docker model run hf.co/hustvl/InfiniteVL
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,14 +13,12 @@ pipeline_tag: image-text-to-text
|
|
| 13 |
|
| 14 |
<div align="center">
|
| 15 |
|
| 16 |
-
<
|
| 17 |
-
<img src="https://github.com/hustvl/infinitevl/assets/Logo.png" width="500" alt="InfiniteVL Logo">
|
| 18 |
|
| 19 |
<hr>
|
| 20 |
|
| 21 |
### InfiniteVL: Synergizing Linear and Sparse Attention for Highly-Efficient, Unlimited-Input Vision-Language Models
|
| 22 |
|
| 23 |
-
<!-- 作者列表 -->
|
| 24 |
Hongyuan Tao<sup>1</sup>,
|
| 25 |
[Bencheng Liao](https://github.com/LegendBC)<sup>1</sup>,
|
| 26 |
[Shaoyu Chen](https://scholar.google.com/citations?user=PIeNN2gAAAAJ&hl=en&oi=sra)<sup>2</sup>,
|
|
@@ -29,14 +27,11 @@ Haoran Yin<sup>2</sup>,
|
|
| 29 |
[Wenyu Liu](https://scholar.google.com/citations?user=D7jDk7gAAAAJ&hl=en)<sup>1</sup>,
|
| 30 |
[Xinggang Wang](https://xwcv.github.io)<sup>1,✉️</sup>
|
| 31 |
|
| 32 |
-
<!-- 单位列表 -->
|
| 33 |
<sup>1</sup>Huazhong University of Science and Technology,
|
| 34 |
<sup>2</sup>Horizon Robotics
|
| 35 |
|
| 36 |
-
<!-- 脚注/通讯作者信息 -->
|
| 37 |
(✉️) corresponding author: <a href="mailto:xgwang@hust.edu.cn">xgwang@hust.edu.cn</a>
|
| 38 |
|
| 39 |
-
<!-- 放置 按钮/Badge 的地方 -->
|
| 40 |
<br>
|
| 41 |
<a href="https://arxiv.org/abs/2502.xxxxx"><img src="https://img.shields.io/badge/arXiv-Paper-b31b1b.svg" alt="arXiv"></a>
|
| 42 |
<a href="https://github.com/hustvl/InfiniteVL"><img src="https://img.shields.io/badge/GitHub-Repository-black?logo=github" alt="GitHub"></a>
|
|
@@ -51,7 +46,7 @@ Haoran Yin<sup>2</sup>,
|
|
| 51 |
By synergizing **Sliding Window Attention (SWA)** for fine-grained local perception and **Gated DeltaNet** for efficient long-term memory, InfiniteVL achieves a "best of both worlds" balance. It delivers competitive performance on standard benchmarks (comparable to Qwen2.5-VL) while enabling constant-memory inference and high-throughput streaming.
|
| 52 |
|
| 53 |
<div align="center">
|
| 54 |
-
<img src="https://github.com/hustvl/
|
| 55 |
</div>
|
| 56 |
|
| 57 |
### ✨ Key Highlights
|
|
|
|
| 13 |
|
| 14 |
<div align="center">
|
| 15 |
|
| 16 |
+
<img src="https://github.com/hustvl/InfiniteVL/raw/main/assets/assets/Logo.png" width="600" alt="InfiniteVL Logo">
|
|
|
|
| 17 |
|
| 18 |
<hr>
|
| 19 |
|
| 20 |
### InfiniteVL: Synergizing Linear and Sparse Attention for Highly-Efficient, Unlimited-Input Vision-Language Models
|
| 21 |
|
|
|
|
| 22 |
Hongyuan Tao<sup>1</sup>,
|
| 23 |
[Bencheng Liao](https://github.com/LegendBC)<sup>1</sup>,
|
| 24 |
[Shaoyu Chen](https://scholar.google.com/citations?user=PIeNN2gAAAAJ&hl=en&oi=sra)<sup>2</sup>,
|
|
|
|
| 27 |
[Wenyu Liu](https://scholar.google.com/citations?user=D7jDk7gAAAAJ&hl=en)<sup>1</sup>,
|
| 28 |
[Xinggang Wang](https://xwcv.github.io)<sup>1,✉️</sup>
|
| 29 |
|
|
|
|
| 30 |
<sup>1</sup>Huazhong University of Science and Technology,
|
| 31 |
<sup>2</sup>Horizon Robotics
|
| 32 |
|
|
|
|
| 33 |
(✉️) corresponding author: <a href="mailto:xgwang@hust.edu.cn">xgwang@hust.edu.cn</a>
|
| 34 |
|
|
|
|
| 35 |
<br>
|
| 36 |
<a href="https://arxiv.org/abs/2502.xxxxx"><img src="https://img.shields.io/badge/arXiv-Paper-b31b1b.svg" alt="arXiv"></a>
|
| 37 |
<a href="https://github.com/hustvl/InfiniteVL"><img src="https://img.shields.io/badge/GitHub-Repository-black?logo=github" alt="GitHub"></a>
|
|
|
|
| 46 |
By synergizing **Sliding Window Attention (SWA)** for fine-grained local perception and **Gated DeltaNet** for efficient long-term memory, InfiniteVL achieves a "best of both worlds" balance. It delivers competitive performance on standard benchmarks (comparable to Qwen2.5-VL) while enabling constant-memory inference and high-throughput streaming.
|
| 47 |
|
| 48 |
<div align="center">
|
| 49 |
+
<img src="https://github.com/hustvl/InfiniteVL/raw/main/assets/image1_new_01.png" width="800" alt="InfiniteVL Logo">
|
| 50 |
</div>
|
| 51 |
|
| 52 |
### ✨ Key Highlights
|