ollama: Add context_size for new "yi-coder" model (#17409)

Release Notes:

- Added context_size for "yi-coder" model in ollama

More information about the model on ollama:
https://ollama.com/library/yi-coder:9b
This commit is contained in:
Daniel Rauber 2024-09-05 17:05:57 +02:00 committed by GitHub
parent 2aae3ab448
commit 8660719bd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,7 @@ fn get_max_tokens(name: &str) -> usize {
"llama3" | "gemma2" | "gemma" | "codegemma" | "starcoder" | "aya" => 8192,
"codellama" | "starcoder2" => 16384,
"mistral" | "codestral" | "mixstral" | "llava" | "qwen2" | "dolphin-mixtral" => 32768,
"llama3.1" | "phi3" | "phi3.5" | "command-r" | "deepseek-coder-v2" => 128000,
"llama3.1" | "phi3" | "phi3.5" | "command-r" | "deepseek-coder-v2" | "yi-coder" => 128000,
_ => DEFAULT_TOKENS,
}
.clamp(1, MAXIMUM_TOKENS)