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

[Bug]: UNIMO模型的resize_token_embeddings方法不会修改decoder的vocab_size,导致报错 #8651

Closed
1 task done
JasonCZH4 opened this issue Jun 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working stale

Comments

@JasonCZH4
Copy link

软件环境

- paddlepaddle: 2.5.2
- paddlepaddle-gpu: 2.5.2
- paddlenlp: 2.8.0

重复问题

  • I have searched the existing issues

错误描述

UNIMO模型的resize_token_embeddings方法不会修改decoder的vocab_size,导致input_embeddings_size和output_embeddings_size没法对齐

稳定复现步骤 & 代码

tokenizer = UNIMOTokenizer.from_pretrained('./unimo-text-1.0-large')
model.resize_token_embeddings(len(tokenizer)) 
print(model.get_input_embeddings().weight.shape, model.lm_head.weight.shape)
@JasonCZH4 JasonCZH4 added the bug Something isn't working label Jun 24, 2024
@JasonCZH4
Copy link
Author

GPT2模型也有类似问题,但是他已经被修复了,参考link,我使用类似方法修改unimo/modeling.py后可以修复,后续会提个PR。

Copy link

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

@github-actions github-actions bot added the stale label Aug 24, 2024
Copy link

github-actions bot commented Sep 7, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants