Merge cd7c288740f67f188a9bb584187f3e907f6f2fbf into c0d2f624c09dc18e709e37c2ad90c039a4eb72a2

This commit is contained in:
Ziwen Han 2025-06-27 02:27:35 +00:00 committed by GitHub
commit 9eaba98cd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -596,6 +596,8 @@ class DecodingTask:
if self.sample_len is not None:
max_prefix_len = self.n_ctx // 2 - self.sample_len
prefix_tokens = prefix_tokens[-max_prefix_len:]
if not self.options.without_timestamps:
tokens = tokens + [self.tokenizer.timestamp_begin]
tokens = tokens + prefix_tokens
if prompt := self.options.prompt: