1 parent 8a51eb9 commit 5114672Copy full SHA for 5114672
1 file changed
src/model/te/llm.hpp
@@ -200,7 +200,11 @@ namespace LLM {
200
config.vision.in_channels = tensor_storage.ne[2];
201
config.vision.hidden_size = tensor_storage.ne[3];
202
}
203
- if (contains(name, "visual.patch_embed.bias")) {
+ // HF-format checkpoints keep the patch embed unsplit under a single name.
204
+ if (contains(name, "visual.patch_embed.proj.weight")) {
205
+ config.vision.patch_size = static_cast<int>(tensor_storage.ne[0]);
206
+ }
207
+ if (contains(name, "visual.patch_embed.bias") || contains(name, "visual.patch_embed.proj.bias")) {
208
config.vision.hidden_size = tensor_storage.ne[0];
209
210
if (contains(name, "visual.pos_embed.weight")) {
0 commit comments