Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda509e2

Browse files
authored
Skip decoding special tokens (#1244)
1 parenta64be9b commitda509e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎pgml-extension/src/bindings/transformers/transformers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def stream(self, input, timeout=None, **kwargs):
314314
self.tokenizer,
315315
timeout=timeout,
316316
skip_prompt=True,
317+
skip_special_tokens=True
317318
)
318319
if"chat_template"inkwargs:
319320
input=self.tokenizer.apply_chat_template(
@@ -338,6 +339,7 @@ def stream(self, input, timeout=None, **kwargs):
338339
streamer=TextIteratorStreamer(
339340
self.tokenizer,
340341
timeout=timeout,
342+
skip_special_tokens=True
341343
)
342344
input=self.tokenizer(input,return_tensors="pt",padding=True).to(
343345
self.model.device

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp