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

Implications of Classifier-Free Guidance in Auto-regressive Models #14

Open
fkcptlst opened this issue Apr 9, 2024 · 1 comment
Open

Comments

@fkcptlst
Copy link

fkcptlst commented Apr 9, 2024

Hi, thank you for the insightful work!

I have some concerns regarding the classifier-free guidance (CFG) in auto-regressive models.

CFG in this work is implemented as follows:

VAR/models/var.py

Lines 191 to 192 in 1ae5177

t = cfg * ratio
logits_BlV = (1+t) * logits_BlV[:B] - t * logits_BlV[B:]

However, it's important to note that CFG in auto-regressive models differs fundamentally from that in diffusion models (as outlined in Section 4 of this blog). In essence, the guidance in diffusion models is not theoretically applicable to auto-regressive models.

I am curious if this difference yields any notable empirical results. Have you conducted any quantitative or qualitative studies on the impact of CFG on this auto-regressive model? I would greatly appreciate any insights or empirical findings you could share on this subject.

@keyu-tian
Copy link
Collaborator

@fkcptlst in the Ablation Study section of the paper we tested the influence of CFG. We simply follow Google MUSE's CFG introduced in their paper. https://sander.ai/2022/05/26/guidance.html seems a thorough analysis on CFG. We'll check that later and maybe try some more implementations. Thank you for providing 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