Skip to content

Commit 9fdec02

Browse files
committed
unclamp glm4 in debug
1 parent 621cc8f commit 9fdec02

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

gpttype_adapter.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,8 +1908,14 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
19081908
clamped_max_context_length = 16384;
19091909
}
19101910
if (isGguf && file_format_meta.model_architecture == GGUFArch::ARCH_GLM4 && kcpp_data->n_batch > 16) {
1911-
printf("GLM-4 is broken on larger batch sizes. Clamping batch size to 16.\n");
1912-
kcpp_data->n_batch = kcpp_data->n_ubatch = 16;
1911+
if(debugmode==1)
1912+
{
1913+
printf("GLM-4 is broken on larger batch sizes. Clamp ignored in debug.\n");
1914+
} else {
1915+
printf("GLM-4 is broken on larger batch sizes. Clamping batch size to 16.\n");
1916+
kcpp_data->n_batch = kcpp_data->n_ubatch = 16;
1917+
}
1918+
19131919
}
19141920

19151921
kcpp_data->n_ctx = clamped_max_context_length;

0 commit comments

Comments
 (0)