Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 96d9fb7

Browse files
Fix: set max context length to 8192
1 parent 3c49bc0 commit 96d9fb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/config/gguf_parser.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ void GGUFHandler::ModelConfigFromMetadata() {
582582
model_config_.model = name;
583583
model_config_.id = name;
584584
model_config_.version = std::to_string(version);
585-
model_config_.max_tokens = max_tokens;
586-
model_config_.ctx_len = max_tokens;
585+
model_config_.max_tokens = std::min(8192, max_tokens);
586+
model_config_.ctx_len = std::min(8192, max_tokens);
587587
model_config_.ngl = ngl;
588588
}
589589

0 commit comments

Comments
 (0)