mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
gemma3 now works correctly
This commit is contained in:
parent
57c9523405
commit
16137f4281
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
const auto & params = ctx->vision_model.hparams;
|
||||||
|
|
||||||
int n_patches = (params.image_size / params.patch_size) * (params.image_size / params.patch_size);
|
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) {
|
if (ctx->proj_type == PROJECTOR_TYPE_LDP || ctx->proj_type == PROJECTOR_TYPE_LDPV2 || ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE) {
|
||||||
n_patches /= 4;
|
n_patches /= 4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue