mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
GLM4 batch clamp
This commit is contained in:
@@ -1907,6 +1907,10 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
||||
printf("Warning: Only GGUF models can use max context above 16k. Max context lowered to 16k.\n");
|
||||
clamped_max_context_length = 16384;
|
||||
}
|
||||
if (isGguf && file_format_meta.model_architecture == GGUFArch::ARCH_GLM4 && kcpp_data->n_batch > 16) {
|
||||
printf("GLM-4 is broken on larger batch sizes. Clamping batch size to 16.\n");
|
||||
kcpp_data->n_batch = kcpp_data->n_ubatch = 16;
|
||||
}
|
||||
|
||||
kcpp_data->n_ctx = clamped_max_context_length;
|
||||
max_context_limit_at_load = clamped_max_context_length;
|
||||
|
||||
Reference in New Issue
Block a user