Commit facb2f89 authored by lintangsutawika's avatar lintangsutawika
Browse files

working draft

parent 2b87299e
...@@ -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.
......
...@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment