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

torch.multinomial 而不是 torch.argmax() #51

Open
Peterande opened this issue Nov 13, 2024 · 1 comment
Open

torch.multinomial 而不是 torch.argmax() #51

Peterande opened this issue Nov 13, 2024 · 1 comment

Comments

@Peterande
Copy link

作者您好,在RAR sample的过程中,我发现将sampled = torch.multinomial(probs, num_samples=1)改成torch.argmax(probs, dim=-1),生成的结果完全崩坏、没有意义。这是什么原因导致的呢?ARLoss中算token是否正确不就是用的torch.argmax(shift_logits, dim=1)吗?

@Peterande Peterande changed the title torch.multinomial 而不是 argmax() torch.multinomial 而不是 torch.argmax() Nov 13, 2024
@cornettoyu
Copy link
Collaborator

Hi,

Thanks for sharing the findings. Unfortunately I do not have experience on using argmax (greedy search) for image generation, so I may not be able to share any insights on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants