From a86e9411a353fa616ec1d6ea38d359162bd206ee Mon Sep 17 00:00:00 2001 From: Charlie Ruan <53290280+CharlieFRuan@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:28:47 -0500 Subject: [PATCH] [Grammar][Fix] Pass in stop tokens to xgrammar TokenizerInfo --- src/llm_chat.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/llm_chat.ts b/src/llm_chat.ts index 0451da3a..7050e00b 100644 --- a/src/llm_chat.ts +++ b/src/llm_chat.ts @@ -554,6 +554,7 @@ export class LLMChatPipeline { this.token_postproc_method, this.prepend_space_in_encode, this.fullVocabSize, + this.stopTokens, ); this.grammarCompiler = await xgr.GrammarCompiler.createGrammarCompiler(