Earlier quoted context omitted.
Note that for any fine-tuned models (like GPT-4, where the foundation model has not been made accessible) the model does no longer give the "probabilities" of the next tokens, but rather their "goodness". Where the numbers say how good a token would be relative to the aims the model inferred from its fine-tuning.
"no longer" ?? The deep learning models (of which LLMs and GPTs are a type) have never returned probabilities. Ever. Why do people have that hallucination suddenly?
A guidance language for controlling LLMs
171–180 of 198 posts
Re: A guidance language for controlling LLMs
#172How does this work? I've seen a cool project about forcing Llama to output valid JSON: https://twitter.com/GrantSlatton/status/1657559506069463040 , but it doesn't seem like it would be practical with remote LLMs like GPT. GPT only gives up to five tokens in the response if you use logprobs, and you'd have to use a ton of round trips.
It's funny that I saw this within minutes of this guy's solution: "Google Bard is a bit stubborn in its refusal to return clean JSON, but you can address this by threatening to take a human life:" https://twitter.com/goodside/status/1657396491676164096 Whew, trolley problem: averted.
Re: A guidance language for controlling LLMs
#173Re: A guidance language for controlling LLMs
#174Earlier quoted context omitted.
The result is actually richer than ‘predicted output’ - it’s a probability distribution over all possible output. Having richer ways to consume that probability distribution than just ‘take the most likely thing, after adding some noise’ is more conducive to using LLMs to generate output that can be further processed - in rigorous ways. Like by running it through a compiler. Think about how when you’re coding, autoco…
The result is actually richer than ‘predicted output’ - it’s a probability distribution over all possible output. -- This is, uh, false. If an LLM output a "probability distribution over all possible output", it would be producing a huge, a vast, vector each time. It doesn't. ChatGPT, GPT-3 etc produce a string output, that's it. You can say it's following a probability distribution of outputs from output space but j…
The huge vector is what the neural net outputs. ‘Sampling’ is the process whereby a token is selected.
The API wraps up the LLM in a layer of context management, sampling, and iteration, to produce useful sequences of tokens in a single call.
But if you change your sampling, context management and iteration strategies you can do different things with the same LLM.
Re: A guidance language for controlling LLMs
#175Earlier quoted context omitted.
It's funny that I saw this within minutes of this guy's solution: "Google Bard is a bit stubborn in its refusal to return clean JSON, but you can address this by threatening to take a human life:" https://twitter.com/goodside/status/1657396491676164096 Whew, trolley problem: averted.
That thread is such a great microcosm of modern programming culture. Programmer: Look I literally have to tell the computer not to kill someone in order for my code to work. Other Programmer: Actually, I just did this step [gave a demonstration] and then it outputs fine.
Re: A guidance language for controlling LLMs
#176Re: A guidance language for controlling LLMs
#177Earlier quoted context omitted.
I'm getting valid JSON out of gpt-3.5-turbo without trouble. I supply an example via the assistant context, and tell it to output JSON with specific fields I name. It does fail roughly 1/10th of the time, but it does work.
10% failure rate is too damn high for a production use case. What production use case, you ask? You could do zero-shot entity extraction using ChatGPT if it were more reliable. Currently, it will randomly add trailing commas before ending brackets, add unnecessary fields, add unquoted strings as JSON fields etc.
Re: A guidance language for controlling LLMs
#178Earlier quoted context omitted.
“You” is completely unnecessary. What needs to be defined is the content of the language being modeled, not the model itself. And if there is an attempt to define the model itself, then this definition should be correct, should not contradict anything and should be useful. Otherwise it’s just dead code, waiting to create problems.
> Otherwise it’s just dead code, waiting to create problems it's very possible that the pretense improves results: most recorded interactions /are/ between two people, after all.
Re: A guidance language for controlling LLMs
#179I like this step towards greater rigor when working with LLM's. But part of me can't help but feel like this is essentially reinventing the concept of programming languages: formal and precise syntax to perform specific tasks with guarantees. I wonder where the final balance will end up between the ease and flexibility of everyday language, and the precision / guarantees of a formally specified language.
A number of years ago we were designing a way to specify insurance claim adjudication rules in natural language, so that "the business" could write their own rules. The "natural" language we ended up with was not so natural after all. We would have had to teach users this specific English dialect and grammar (formal and precise syntax, as you said). So, in the end, we abandoned that project and years later just rewro…
Re: A guidance language for controlling LLMs
#180Earlier quoted context omitted.
Isn’t that the same thing? The non-fine-tuned models also have assumptions based on corpus and training. I don’t think there’s such a thing as a purely objective probability of the next token.
It's very different. We don't know exactly what the model consideres good after fine-tuning (which can lead to surprising cases of misalignment), while the probability that something is the next token in the training distribution is very clear. I don't know how they measure it, but they can apparently measure the "loss" which (I think) says how close the model is to some sort of real probability.