Skip to content

Commit

Permalink
[idefics] small fixes (#25764)
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 authored and LysandreJik committed Aug 28, 2023
1 parent 6836e9d commit 13aef13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/transformers/models/idefics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
_import_structure["modeling_idefics"] = [
"IDEFICS_PRETRAINED_MODEL_ARCHIVE_LIST",
"IdeficsForVisionText2Text",
"IdeficsGatedCrossAttentionLayer",
"IdeficsModel",
"IdeficsPreTrainedModel",
]
Expand All @@ -62,7 +61,6 @@
from .modeling_idefics import (
IDEFICS_PRETRAINED_MODEL_ARCHIVE_LIST,
IdeficsForVisionText2Text,
IdeficsGatedCrossAttentionLayer,
IdeficsModel,
IdeficsPreTrainedModel,
)
Expand Down
4 changes: 2 additions & 2 deletions src/transformers/models/idefics/modeling_idefics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,9 +1482,9 @@ def forward(
Example:
```python
>>> from transformers import AutoTokenizer, LlamaForCausalLM
>>> from transformers import AutoTokenizer, IdeficsForVisionText2Text
>>> model = LlamaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
>>> model = IdeficsForVisionText2Text.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
>>> tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)
>>> prompt = "Hey, are you consciours? Can you talk to me?"
Expand Down

0 comments on commit 13aef13

Please sign in to comment.