Re:Every Way to Get Structured Output from LLMs
by HeatrayEnjoyer on Tuesday June 18, 2024 @03:43AM
(#40715094)
Why not apply it at an earlier layer then?
Re:Every Way to Get Structured Output from LLMs
by anonymoushn on Tuesday June 18, 2024 @07:54AM
(#40716700)
At earlier layers the activations don't correspond as cleanly to tokens, and I expect that vendor APIs for proprietary LLMs wouldn't let you do anything like this.
You either get the same (in this case wrong) thing differently worded, or worse you get effectively noise if the second probability is very much lower than the largest probability.
My guess is that applies here too. Better to let all the layers rethink the tokens, than force hallucination of eg a random letter when you don't expect an angle bracket
(Edit: above is assuming using logprobs and/or logit_bias with the OpenAI API, not some other masking technique)