-
Notifications
You must be signed in to change notification settings - Fork 120
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
Output Logits #175
Comments
I think you want something like this: You can supply your own logit sampler (returning a single value MLXArray. If that isn't quite what you are looking for, then perhaps you want a generator of logits? It would be easy to copy that and make a If this is something that is generally useful, perhaps the |
yeah the general idea is I want to enforce what the model can output. In my case I am trying to enforce only yes or no answers. I can do this by feeding the input and then looking at the first output logits. I can then respond with either yes or no depending on which token has higher probability assuming the vocab has a yes and no token. |
OK, the logit sampler ought to be able to do that -- it has all the logits and its only task is to return a single token. |
I can see how to generate text with these models but I want to get the actual output logins over the vocab. Is there a simple way to do this at each step, do I need to create a custom detokenizer?
The text was updated successfully, but these errors were encountered: