Views
No views yet

| Model | KMMLU (5-shot, acc) | HAE-RAE (5-shot, acc) | CLiCK (5-shot, acc) | KoBEST (5-shot, acc) |
|---|---|---|---|---|
| HyperCLOVAX-SEED-Text-Base-3B | 0.4847 | 0.7635 | 0.6386 | 0.7792 |
| HyperCLOVAX-SEED-Vision-Instruct-3B | 0.4422 | 0.6499 | 0.5599 | 0.7180 |
| Qwen2.5-3B-instruct | 0.4451 | 0.6031 | 0.5649 | 0.7053 |
| gemma-3-4b-it | 0.3895 | 0.6059 | 0.5303 | 0.7262 |
| Model Name | Max Token Count per Video | VideoMME (Ko) | NAVER-TV-CLIP (Ko) | VideoChatGPT (Ko) | PerceptionTest (En) | ActivityNet-QA (En) | KoNet (Ko) | MMBench-Val (En) | TextVQA-Val (En) | Korean VisIT-Bench (Ko) | Image (4 benchmarks) | Video (5 benchmarks) | All (9 benchmarks) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| HyperCLOVAX-SEED-Vision-Instruct-3B | 1856 tokens, 108 frames | 48.2 | 61.0 | 53.6 | 55.2 | 50.6 | 69.2 | 81.8 | 79.2 | 37.0 | 46.68 | 53.70 | 59.54 |
| HyperCLOVAX-SEED-Vision-Instruct-3B (without OCR) | 1856 tokens, 108 frames | 48.2 | 61.0 | 53.6 | 55.2 | 50.6 | 36.6 | 80.7 | 76.0 | 43.5 | 56.74 | 53.70 | 55.05 |
| Qwen-2.5-VL-3B | 24576 tokens, 768 frames | 55.1 | 48.3 | 45.6 | 66.9 | 55.7 | 58.3 | 84.3 | 79.6 | 81.5 | 59.35 | 54.31 | 56.55 |
| Qwen-2.5-VL-3B (w/ 2000 tokens) | 2000 tokens, 128 frames | 50.3 | 43.9 | 44.3 | 58.3 | 54.2 | 58.5 | 84.3 | 79.3 | 15.7 | 59.50 | 50.18 | 54.33 |
| Qwen-2.5-VL-7B | 24576 tokens, 768 frames | 60.6 | 66.7 | 51.8 | 70.5 | 56.6 | 68.4 | 88.3 | 84.9 | 85.6 | 69.34 | 61.23 | 64.84 |
| Gemma-3-4B | 4096 tokens, 16 frames | 45.4 | 36.8 | 57.1 | 50.6 | 46.3 | 25.0 | 79.2 | 58.9 | 32.3 | 48.91 | 47.24 | 47.98 |
| GPT4V (gpt-4-turbo-2024-04-09) | Unknown, Original Image , 8 frames | 49.1 | 75.0 | 55.5 | 57.4 | 45.7 | 38.7 | 84.2 | 60.4 | 52.0 | 58.88 | 51.59 | 54.83 |
| GPT4o (gpt-4o-2024-08-06) | Unknown, 512 resize, 128 frames | 61.6 | 66.6 | 61.8 | 50.2 | 41.7 | 60.6 | 84.2 | 73.2 | 50.5 | 67.15 | 56.42 | 61.19 |
| InternV-2-2B | 4096 tokens, 16 frames | 28.9 | 21.1 | 40.2 | 50.5 | 50.3 | 3.3 | 79.3 | 75.1 | 51.1 | 39.74 | 38.19 | 38.88 |
| InternV-2-4B | 4096 tokens, 16 frames | 33.8 | 36.0 | 22.8 | 54.2 | 52.0 | 22.7 | 83.0 | 76.9 | 51.6 | 46.11 | 39.75 | 42.58 |
| InternV-2-8B | 4096 tokens, 16 frames | 43.7 | 41.2 | 32.4 | 58.5 | 53.2 | 28.5 | 86.6 | 79.0 | 97.0 | 50.32 | 45.79 | 47.81 |
1
2from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
3
4model_name = "naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B"
5model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True).to(device="cuda")
6processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
7tokenizer = AutoTokenizer.from_pretrained(model_name)
8
9# LLM Example
10# It is recommended to use the chat template with HyperCLOVAX models.
11# Using the chat template allows you to easily format your input in ChatML style.
12llm_chat = [
13 {"role": "system", "content": [{"type": "text", "text": "you are helpful assistant!"}]},
14 {
15 "role": "user",
16 "content": [
17 {"type": "text", "text": "Hello, how are you?"},
18 {"type": "text", "text": "I said. Hello, how are you today?"},
19 ]
20 },
21 {"role": "assistant", "content": [{"type": "text", "text": "I'm doing great. How can I help you today?"}]},
22 {"role": "user", "content": [{"type": "text", "text": "I'd like to show off how chat templating works!"}]},
23]
24model_inputs = processor.apply_chat_template(
25 llm_chat, tokenize=True, return_dict=True, return_tensors="pt", add_generation_prompt=True
26)
27model_inputs = model_inputs.to(device="cuda")
28
29# Please adjust parameters like top_p appropriately for your use case.
30output_ids = model.generate(
31 **model_inputs,
32 max_new_tokens=64,
33 do_sample=True,
34 top_p=0.6,
35 temperature=0.5,
36 repetition_penalty=1.0,
37)
38print("=" * 80)
39print("LLM EXAMPLE")
40print(processor.batch_decode(output_ids)[0])
41print("=" * 80)
42
43# VLM Example
44# For images and videos, you can use url, local_path, base64, or bytes as input sources.
45vlm_chat = [
46 {"role": "system", "content": [{"text": "System Prompt", "type": "text"}]},
47 {"role": "user", "content": [{"text": "User Text Prompt 1", "type": "text"}]},
48 {
49 "role": "user",
50 "content": [{
51 "filename": "tradeoff_sota.png",
52 "image": "https://github.com/naver-ai/rdnet/blob/main/resources/images/tradeoff_sota.png?raw=true",
53 "lens_keywords": "Gucci Ophidia, cross bag, Ophidia small, GG, Supreme shoulder bag",
54 "lens_local_keywords": "[0.07, 0.21, 0.92, 0.90] Gucci Ophidia",
55 "ocr": "List the words in the image in raster order. Even if the word order feels unnatural for reading, the model will handle it as long as it follows raster order.", "type": "image",
56 }],
57 },
58 {
59 "role": "user",
60 "content": [{
61 "filename": "tradeoff.png",
62 "image": "https://github.com/naver-ai/rdnet/blob/main/resources/images/tradeoff.png?raw=true",
63 "type": "image",
64 }],
65 },
66 {"role": "assistant", "content": [{"text": "Assistant Text Prompt 1", "type": "text"}]},
67 {"role": "user", "content": [{"text": "User Text Prompt 2", "type": "text"}]},
68 {
69 "role": "user",
70 "content": [
71 {
72 "type": "video",
73 "video": "freenaturestock-rolling-mist-clouds.mp4",
74 "lens_keywords": "Prada re-edition, nylon bag, mini cross bag, logo strap, essential shoulder bag",
75 "lens_local_keywords": "[0.12, 0.34, 0.85, 0.76] Prada re-edition",
76 "speech_to_text": "Please enter the dialogue, voice, sound, lines, and words in the video in text format.",
77 },
78 {"text": "User Text Prompt 3", "type": "text"},
79 ]
80 },
81]
82
83model_inputs = processor.apply_chat_template(
84 vlm_chat, tokenize=True, return_dict=True, return_tensors="pt", add_generation_prompt=True,
85)
86model_inputs = model_inputs.to(device="cuda")
87output_ids = model.generate(
88 **model_inputs,
89 max_new_tokens=64,
90 do_sample=True,
91 top_p=0.6,
92 temperature=0.5,
93 repetition_penalty=1.0,
94)
95print("=" * 80)
96print("VLM EXAMPLE")
97print(processor.batch_decode(output_ids)[0])
98print("=" * 80)
991
2from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
3
4model_name = "naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B"
5revision="v0.1.0"
6model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, revision=revision).to(device="cuda")
7preprocessor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True, revision=revision)
8tokenizer = AutoTokenizer.from_pretrained(model_name, revision=revision)
9
10# LLM Example
11# It is recommended to use the chat template with HyperCLOVAX models.
12# Using the chat template allows you to easily format your input in ChatML style.
13chat = [
14 {"role": "system", "content": "you are helpful assistant!"},
15 {"role": "user", "content": "Hello, how are you?"},
16 {"role": "assistant", "content": "I'm doing great. How can I help you today?"},
17 {"role": "user", "content": "I'd like to show off how chat templating works!"},
18]
19input_ids = tokenizer.apply_chat_template(chat, return_tensors="pt", tokenize=True)
20input_ids = input_ids.to(device="cuda")
21
22# Please adjust parameters like top_p appropriately for your use case.
23output_ids = model.generate(
24 input_ids,
25 max_new_tokens=64,
26 do_sample=True,
27 top_p=0.6,
28 temperature=0.5,
29 repetition_penalty=1.0,
30)
31print("=" * 80)
32print("LLM EXAMPLE")
33print(tokenizer.batch_decode(output_ids)[0])
34print("=" * 80)
35
36# VLM Example
37# For image and video inputs, you can use url, local_path, base64, or bytes.
38vlm_chat = [
39 {"role": "system", "content": {"type": "text", "text": "System Prompt"}},
40 {"role": "user", "content": {"type": "text", "text": "User Text 1"}},
41 {
42 "role": "user",
43 "content": {
44 "type": "image",
45 "filename": "tradeoff_sota.png",
46 "image": "https://github.com/naver-ai/rdnet/blob/main/resources/images/tradeoff_sota.png?raw=true",
47 "ocr": "List the words in the image in raster order. Even if the word order feels unnatural for reading, the model will handle it as long as it follows raster order.",
48 "lens_keywords": "Gucci Ophidia, cross bag, Ophidia small, GG, Supreme shoulder bag",
49 "lens_local_keywords": "[0.07, 0.21, 0.92, 0.90] Gucci Ophidia",
50 }
51 },
52 {
53 "role": "user",
54 "content": {
55 "type": "image",
56 "filename": "tradeoff.png",
57 "image": "https://github.com/naver-ai/rdnet/blob/main/resources/images/tradeoff.png?raw=true",
58 }
59 },
60 {"role": "assistant", "content": {"type": "text", "text": "Assistant Text 1"}},
61 {"role": "user", "content": {"type": "text", "text": "User Text 2"}},
62 {
63 "role": "user",
64 "content": {
65 "type": "video",
66 "filename": "rolling-mist-clouds.mp4",
67 "video": "freenaturestock-rolling-mist-clouds.mp4",
68 }
69 },
70 {"role": "user", "content": {"type": "text", "text": "User Text 3"}},
71]
72
73new_vlm_chat, all_images, is_video_list = preprocessor.load_images_videos(vlm_chat)
74preprocessed = preprocessor(all_images, is_video_list=is_video_list)
75input_ids = tokenizer.apply_chat_template(
76 new_vlm_chat, return_tensors="pt", tokenize=True, add_generation_prompt=True,
77)
78
79output_ids = model.generate(
80 input_ids=input_ids.to(device="cuda"),
81 max_new_tokens=8192,
82 do_sample=True,
83 top_p=0.6,
84 temperature=0.5,
85 repetition_penalty=1.0,
86 **preprocessed,
87)
88print("=" * 80)
89print("VLM EXAMPLE")
90print(tokenizer.batch_decode(output_ids)[0])
91print("=" * 80)v0.9.2rc2_hyperclovax_vision_seed branch.1pyenv virtualenv 3.10.2 .vllm
2pyenv activate .vllm
3sudo apt-get install -y kmod
4pip install --upgrade setuptools wheel pip
5pip install setuptools_scm
6
7# install latest commit (e.g. v0.9.0)
8VLLM_USE_PRECOMPILED=1 pip install -e .[serve] --cache-dir=/mnt/tmp
9pip install -U pynvml
10pip install timm av decord
11
12# or install previous commit (e.g. v0.8.4)
13pip install -r ./requirements/build.txt
14pip install -r ./requirements/common.txt
15pip install -r ./requirements/cuda.txt
16pip install flash_attn==2.7.4.post1
17pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/
18export VLLM_COMMIT=dc1b4a6f1300003ae27f033afbdff5e2683721ce
19export VLLM_PRECOMPILED_WHEEL_LOCATION=https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl
20VLLM_USE_PRECOMPILED=1 pip install -e .[serve] --cache-dir=/mnt/tmp
21pip install -U pynvml
22pip install timm av decord
23
24# Then launch api
25MODEL=your/mode/path
26export ATTENTION_BACKEND=FLASH_ATTN_VLLM_V1
27VLLM_USE_V1=1 VLLM_ATTENTION_BACKEND=${ATTENTION_BACKEND} CUDA_VISIBLE_DEVICES=0,1 python -m vllm.entrypoints.openai.api_server \
28 --seed 20250525 \
29 --port ${PORT} \
30 --allowed-local-media-path $ALLOWED_LOCAL_MEDIA_PATH \
31 --max-model-len 8192 \
32 --max-num-batched-tokens 8192 \
33 --max-num-seqs 128 \
34 --max-parallel-loading-workers 128 \
35 --limit-mm-per-prompt.image="32" \
36 --limit-mm-per-prompt.viedo="32" \
37 --max-num-frames 256 \
38 --tensor-parallel-size 1 \
39 --data-parallel-size 1 \
40 --model ${MODEL} \
41 --dtype float16 \
42 --trust-remote-code \
43 --chat-template-content-format "openai" \
44 --download-dir $DONWLOAD_DIR