ModelScope我显存再跑别的,所以没法跑1.3B,然后就用那个小的damo/nlp_gpt3_text-generation_chinese-base这个。 出现一个错误: Traceback (most recent call last): File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/utils/registry.py", line 212, in build_from_cfg return obj_cls(**args) File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/trainers/nlp_trainer.py", line 56, in init super().init(*args, **kwargs) File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/trainers/trainer.py", line 164, in init self.model = self.build_model() File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/trainers/nlp/gpt3_trainer.py", line 87, in build_model self.model_dir, cfg_dict=self.cfg, megatron_cfg=self.cfg.megatron) File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/utils/config.py", line 296, in getattr return getattr(self._cfg_dict, name) File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/utils/config.py", line 55, in getattr raise ex AttributeError: 'ConfigDict' object has no attribute 'megatron'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/dmx/GPT3xunlian/train.py", line 87, in trainer = build_trainer( File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/trainers/builder.py", line 39, in build_trainer return build_from_cfg(cfg, TRAINERS, default_args=default_args) File "/root/anaconda3/envs/ChatGLMxl/lib/python3.9/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') AttributeError: GPT3Trainer: 'ConfigDict' object has no attribute 'megatron' AttributeError: 'ConfigDict' object has no attribute 'megatron'
好的,你可以使用damo/nlp_gpt3_small模型。这个模型的参数量较小,对显存的要求也较低。你可以尝试使用这个模型来生成文本。
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352