Unverified Commit 0a740a11 authored by Roger Wang's avatar Roger Wang Committed by GitHub
Browse files

[Bugfix] Fix token padding for chameleon (#6724)

parent c882a7f5
...@@ -125,7 +125,8 @@ def input_processor_for_chameleon(ctx: InputContext, llm_inputs: LLMInputs): ...@@ -125,7 +125,8 @@ def input_processor_for_chameleon(ctx: InputContext, llm_inputs: LLMInputs):
# Appending sep token for chat mode to follow default processor # Appending sep token for chat mode to follow default processor
# behavior # behavior
new_prompt += tokenizer.sep_token if new_prompt is not None:
new_prompt += tokenizer.sep_token
new_token_ids += [CHAMELEON_SEP_TOKEN_ID] new_token_ids += [CHAMELEON_SEP_TOKEN_ID]
# NOTE: Create a defensive copy of the original inputs # NOTE: Create a defensive copy of the original inputs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment