[go: nahoru, domu]

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

Open
1 task done
JasonCZH4 opened this issue Jun 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

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。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants