Commit 9692aa05 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

add lintang's changes to hf_vlms.py

parent 1c94a54d
...@@ -213,13 +213,13 @@ class HFMultimodalLM(HFLM): ...@@ -213,13 +213,13 @@ class HFMultimodalLM(HFLM):
### Up to here: was identical to non-multimodal HFLM generate_until ### ### Up to here: was identical to non-multimodal HFLM generate_until ###
for chunk in chunks: for chunk in chunks:
contexts, all_gen_kwargs, doc_to_visual, doc = zip( contexts, all_gen_kwargs, aux_arguments = zip(
*chunk *chunk
) # TODO: what should be passed in here as part of a chunk? ) # TODO: can we cut down further on number of distinct things we pass around?
visuals = [ visuals = [
vis(d) for vis, d in zip(doc_to_visual, doc) arg["visual"] for arg in aux_arguments
] # TODO: I think *fully* flattening is just wrong for bs>1 ? ] # TODO: I think *fully* flattening is just wrong for bs>1 ??
### this part onward: same as HFLM ### ### this part onward: same as HFLM ###
......
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