Open Iamlovingit opened 8 months ago
在参照tools/run_text_generation_server_hf.py进行推理任务开发时,发现下面这3行的中的tokenizer 和 model 应为 self.tokenizer 和 self.model https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L148 https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L150 https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L151
tools/run_text_generation_server_hf.py
tokenizer
model
self.tokenizer
self.model
同样的问题也存在于tools/run_text_generation_server.py
tools/run_text_generation_server.py
@zhaoxudong01-ieisystem
@lilianlhl
非常感谢您提出的问题,经验证两种方式都可以正常跑通代码。 当然您提出的self.tokenizer 和 self.model 更符合编程规范,我们会马上提交PR优化这段代码,谢谢您的宝贵建议。
在参照
tools/run_text_generation_server_hf.py
进行推理任务开发时,发现下面这3行的中的tokenizer
和model
应为self.tokenizer
和self.model
https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L148 https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L150 https://github.com/IEIT-Yuan/Yuan-2.0/blob/a262e4087d70c68bd381bd2529ab88aa2516b498/tools/run_text_generation_server_hf.py#L151同样的问题也存在于
tools/run_text_generation_server.py