Add InstructBLIP (#23460)

* Squash 88 commits

* Use markdown

* Remove mdx files due to bad rebase

* Fix modeling files due to bad rebase

* Fix style

* Update comment

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
NielsRogge
2023-06-26 11:23:57 +02:00
committed by GitHub
parent 8e164c5400
commit 868363abb9
32 changed files with 3425 additions and 21 deletions

View File

@@ -330,9 +330,7 @@ class Blip2TextModelDecoderOnlyTester:
def prepare_config_and_inputs(self):
config = self.get_config()
input_ids = ids_tensor([self.batch_size, self.seq_length], self.vocab_size).clamp(
3,
)
input_ids = ids_tensor([self.batch_size, self.seq_length], self.vocab_size).clamp(3)
input_ids[:, -1] = self.eos_token_id # Eos Token
attention_mask = input_ids.ne(self.pad_token_id)