Commit 911cc2d
committed
Add Mistral3 multimodal support with Pixtral vision encoder
This adds support for Mistral3 multimodal models (vision + text):
- `Bumblebee.Vision.Pixtral`: Pixtral vision encoder with RoPE support
- `Bumblebee.Text.Mistral3`: Mistral3 text decoder with interleaved attention
- `Bumblebee.Multimodal.Mistral3`: Vision-language model combining Pixtral
and Mistral3 with multimodal projector for image-conditioned generation
- Ministral/Ministral3 variant support with interleaved attention
- Devstral 2 (Ministral3) model support
Supported architectures:
- PixtralVisionModel
- Mistral3Model, Mistral3ForCausalLM, Mistral3ForSequenceClassification
- Mistral3ForConditionalGeneration (multimodal)
- Ministral3ForCausalLM1 parent 8365426 commit 911cc2d
10 files changed
Lines changed: 1785 additions & 8 deletions
File tree
- lib
- bumblebee
- layers
- multimodal
- text
- vision
- test/bumblebee
- multimodal
- text
- vision
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
| |||
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
| 208 | + | |
201 | 209 | | |
202 | 210 | | |
203 | 211 | | |
| |||
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
| 266 | + | |
| 267 | + | |
258 | 268 | | |
259 | 269 | | |
260 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | | - | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
134 | 148 | | |
135 | 149 | | |
136 | 150 | | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
0 commit comments