From aeeb291ffaac643c1d70ffca1a42b52416ae99ad Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 27 Jun 2024 13:56:20 +0000 Subject: [PATCH] Fix for deepseek too. --- router/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/src/main.rs b/router/src/main.rs index dde05a84..4a6d4694 100644 --- a/router/src/main.rs +++ b/router/src/main.rs @@ -302,7 +302,7 @@ async fn main() -> Result<(), RouterError> { let mut tokenizer = Tokenizer::from_file(filename).ok(); if let Some(tokenizer) = &mut tokenizer{ if let Some(class) = &tokenizer_config.tokenizer_class{ - if class == "LlamaTokenizer"{ + if class == "LlamaTokenizer" || class == "LlamaTokenizerFast" { tracing::info!("Overriding LllamaTokenizer with TemplateProcessing to follow python override defined in https://github.com/huggingface/transformers/blob/4aa17d00690b7f82c95bb2949ea57e22c35b4336/src/transformers/models/llama/tokenization_llama_fast.py#L203-L205"); let mut single = vec![]; let mut special_tokens = vec![];