Views
No views yet

| Architecture | ViT | LLM | Adapter | Token Merge | Resolution |
|---|---|---|---|---|---|
| 🤗SAIL-VL-1.5-2B | 🤗SAILVIT-Huge | 🤗Qwen2.5-1.5B | 2-layer MLP | 2x2 | 448x448xN |
| 🤗SAIL-VL-1.5-8B | 🤗InternViT-300M | 🤗Qwen2.5-7B | 2-layer MLP | 2x2 | 448x448xN |
| 🤗SAIL-VL-2B | 🤗InternViT-300M | 🤗Qwen2.5-1.5B | 2-layer MLP | 2x2 | 448x448xN |
| 🤗SAIL-VL-8B | 🤗InternViT-300M | 🤗Qwen2.5-7B | 2-layer MLP | 2x2 | 448x448xN |


| Benchmark | InternVL-2 | Qwen2-VL | Aquila-VL-2B | InternVL-2.5 | SAIL-VL-2B |
|---|---|---|---|---|---|
| OpenCompassAvg | 55.94 | 57.36 | 60.35 | 61.42 | 62.67 |
| Total Avg | 60.93 | 63.04 | 62.76 | 65.77 | 66.27 |
| GeneralQA Avg | 58.04 | 59.75 | 62.39 | 62.96 | 63.79 |
| OCR Avg | 74.50 | 75.80 | 71.78 | 76.80 | 78.19 |
| MMBench_DEV_CN_V11 | 69.2 | 69.5 | 73.61 | 71.44 | 72.06 |
| MMBench_DEV_EN_V11 | 71.36 | 71.28 | 75.93 | 74.61 | 76.63 |
| MathVista_MINI | 47.5 | 48.2 | 59.3 | 52 | 63.1 |
| MMStar | 49.87 | 46.67 | 55 | 53.4 | 56.73 |
| MMMU_VAL | 33.56 | 38.89 | 41.11 | 42 | 42.67 |
| MMVet | 40.83 | 48.3 | 43.85 | 61.38 | 46.88 |
| HallusionBench | 38.57 | 41.42 | 42.09 | 42.79 | 45.03 |
| AI2D_TEST | 74.22 | 73.35 | 75 | 74.9 | 77.69 |
| OCRBench | 78.3 | 78.6 | 77.2 | 80.2 | 83.2 |
| RealWorldQA | 57.25 | 62.61 | 63.92 | 61.05 | 63.14 |
| InfoVQA_VAL | 57.82 | 63.64 | 48.14 | 61.85 | 62.01 |
| ChartQA_TEST | 76.96 | 74.16 | 79.76 | 79.44 | 82.96 |
| LLaVA_Bench | 52.8 | 57.8 | 54 | 57.5 | 53.5 |
| MME | 66.98 | 69.55 | 64.74 | 75.25 | 71.51 |
| DocVQA_VAL | 86.23 | 85.38 | 74.31 | 87.67 | 86.06 |
| TextVQA_VAL | 73.48 | 79.66 | 76.27 | 76.76 | 77.21 |
| Image | Question | Answer |
|---|---|---|
![]() | Compose an engaging travel blog post about a recent trip to this place, highlighting cultural experiences and must-see attractions, including both the attraction seen in the photo and other must-see attractions as well. | Last summer, I had the incredible opportunity to visit Hawaii, and one of the most breathtaking experiences was visiting the famous Diamond Head crater. This iconic landmark is a must-see attraction in Hawaii, and I'm thrilled to share my journey with you. \n As I approached the crater, I was immediately struck by its sheer size and the dramatic landscape surrounding it. The crater itself is a vast, flat-topped mountain with a distinctive bowl shape, and it's surrounded by a rugged coastline. The crater floor is a lush green, contrasting beautifully with the brown and gray hues of the surrounding mountains. \n The most impressive aspect of the crater is the view it offers. From the top, you can see the entire island of Oahu, including the bustling city of Honolulu in the distance. The city's layout is a testament to Hawaii's unique blend of urban development and natural beauty. \n As I walked along the crater's rim, I was treated to breathtaking views of the ocean. The water was a stunning blue, with white-capped waves crashing against the shore. The contrast between the deep blue of the ocean and the lighter blue of the crater's edge was truly mesmerizing. \n One of the highlights of my visit was the crater's interior. While the top is flat, the interior is a steep, rocky mountain. It's a great spot for hiking and offers spectacular views of the surrounding landscape. \n In addition to Diamond Head, there are many other must-see attractions in Hawaii. One of my favorite places was the beautiful Kailua Beach, where I spent a relaxing afternoon swimming and sunbathing. The crystal-clear waters and pristine beaches make it a perfect spot for a day of relaxation. \n Another attraction I couldn't miss was the Pearl Harbor National Memorial. This site is a powerful reminder of Hawaii's history and the sacrifices made by its people during World War II. \n Overall, my trip to Hawaii was a truly unforgettable experience. From the stunning landscapes of Diamond Head to the vibrant cities of Oahu, Hawaii is a place that truly lives up to its nickname as the "Hawaii of the Pacific." I can't wait to return and explore more of this beautiful island paradise. |
![]() | What is the name of the man in the photo? | The man in the photo is Elon Musk. He is holding a small dog in his arms, which is a well-known meme featuring him. Elon Musk is a well-known entrepreneur and CEO of Tesla, SpaceX, and The Boring Company. He is often depicted in this pose, with his arms raised and a small dog in his hands, as a symbol of his love for animals and his playful personality. |
![]() | Please explain the meme in detail. | This meme features a French Bulldog lying on a blue wooden deck. The dog is positioned in the center of the image, with its head resting on the ground and its body stretched out. The meme text reads "MONDAY. JUST...MONDAY." in white capital letters. The text is arranged in two lines, with "MONDAY." at the top and "JUST...MONDAY." at the bottom. The text is slightly tilted to the right, adding a playful touch to the meme. The French Bulldog's relaxed posture and the text "JUST...MONDAY." suggest a sense of resignation or acceptance towards the start of the workweek. The dog's position on the deck, which is a common place for dogs to rest, further emphasizes the idea of a lazy start to the day. The blue wooden deck provides a contrasting background that makes the dog and the text stand out. The meme is a humorous take on the common phrase "just another Monday," which is often used to express the feeling of being tired or unenthusiastic about the start of the workweek. The French Bulldog's presence adds a touch of humor and relatability, as many people can relate to the idea of a dog being the first to wake up and start the day. The meme is a lighthearted way to acknowledge the start of the workweek and the often-sarcastic attitude that comes with it. |
![]() | Discuss the historical impact and the significance of this painting in the art world. | This painting, "Mona Lisa" by Leonardo da Vinci, is one of the most famous and recognizable works of art in the world. Created around 1503-1506, it is a portrait of Lisa Gherardini, the wife of Francesco del Giocondo, and is considered one of the greatest portraits in the history of art. \n The painting's historical impact is immense. It was created during a time of great cultural and artistic flourishing in Italy, a period known as the Renaissance. The Mona Lisa's enigmatic smile and the subtle, almost imperceptible smile on her face have captivated viewers for centuries, sparking countless interpretations and theories about her expression. This ambiguity has contributed to the painting's enduring popularity and its status as a symbol of mystery and intrigue. \n The significance of the Mona Lisa in the art world is multifaceted. It represents the pinnacle of Renaissance portraiture, showcasing the artist's mastery of technique, light, and shadow. The painting's realistic depiction of the sitter's features, combined with the subtle use of color and the soft, diffused lighting, demonstrates da Vinci's innovative approach to portraiture. \n The Mona Lisa's location in the Louvre in Paris, France, has made it one of the most visited artworks in the world. Its presence in the Louvre has contributed to its status as a cultural icon, symbolizing the power of art to transcend time and space. \n The painting's influence on art and culture is profound. It has inspired countless imitations and has been the subject of numerous analyses and interpretations. Its enigmatic smile has become a cultural reference point, appearing in literature, film, and popular culture. \n In conclusion, the Mona Lisa's historical impact and significance are immense. It represents the pinnacle of Renaissance portraiture, showcases da Vinci's innovative approach to art, and has had a profound influence on art and culture worldwide. Its enduring popularity and the countless interpretations it has inspired make it one of the most significant works of art in the history of the world. |
pip3 install einops transformers timm1import numpy as np
2import torch
3import torchvision.transforms as T
4from PIL import Image
5from torchvision.transforms.functional import InterpolationMode
6from transformers import AutoModel, AutoTokenizer
7
8IMAGENET_MEAN = (0.485, 0.456, 0.406)
9IMAGENET_STD = (0.229, 0.224, 0.225)
10
11def build_transform(input_size):
12 MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
13 transform = T.Compose([
14 T.Lambda(lambda img: img.convert('RGB') if img.mode != 'RGB' else img),
15 T.Resize((input_size, input_size), interpolation=InterpolationMode.BICUBIC),
16 T.ToTensor(),
17 T.Normalize(mean=MEAN, std=STD)
18 ])
19 return transform
20
21def find_closest_aspect_ratio(aspect_ratio, target_ratios, width, height, image_size):
22 best_ratio_diff = float('inf')
23 best_ratio = (1, 1)
24 area = width * height
25 for ratio in target_ratios:
26 target_aspect_ratio = ratio[0] / ratio[1]
27 ratio_diff = abs(aspect_ratio - target_aspect_ratio)
28 if ratio_diff < best_ratio_diff:
29 best_ratio_diff = ratio_diff
30 best_ratio = ratio
31 elif ratio_diff == best_ratio_diff:
32 if area > 0.5 * image_size * image_size * ratio[0] * ratio[1]:
33 best_ratio = ratio
34 return best_ratio
35
36def dynamic_preprocess(image, min_num=1, max_num=10, image_size=448, use_thumbnail=False):
37 orig_width, orig_height = image.size
38 aspect_ratio = orig_width / orig_height
39
40 # calculate the existing image aspect ratio
41 target_ratios = set(
42 (i, j) for n in range(min_num, max_num + 1) for i in range(1, n + 1) for j in range(1, n + 1) if
43 i * j <= max_num and i * j >= min_num)
44 target_ratios = sorted(target_ratios, key=lambda x: x[0] * x[1])
45
46 # find the closest aspect ratio to the target
47 target_aspect_ratio = find_closest_aspect_ratio(
48 aspect_ratio, target_ratios, orig_width, orig_height, image_size)
49
50 # calculate the target width and height
51 target_width = image_size * target_aspect_ratio[0]
52 target_height = image_size * target_aspect_ratio[1]
53 blocks = target_aspect_ratio[0] * target_aspect_ratio[1]
54
55 # resize the image
56 resized_img = image.resize((target_width, target_height))
57 processed_images = []
58 for i in range(blocks):
59 box = (
60 (i % (target_width // image_size)) * image_size,
61 (i // (target_width // image_size)) * image_size,
62 ((i % (target_width // image_size)) + 1) * image_size,
63 ((i // (target_width // image_size)) + 1) * image_size
64 )
65 # split the image
66 split_img = resized_img.crop(box)
67 processed_images.append(split_img)
68 assert len(processed_images) == blocks
69 if use_thumbnail and len(processed_images) != 1:
70 thumbnail_img = image.resize((image_size, image_size))
71 processed_images.append(thumbnail_img)
72 return processed_images
73
74def load_image(image_file, input_size=448, max_num=10):
75 image = Image.open(image_file).convert('RGB')
76 transform = build_transform(input_size=input_size)
77 images = dynamic_preprocess(image, image_size=input_size, use_thumbnail=True, max_num=max_num)
78 pixel_values = [transform(image) for image in images]
79 pixel_values = torch.stack(pixel_values)
80 return pixel_values
81
82path = "BytedanceDouyinContent/SAIL-VL-2B"
83model = AutoModel.from_pretrained(
84 path,
85 torch_dtype=torch.bfloat16,
86 trust_remote_code=True).eval().cuda()
87tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True, use_fast=False)
88
89# set the max number of tiles in `max_num`
90pixel_values = load_image('./test.png', max_num=10).to(torch.bfloat16).cuda()
91generation_config = dict(max_new_tokens=1024, do_sample=True)
92
93# pure-text conversation
94question = 'Hello, who are you?'
95response, history = model.chat(tokenizer, None, question, generation_config, history=None, return_history=True)
96print(f'User: {question} Assistant: {response}')
97
98question = 'Can you tell me a story?'
99response, history = model.chat(tokenizer, None, question, generation_config, history=history, return_history=True)
100print(f'User: {question} Assistant: {response}')
101
102# single-image single-round conversation
103question = '<image> Please describe the image shortly.'
104response = model.chat(tokenizer, pixel_values, question, generation_config)
105print(f'User: {question} Assistant: {response}')
106
107# single-image multi-round conversation
108question = '<image> Please describe the image in detail.'
109response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
110print(f'User: {question} Assistant: {response}')
111
112question = 'Please write a poem according to the image.'
113response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
114print(f'User: {question} Assistant: {response}')@article{dong2025scalable,
title={Scalable vision language model training via high quality data curation},
author={Dong, Hongyuan and Kang, Zijian and Yin, Weijie and Liang, Xiao and Feng, Chao and Ran, Jiao},
journal={arXiv preprint arXiv:2501.05952},
year={2025}
}@misc{
sailvl,
title = {SAIL-VL: Scalable Vision Language Model Training with High Quality Data Curation},
url = {https://huggingface.co/BytedanceDouyinContent/SAIL-VL-2B/},
author = {Bytedance Douyin Content Team},
month = {December},
year = {2024}
}{Hongyuan Dong, Zijian Kang, Weijie Yin}, Xiao Liang, Chao Feng, Jiao Ran
{*} Equal Contributions.Zirui Guo, Yan Qiu, Yaling Mou, Ming JiangHuiyu Yu, Lin Dong, Yong Zhang