Commit facb2f89 authored by lintangsutawika's avatar lintangsutawika
Browse files

working draft

parent 2b87299e
......@@ -198,6 +198,8 @@ class Llava(LM):
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 [
reg.args for reg in requests
]:
......@@ -322,10 +324,10 @@ class Llava(LM):
)
pbar = tqdm(total=num_iters, disable=(self.rank != 0), desc="Model Responding")
for chunk in chunks:
contexts, all_gen_kwargs, doc_to_visual, doc, task = zip(*chunk)
task = task[0]
contexts, all_gen_kwargs, visuals = zip(*chunk)
# task = task[0]
visuals = [doc_to_visual[0](doc[0])]
# visuals = [doc_to_visual[0](doc[0])]
visuals = self.flatten(visuals)
# we assume all gen kwargs in the batch are the same
# this is safe to assume because the `grouper` object ensures it.
......
......@@ -18,7 +18,7 @@ generation_kwargs:
repetition_penalty: 1.0
image_aspect_ratio: original
metric_list:
- metric: acc
- metric: exact_match
# - metric: mmmu_acc
# aggregation: !function utils.mmmu_aggregate_results
# 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