Add some KV cache to blip. (#1150)

* Add some KV cache to blip.

* Mention BLIP in the readme.
This commit is contained in:
Laurent Mazare
2023-10-22 09:44:48 +01:00
committed by GitHub
parent 62fc965617
commit df2f89b6cf
4 changed files with 74 additions and 26 deletions

View File

@ -296,7 +296,7 @@ impl BlipForConditionalGeneration {
&self.vision_model
}
pub fn text_decoder(&self) -> &blip_text::TextLMHeadModel {
&self.text_decoder
pub fn text_decoder(&mut self) -> &mut blip_text::TextLMHeadModel {
&mut self.text_decoder
}
}