Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PaddleV3] 新增大模型 pytorch 中的 GPT2 #1085

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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
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