Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
facb2f89
Commit
facb2f89
authored
Jul 01, 2024
by
lintangsutawika
Browse files
working draft
parent
2b87299e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
lm_eval/models/llava.py
lm_eval/models/llava.py
+5
-3
lm_eval/tasks/mmmu/_template_yaml
lm_eval/tasks/mmmu/_template_yaml
+1
-1
No files found.
lm_eval/models/llava.py
View file @
facb2f89
...
@@ -198,6 +198,8 @@ class Llava(LM):
...
@@ -198,6 +198,8 @@ class Llava(LM):
total
=
len
(
requests
),
disable
=
(
self
.
rank
!=
0
),
desc
=
"Model Responding"
total
=
len
(
requests
),
disable
=
(
self
.
rank
!=
0
),
desc
=
"Model Responding"
)
)
print
(
requests
[
0
])
import
sys
;
sys
.
exit
()
for
contexts
,
doc_to_target
,
doc_to_visual
,
doc
,
task
in
[
for
contexts
,
doc_to_target
,
doc_to_visual
,
doc
,
task
in
[
reg
.
args
for
reg
in
requests
reg
.
args
for
reg
in
requests
]:
]:
...
@@ -322,10 +324,10 @@ class Llava(LM):
...
@@ -322,10 +324,10 @@ class Llava(LM):
)
)
pbar
=
tqdm
(
total
=
num_iters
,
disable
=
(
self
.
rank
!=
0
),
desc
=
"Model Responding"
)
pbar
=
tqdm
(
total
=
num_iters
,
disable
=
(
self
.
rank
!=
0
),
desc
=
"Model Responding"
)
for
chunk
in
chunks
:
for
chunk
in
chunks
:
contexts
,
all_gen_kwargs
,
doc_to_visual
,
doc
,
task
=
zip
(
*
chunk
)
contexts
,
all_gen_kwargs
,
visuals
=
zip
(
*
chunk
)
task
=
task
[
0
]
#
task = task[0]
visuals
=
[
doc_to_visual
[
0
](
doc
[
0
])]
#
visuals = [doc_to_visual[0](doc[0])]
visuals
=
self
.
flatten
(
visuals
)
visuals
=
self
.
flatten
(
visuals
)
# we assume all gen kwargs in the batch are the same
# we assume all gen kwargs in the batch are the same
# this is safe to assume because the `grouper` object ensures it.
# this is safe to assume because the `grouper` object ensures it.
...
...
lm_eval/tasks/mmmu/_template_yaml
View file @
facb2f89
...
@@ -18,7 +18,7 @@ generation_kwargs:
...
@@ -18,7 +18,7 @@ generation_kwargs:
repetition_penalty: 1.0
repetition_penalty: 1.0
image_aspect_ratio: original
image_aspect_ratio: original
metric_list:
metric_list:
- metric:
acc
- metric:
exact_match
# - metric: mmmu_acc
# - metric: mmmu_acc
# aggregation: !function utils.mmmu_aggregate_results
# aggregation: !function utils.mmmu_aggregate_results
# higher_is_better: true
# higher_is_better: true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment