-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce outlines.models.transformers_multimodal #33
base: main
Are you sure you want to change the base?
Conversation
def __call__( # type: ignore | ||
self, | ||
prompts: Union[str, List[str]], | ||
media: Union[str, Any], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change Any
to PIL.Image
11c0db1
to
a6c229e
Compare
Let’s call it |
f17913b
to
48b6f8f
Compare
48b6f8f
to
bf3694c
Compare
75dc370
to
acb0759
Compare
bdf4097
to
653fe26
Compare
outlines/generate/api.py
Outdated
return prompts, media | ||
|
||
@classmethod | ||
def _load_media(cls, media): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this should be part of the library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not, it's a convenience, but unnecessary. Removing.
from outlines.processors import OutlinesLogitsProcessor | ||
|
||
|
||
class TransformersMultiModal(Transformers): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class TransformersMultiModal(Transformers): | |
class TransformersVision(Transformers): |
yield self._decode_generation(output_group_ids) | ||
|
||
|
||
def transformers_multimodal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def transformers_multimodal( | |
def transformers_vision( |
9cc0775
to
56b5918
Compare
6adb73b
to
9ae6e70
Compare
Docs: https://github.com/lapp0/outlines/blob/multimodal-models/docs/reference/models/multimodal.md
Done:
Todo:
MultiModalSequenceGeneratorAdapter
test_generate.py
, current model is too expensive to be part of test suite.llava-hf/llava-v1.6-mistral-7b-hf
Improve docs:
<image>
token in prompt