transformers-stream-generator icon indicating copy to clipboard operation
transformers-stream-generator copied to clipboard

transformers_stream_generator/main.py:139: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation) warnings.warn(

Open lucasjinreal opened this issue 2 years ago • 1 comments

transformers_stream_generator/main.py:139: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation) warnings.warn(

lucasjinreal avatar Jun 01 '23 07:06 lucasjinreal

Just Creating a Generation config and pass the do_stream=True there and pass the generation config to model.generate. this will solve the warning.

feel free to close this issue after the issue is solved

xdevfaheem avatar Jun 15 '23 16:06 xdevfaheem