-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] 如何不打印logprobs #3246
Labels
Comments
没太理解问题,是指日志中打印了这些信息么? |
是的。是需要设置log_level吗? |
容我晚些时候测试看看。用的pipeline接口么? |
对,用的是以下代码:
|
from lmdeploy import pipeline, TurbomindEngineConfig, GenerationConfig
llm = pipeline(
# config.model_path,
'Qwen/Qwen2.5-7B-Instruct',
backend_config=TurbomindEngineConfig(
tp=1,
# max_batch_size=config.max_batch_size,
enable_prefix_caching=True,
# session_len=config.max_model_len,
# cache_max_entry_count=config.gpu_memory_utilization
)
)
gen_config = GenerationConfig(
n=1,
# max_new_tokens=config.max_tokens,
# # top_k=-1,
# top_p=config.top_p,
# min_p=config.min_p,
temperature=1.0,
do_sample=True,
logprobs=1,
skip_special_tokens=False
)
response = llm('1+1=?', gen_config=gen_config)
print(response) The result is shown as follows:
It didn't output the logprob values unless I use |
thx!我单独测试也没有问题了,我再看看是不是别的地方设置有问题。 |
Hi, 我看了下lmdeploy的源码,如果采样的token_id不在topn里面,是会打印的,具体是这里
请问,是否可以加一个参数来控制是否打印呢?或者用logging来代替print? |
这个应该要删掉 😅 |
#3252 I removed it in this PR |
Thanks for the fix~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
设置logprobs=1之后,会打印logprobs,如何不打印呢?
如:
18054 {34426: -0.9241080284118652}
7196 {1077: -1.350784182548523}
8168 {3158: -0.5630294680595398}
The text was updated successfully, but these errors were encountered: