[MM] Simplify prompt updates: replace PromptSeq with list[int] (#53372)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: Qwen Code <noreply@alibaba-inc.com>
This commit is contained in:
@@ -532,6 +532,12 @@ return a list of [PromptUpdate][vllm.multimodal.processing.PromptUpdate] instanc
|
||||
Each [PromptUpdate][vllm.multimodal.processing.PromptUpdate] instance specifies an update operation
|
||||
(e.g.: insertion, replacement) performed by the HF processor.
|
||||
|
||||
!!! note
|
||||
The target and content of each update are token sequences. When converting
|
||||
text to token sequences, remember to encode it with
|
||||
`cached_encode(..., add_special_tokens=False)`. Otherwise, the updated prompt
|
||||
may contain duplicated special tokens or fail to match the target.
|
||||
|
||||
=== "Basic example: LLaVA"
|
||||
|
||||
Looking at HF's `LlavaProcessor`:
|
||||
|
||||
Reference in New Issue
Block a user