Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: transformers
|
5 |
+
pipeline_tag: image-text-to-text
|
6 |
+
tags:
|
7 |
+
- vision
|
8 |
+
---
|
9 |
+
# ADD HEAD
|
10 |
+
|
11 |
+
```
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
print('Add Vision...')
|
16 |
+
# ADD HEAD
|
17 |
+
# Combine pre-trained encoder and pre-trained decoder to form a Seq2Seq model
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
Vmodel = VisionEncoderDecoderModel.from_encoder_decoder_pretrained(
|
22 |
+
"google/vit-base-patch16-224-in21k", "LeroyDyer/Mixtral_AI_Tiny"
|
23 |
+
)
|
24 |
+
_Encoder_ImageProcessor = Vmodel.encoder
|
25 |
+
_Decoder_ImageTokenizer = Vmodel.decoder
|
26 |
+
_VisionEncoderDecoderModel = Vmodel
|
27 |
+
# Add Pad tokems
|
28 |
+
LM_MODEL.VisionEncoderDecoder = _VisionEncoderDecoderModel
|
29 |
+
# Add Sub Components
|
30 |
+
LM_MODEL.Encoder_ImageProcessor = _Encoder_ImageProcessor
|
31 |
+
LM_MODEL.Decoder_ImageTokenizer = _Decoder_ImageTokenizer
|
32 |
+
LM_MODEL
|
33 |
+
|
34 |
+
|
35 |
+
```
|