mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-29 08:30:51 +02:00
gemma3 now works correctly
This commit is contained in:
@@ -2763,6 +2763,10 @@ int clip_n_patches_by_img(const struct clip_ctx * ctx, struct clip_image_f32 * i
|
||||
const auto & params = ctx->vision_model.hparams;
|
||||
|
||||
int n_patches = (params.image_size / params.patch_size) * (params.image_size / params.patch_size);
|
||||
if (ctx->proj_type == PROJECTOR_TYPE_GEMMA3)
|
||||
{
|
||||
n_patches = 256; //kcpp hardcode gemma3 vision to 256 size
|
||||
}
|
||||
|
||||
if (ctx->proj_type == PROJECTOR_TYPE_LDP || ctx->proj_type == PROJECTOR_TYPE_LDPV2 || ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE) {
|
||||
n_patches /= 4;
|
||||
|
||||
Reference in New Issue
Block a user