Commit cf040ac5 authored by lintangsutawika's avatar lintangsutawika
Browse files

removed lines

parent facb2f89
......@@ -6,8 +6,6 @@ OutputType = Literal[
"loglikelihood", "loglikelihood_rolling", "generate_until", "multiple_choice"
]
InputType = Literal["text", "text_image"]
@dataclass
class Instance:
......@@ -16,9 +14,6 @@ class Instance:
arguments: tuple
idx: int
# Input type for multimodal
input_type: InputType = "text"
metadata: Tuple[Optional[str], Optional[int], Optional[int]] = field(
default_factory=lambda: (None, None, None)
)
......
......@@ -36,7 +36,7 @@ class LM(abc.ABC):
LM calls whenever possible.
:param requests: list[Instance]
A list of Instance objects, with property `args` which returns a tuple (context, continuation, visual_list).
A list of Instance objects, with property `args` which returns a tuple (context, continuation).
`context: str`
Context string. Implementations of LM must be able to handle an
empty context string.
......@@ -44,8 +44,6 @@ class LM(abc.ABC):
The continuation over which log likelihood will be calculated. If
there is a word boundary, the space should be in the continuation.
For example, context="hello" continuation=" world" is correct.
'visual_list: Optional[list[dict]]'
Visual Input to the model. Can be None
:return: list[tuple[float, bool]]
A list of pairs (logprob, isgreedy)
......
......@@ -325,9 +325,7 @@ class Llava(LM):
pbar = tqdm(total=num_iters, disable=(self.rank != 0), desc="Model Responding")
for chunk in chunks:
contexts, all_gen_kwargs, visuals = zip(*chunk)
# task = task[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.
......
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