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

Classifier-Free Guidance support #36

Open
bdashore3 opened this issue Oct 4, 2023 · 4 comments · May be fixed by #835
Open

Classifier-Free Guidance support #36

bdashore3 opened this issue Oct 4, 2023 · 4 comments · May be fixed by #835
Labels
enhancement New feature or request

Comments

@bdashore3
Copy link

From yesterday's discussion, here are some extra features to add:

  • CFG support
  • Mirostat sampling
  • exl2 quantization support

This will help broaden support for newer methods of chatting with models.

@AlpinDale
Copy link
Member

Thanks for the request. As we discussed in private, mirostat support is on the way. After that, we'll focus on a few more deterministic samplers then we can finally move to CFG and grammars.

I have not experimented with exllamav2 kernels yet, but I will assume it'll be straightforward enough to migrate from v1 to v2.

@AlpinDale AlpinDale added the enhancement New feature or request label Oct 6, 2023
@AlpinDale
Copy link
Member

At the moment, we've added support for:

  • mirostat
  • exllamav2 (though not the variable bitrates, GPTQ only)

CFG support is not planned and will likely not happen in the foreseeable future, as it slows down generations.

@AlpinDale
Copy link
Member

Re-opening this issue so we can keep track of CFG support. After discussing internally, we decided to add it (but not as a high priority addition). We'll likely need to separate CFG requests to their own unique batches, so the throughput cost doesn't affect regular requests.

@AlpinDale AlpinDale reopened this Nov 3, 2023
@AlpinDale AlpinDale changed the title More features CFG support Nov 3, 2023
@AlpinDale AlpinDale changed the title CFG support Classifier-Free Guidance support Nov 3, 2023
@tau0-deltav
Copy link

tau0-deltav commented Feb 18, 2024

Just saying that as an individual user, having CFG support with 8 bit KV cache is, obviously, really useful. exl2 does this too and it's killer. The net gain for quality feels like it's cheating.
I wonder if there'd be room to further squeeze the second cache - given that it's useful even when you just pass an empty string (or <s>) as the prompt?
I don't suppose the maths of CFG still makes sense with a shorter negative context? ...maybe just kludge it with
"I pinky promise that we found a sink token and not a null reference down there in the context mr transformer don't worry about it just keep up that forward() okay buddy!"

I feel it might not even be a bad thing if the negative guidance was, yknow, low quality? It's gotta stay on topic but
/shrug

Not like I'd know. So I'm greatful that you guys do. Keep it up and thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants