File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def pipeline(model_path: str,
11
11
backend_config : Optional [Union [TurbomindEngineConfig ,
12
12
PytorchEngineConfig ]] = None ,
13
13
chat_template_config : Optional [ChatTemplateConfig ] = None ,
14
- log_level : str = 'ERROR ' ,
14
+ log_level : str = 'WARNING ' ,
15
15
max_log_len : int = None ,
16
16
** kwargs ):
17
17
"""
Original file line number Diff line number Diff line change @@ -501,6 +501,12 @@ async def generate(
501
501
if gen_config .stop_token_ids is None :
502
502
gen_config .stop_token_ids = self .stop_words
503
503
if not gen_config .do_sample :
504
+ logger .warn (f'GenerationConfig: { gen_config } ' )
505
+ logger .warn (
506
+ 'Since v0.6.0, lmdeploy add `do_sample` in '
507
+ 'GenerationConfig. It defaults to False, meaning greedy '
508
+ 'decoding. Please set `do_sample=True` if sampling '
509
+ ' decoding is needed' )
504
510
# greedy decode
505
511
gen_config .top_k = 1
506
512
# avoid unnecessary process
You can’t perform that action at this time.
0 commit comments