Skip to content

Commit d49a032

Browse files
authored
Merge pull request EvolvingLMMs-Lab#117 from teowu/main
LongVideoBench for LMMs-Eval
2 parents ac3a66f + edeb34e commit d49a032

File tree

4 files changed

+419
-1
lines changed

4 files changed

+419
-1
lines changed

lmms_eval/models/llava_vid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def __init__(
9696
self.mm_spatial_pool_out_channels = int(mm_spatial_pool_out_channels)
9797
self.mm_spatial_pool_mode = mm_spatial_pool_mode
9898
self.max_frames_num = int(max_frames_num)
99+
print(self.max_frames_num)
99100
if self.overwrite == True:
100101
overwrite_config = {}
101102
overwrite_config["mm_resampler_type"] = self.mm_resampler_type
@@ -404,7 +405,7 @@ def generate_until(self, requests) -> List[str]:
404405
attention_mask=attention_masks,
405406
modalities="video",
406407
use_cache=self.use_cache,
407-
stopping_criteria=[stopping_criteria],
408+
#stopping_criteria=[stopping_criteria],
408409
do_sample=True if gen_kwargs["temperature"] > 0 else False,
409410
temperature=gen_kwargs["temperature"],
410411
top_p=gen_kwargs["top_p"],
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
dataset_path: longvideobench/LongVideoBench
2+
dataset_kwargs:
3+
token: True
4+
cache_dir: longvideobench
5+
video: True
6+
force_download: False
7+
local_files_only: False
8+
# From_YouTube: True
9+
task: longvideobench_val_i
10+
test_split: validation
11+
doc_to_visual: !function utils.longvideobench_doc_to_visual_i
12+
doc_to_text: !function utils.longvideobench_doc_to_text
13+
doc_to_target: "correct_choice"
14+
generation_kwargs:
15+
max_new_tokens: 32
16+
temperature: 0
17+
do_sample: False
18+
process_results: !function utils.longvideobench_process_results
19+
metric_list:
20+
- metric: lvb_acc
21+
aggregation: !function utils.longvideobench_aggregate_results
22+
higher_is_better: true
23+
24+
model_specific_prompt_kwargs:
25+
default:
26+
pre_prompt: ""
27+
post_prompt: "Answer with the option's letter from the given choices directly.\n"
28+
insert_interleave_subtitles: True
29+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
dataset_path: longvideobench/LongVideoBench
2+
dataset_kwargs:
3+
token: True
4+
cache_dir: longvideobench
5+
video: True
6+
force_download: False
7+
local_files_only: False
8+
# From_YouTube: True
9+
task: longvideobench_val_v
10+
test_split: validation
11+
doc_to_visual: !function utils.longvideobench_doc_to_visual_v
12+
doc_to_text: !function utils.longvideobench_doc_to_text
13+
doc_to_target: "correct_choice"
14+
generation_kwargs:
15+
max_new_tokens: 32
16+
temperature: 0
17+
do_sample: False
18+
process_results: !function utils.longvideobench_process_results
19+
metric_list:
20+
- metric: lvb_acc
21+
aggregation: !function utils.longvideobench_aggregate_results
22+
higher_is_better: true
23+
24+
model_specific_prompt_kwargs:
25+
default:
26+
pre_prompt: ""
27+
post_prompt: "Answer with the option's letter from the given choices directly.\n"
28+

0 commit comments

Comments
 (0)