#20 3分钟实现推理教程能出个视频么?

Closed
created 2 years ago by zhaoxiong · 6 comments
我照着教程做到最后一步执行运行推理脚本显示报错. 能不能弄个视频完整的演示下, 最后能否请大佬出个3分钟实现训练和生成小说文本的教程视频? 谢谢呀
superqing commented 2 years ago
Owner
请问是什么错误? 鹏城.盘古模型的训练、推理、下游任务应用示例等可以进一步参考如下项目,包含详细的使用教程。 https://git.openi.org.cn/PCL-Platform.Intelligence/PanGu-Alpha-GPU https://git.openi.org.cn/PCL-Platform.Intelligence/PanGu-Alpha-Application。
zhaoxiong commented 2 years ago
Poster
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /code/panguAlpha_pytorch/tools/generate_samples_Pangu.py in <module> 178 if __name__ == "__main__": 179 --> 180 main() /code/panguAlpha_pytorch/tools/generate_samples_Pangu.py in main() 127 128 initialize_megatron(extra_args_provider=add_text_generate_args, --> 129 args_defaults={'tokenizer_type': 'GPT2BPETokenizer'}) 130 131 # Set up model and load checkpoint. /code/panguAlpha_pytorch/megatron/initialize.py in initialize_megatron(extra_args_provider, args_defaults, ignore_unknown_args, allow_no_cuda) 48 set_global_variables(extra_args_provider=extra_args_provider, 49 args_defaults=args_defaults, ---> 50 ignore_unknown_args=ignore_unknown_args) 51 52 # torch.distributed initialization /code/panguAlpha_pytorch/megatron/global_vars.py in set_global_variables(extra_args_provider, args_defaults, ignore_unknown_args) 68 defaults=args_defaults, 69 ignore_unknown_args=ignore_unknown_args) ---> 70 _ = _build_tokenizer(args) 71 _set_tensorboard_writer(args) 72 _set_adlr_autoresume(args) /code/panguAlpha_pytorch/megatron/global_vars.py in _build_tokenizer(args) 89 global _GLOBAL_TOKENIZER 90 _ensure_var_is_not_initialized(_GLOBAL_TOKENIZER, 'tokenizer') ---> 91 _GLOBAL_TOKENIZER = build_tokenizer(args) 92 return _GLOBAL_TOKENIZER 93 /code/panguAlpha_pytorch/megatron/tokenizer/tokenizer.py in build_tokenizer(args) 40 # assert args.merge_file is not None 41 # tokenizer = _GPT2BPETokenizer(args.vocab_file, args.merge_file) ---> 42 tokenizer = JIEBATokenizer(args.vocab_file) 43 else: 44 raise NotImplementedError('{} tokenizer is not ' /code/panguAlpha_pytorch/megatron/tokenizer/tokenization_jieba.py in __init__(self, vocab_file, max_len) 42 model_file = vocab_file + ".model" 43 vocab_file = vocab_file + ".vocab" ---> 44 f = open(vocab_file,'r', encoding='utf-8') 45 lines = f.readlines() 46 self.encoder = {} FileNotFoundError: [Errno 2] No such file or directory: 'megatron/tokenizer/bpe_4w_pcl/vocab.vocab'
zhaoxiong commented 2 years ago
Poster
按着你3分钟的教程一步步执行,显示说没有这个文件,但是文件在那里,这是什么问题?
superqing commented 2 years ago
Owner
这个文件显然是存在的,可能是你代码执行路径的问题,你试着把vocab-file改为全路径。
yands commented 2 years ago
Owner
重新验证了一下,教程是没问题。可能是你代码运行路径不对,你仔细按照教程再操作一遍看看?
zhaoxiong commented 2 years ago
Poster
谢谢 已解决
zhaoxiong closed this issue 2 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.