[GH-ISSUE #901] 如何获取模型输出 #647

Closed
opened 2026-10-29 14:42:20 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @jzw02 on GitHub (Mar 15, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/901

在跑R1-Q4KM时使用local_chat.py利用函数prefill_and_generate能在终端得到输出,但是生成的generated是token数字,如何得到模型回答。

Originally created by @jzw02 on GitHub (Mar 15, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/901 在跑R1-Q4KM时使用local_chat.py利用函数`prefill_and_generate`能在终端得到输出,但是生成的generated是token数字,如何得到模型回答。
Author
Owner

@Atream commented on GitHub (Mar 15, 2025):

可以修改代码,在utils/util.py里做了实际的输出,可以把输出的字符存下来

<!-- gh-comment-id:2726557056 --> @Atream commented on GitHub (Mar 15, 2025): 可以修改代码,在utils/util.py里做了实际的输出,可以把输出的字符存下来
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#647
No description provided.