Skip to content

Conversation

megemini
Copy link
Contributor

@megemini megemini commented Oct 28, 2024

Create A Good Pull Request

新增大模型 pytorch 中的 GPT2

需要在 datasetPyTorch/dataset/ 中新建 gpt2 文件夹,其目录结构如下:

image

其中,checkpoints 目录放置模型文件:

  • config.json
  • pytorch_model.bin

模型文件需要从 https://hf-mirror.com/openai-community/gpt2/tree/main 中下载 ~

另外,输入输出文件:

  • pytorch_input.pkl
  • pytorch_output.pkl

output 是通过 pytorch 运行获得,input 是 Hello world! 转换后的结果 ~
可从如下共享网盘中获取:https://pan.baidu.com/s/1YE4NF1F13EiqQGZ2xBzacg ~ 提取码请私信获取 ~

模型文件上传至服务器后,可重新运行 CI ~

以下为本地验证的结果:

  • > sh run_convert.sh

image

  • > sh run_benchmark.sh

image

  • > python deploy_infer.py

image

@luotao1

@luotao1 luotao1 added the contributor External developers label Oct 31, 2024
@luotao1
Copy link
Collaborator

luotao1 commented Nov 19, 2024

本地验证(看上去我的本地环境GPU没配对,是CPU环境):

sh run_convert.sh 能过
image
sh run_benchmark.sh 和 python deploy_infer.py 出现以下环境问题

image

等我跑下CI

@luotao1 luotao1 merged commit 4e5f360 into PaddlePaddle:develop Nov 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants