Skip to content

Commit

Permalink
Update llava.py (#54)
Browse files Browse the repository at this point in the history
added stopping_criteria from gen kwargs
  • Loading branch information
mosheber authored Jul 14, 2024
1 parent 722860d commit 36b7ecb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fastrag/generators/llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def __init__(
if "streamer" not in self.generation_kwargs:
self.generation_kwargs["streamer"] = TextStreamer(AutoTokenizer.from_pretrained(model))

if "stopping_criteria" in self.generation_kwargs:
self.stopping_criteria_list = self.generation_kwargs["stopping_criteria"]
del self.generation_kwargs["stopping_criteria"]

self.processor = AutoProcessor.from_pretrained(model)
self.image_token = "<image>"

Expand Down

0 comments on commit 36b7ecb

Please sign in to comment.