IEIT-Yuan / Yuan-2.0

Yuan 2.0 Large Language Model
Other
681 stars 85 forks source link

推理示例代码问题 #105

Open Iamlovingit opened 8 months ago

Iamlovingit commented 8 months ago

在参照tools/run_text_generation_server_hf.py进行推理任务开发时,发现下面这3行的中的tokenizermodel 应为 self.tokenizerself.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

Shawn-IEITSystems commented 8 months ago

@zhaoxudong01-ieisystem

zhaoxudong01 commented 8 months ago

@lilianlhl

lilianlhl commented 8 months ago

非常感谢您提出的问题,经验证两种方式都可以正常跑通代码。 当然您提出的self.tokenizer 和 self.model 更符合编程规范,我们会马上提交PR优化这段代码,谢谢您的宝贵建议。