Skip to content

Commit 469597a

Browse files
committed
Add LFM2.5-VL-3B benchmark handling
1 parent 3cd4332 commit 469597a

4 files changed

Lines changed: 289 additions & 60 deletions

File tree

vlmeval/config.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,10 +2424,17 @@
24242424
}
24252425

24262426
lfm2vl_series = {
2427-
"LFM2-VL-450M": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-450M"),
2428-
"LFM2-VL-1.6B": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-1.6B"),
2429-
"LFM2-VL-3B": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-3B"),
2430-
"LFM2.5-VL-1.6B": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2.5-VL-1.6B"),
2427+
"LFM2-VL-450M": partial(
2428+
vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-450M", use_custom_prompt=False,
2429+
),
2430+
"LFM2-VL-1.6B": partial(
2431+
vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-1.6B", use_custom_prompt=False,
2432+
),
2433+
"LFM2-VL-3B": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2-VL-3B", use_custom_prompt=False),
2434+
"LFM2.5-VL-1.6B": partial(
2435+
vlm.LFM2VL, model_path="LiquidAI/LFM2.5-VL-1.6B", use_custom_prompt=False,
2436+
),
2437+
"LFM2.5-VL-3B": partial(vlm.LFM2VL, model_path="LiquidAI/LFM2.5-VL-3B"),
24312438
}
24322439

24332440
covt_series = {

vlmeval/dataset/mmifeval.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from vlmeval.utils import track_progress_rich
1010
from .image_base import ImageBaseDataset
1111
from .utils import DEBUG_MESSAGE, build_judge
12+
from .utils.mmif import function_and_compare
1213

1314
logger = get_logger(__name__)
1415

@@ -293,7 +294,7 @@ def judge_one_item(item, retry=3):
293294
score = 1.0
294295
# breakpoint()
295296
for func_dict in constraint["judge"]["verify_funcs"]:
296-
func = globals()[func_dict["func"]]
297+
func = getattr(function_and_compare, func_dict["func"])
297298
# use * to unpack the list, ** is used for dict
298299
judge_result = func(str(item["prediction"]), *func_dict["params"])
299300
# breakpoint()

vlmeval/smp/file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def localize_df(data, dname, nproc=32):
7373
ret = pool.map(decode_img_omni, tups)
7474
pool.close()
7575
data.pop('image')
76-
if 'image_path' not in data:
77-
data['image_path'] = [x[0] if len(x) == 1 else x for x in ret]
76+
data['image_path'] = [x[0] if len(x) == 1 else x for x in ret]
7877
return data
7978

8079

0 commit comments

Comments
 (0)