Live data from Hacker News

ChatGPT as a Calculator for Words

simonwillison.net

51–60 of 81 posts

Re: ChatGPT as a Calculator for Words

#51

> Language models don’t—if you run the same prompt through a LLM several times you’ll get a slightly different reply every time. You can get deterministic output (on a given machine) by setting temperature=0. The Chatgpt interface doesn't let you do that, but the playground API does.

This is an interesting argument. It's evident that the LLM /can/ give different answers to the same question and that they are stochastic in nature. But being computer programs we can make them deterministic with respect to input as you suggest.

More to the point, I don't think a "calculator for words" should be deterministic. Operating on language is much more subjective than operating on numbers. If anything, this is a human limitation that we expect only one answer to one question. I'm a contrarian to Chomsky's philosophy, as he's always been pessimistic of statistical language processing and often approaches from the more objective-side like grammar and parsing.

I'm waiting for the point where we can tap knowledge from Deep Learning models to build rule-sets that appease the deterministic crowd (and get the insight of what an LLM is really modeling). A breakthrough here could also help with two big problems a) alignment and b) copyright.

Re: ChatGPT as a Calculator for Words

#52
Another powerful use not mentioned in the article is the ability to convert unstructured data into structured date.

For example you can copy paste a page describing API documentation and ask an LLM to not only make an API call but then also interpret results. This is the most fascinating use of LLMs to me so far.

Re: ChatGPT as a Calculator for Words

#53
post #21

Earlier quoted context omitted.

He can make the same criticism of Internet searches as he does of GPT: you shouldn't trust them until you validate them. I find that GPT's answers are for the most part more reliable the searches, specifically today's searches. In the last 12 months, search results have become so spammy with AI generated pages (oh the irony), that it's hard to find reliable answers. So like search, I look at GPT's answers with a grai…

Gish looks really nice. I'm going to give it a try. It seems like you've been using similar workflows to what I've been trying for coding with gpt? https://github.com/paul-gauthier/easy-chat#created-by-chatgp...

Pretty much, except that I'm automating everything as much as I can, so that I just give the instructions and GPT does the rest. Here's an example:

-----

#import ~/work/gish/tasks/coding.txt

Change the following so that it looks for the open AI key in the following fashion:

1. env variable

2. os.home()/.openai

3. Throws an exception telling the user to put it in one of the above, and then exits

#diff ~/work/gish/src/LLM.ts

-----

Puts me in vimdiff comparing the old code with the generated code letting me review and cherry pick the changes.

Re: ChatGPT as a Calculator for Words

#54

It makes me sad that the next time I enjoy a piece of writing, I'm going to have to wonder if it was "enhanced" or even written wholesale by ChatGPT. I don't feel the same with arithmetic at all.

When you read a novel, do you spend time worrying about what sections are 'as written' from the author and which sections were cleaned up by an editor?

Yes, actually I do. Not often, but with increasing frequency.

My pet theory is that editors aren't as good as they used to be. Market pressure to publish faster and faster in a vain attempt to keep up with the internet means that fewer of them are given the time and support to get really skilled. Thus resulting in ham fisted edits that jar me out of reading flow, and thence to analysing why.

(This pressure operates the other way too. Many authors' works are pushed out the door when they should have had more editing. )

Re: ChatGPT as a Calculator for Words

#55
post #25

Earlier quoted context omitted.

Can you explain more ? I know the basics of deep learning and I found the article accurate.

The fuzzy jpeg analogy and related kin ignore the internal disentanglement of ideas, which is what separates LLMs from, say, a probabilistic chain producer. I.e. one can think of it as a NERF of an underlying manifold instead of just assembling pictures taken of the manifold, which is an important distinction to make. I.e. it learns the manifold, not the manifold samples. That's what makes it so powerful and lets it…

Just for fun, ask ALPACA its name.

"John Smith"

Where is it from?

"New York City"

I haven't tried to turn up the temperature but I assume that's needed to convince it to give unexpected responses.

There is definitely an element of averaging going on in these models and it's worth maintaining awareness of it. This is IMO also the cause of ChatGPTs odd disembodied voice. It's always projecting some modes in the data.

Re: ChatGPT as a Calculator for Words

#58
post #56

Confabulate is a better word than hallucinate. How did “hallucinating” get popularized? It’s a terrible term in this context.

Ha! Totally agree. Used it in my emails to OpenAI in the early days of GPT-3, hoping they’d adapt the term. I knew it from psychology, where it refers to people giving rational explanations for something that isn’t there (specifically in split brain patients).

I guess “hallucinate” stuck because it works across all disciplines: text, audio, vision…

Re: ChatGPT as a Calculator for Words

#59
post #25

Earlier quoted context omitted.

The fuzzy jpeg analogy and related kin ignore the internal disentanglement of ideas, which is what separates LLMs from, say, a probabilistic chain producer. I.e. one can think of it as a NERF of an underlying manifold instead of just assembling pictures taken of the manifold, which is an important distinction to make. I.e. it learns the manifold, not the manifold samples. That's what makes it so powerful and lets it…

Just for fun, ask ALPACA its name. "John Smith" Where is it from? "New York City" I haven't tried to turn up the temperature but I assume that's needed to convince it to give unexpected responses. There is definitely an element of averaging going on in these models and it's worth maintaining awareness of it. This is IMO also the cause of ChatGPTs odd disembodied voice. It's always projecting some modes in the data.

Could you define what averaging and mode projection are to you in this context? I think I can guess but am not entirely sure if I am understanding where you're coming from well enough.

The above responses here are not too surprising to me -- first, we drastically trade in the variance for bias on a limited dataset. We have a very particular tone here that we're looking for, so bias towards the less spurious modes likely would be a good default for an 'instruction-following' mode.

After all, that very strong bias is what lets us give it instructions and stay in a back-and-forth conversation instead of devolving into something like a movie/book dialog or the middle of a news article about asking about people's names.

I could be entirely wrong about these assumptions, however, I only have my best guesses and (potentially spurious) information to go off of.

We do have a tiny dataset for ALPACA -- only about 55k paired examples, which is great, but that's either going to be a tiny run or not too difficult to overfit to. I'm sure there's good mitigations for that.

I agree that more unexpected responses would be good but I think it's sorta a mathematical "cake and have it too" that a lot of people want. Maybe this isn't at the pareto front for the compute/data/etc (almost certainly not to be honest, it's all pretty new after all!), but your above examples do show the bias-variance tradeoff well, and it looks like we got scammed on the exchange rates.

Running the same example on the base model (i.e., LLAMA with no ALPACA) will get you a representative model of names and such from the open internet that rapidly approaches the underlying distribution as the model size approaches infinity (so far as we know). This is because this is, as effectively as possible (I believe, and please correct me if I'm wrong), an unbiased estimator of the underlying distribution. We're just approaching that minimum variance limit as we minimize the cross-entropy loss.

Necessarily the cross-entropy loss is not minimized under biased circumstances. So a raw language model on the full corpus of text would be brutally penalized* for simply sampling the main or most likely modes of the distribution, whereas for the sake of instruction following this may not be the case.

And of course this is just the surface argument about the statistics of the models, personally the actually interesting things to me are the concept factorizations that happen internal to the (raw next-word-generation) models under cross-entropy -- especially as both the model size and the amount of data grows. Then you start seeing those trends that would only occur when the model is able to disentangle the concept data from the raw statistics, which is I think rather straightforward. One can pull out their frequentist slide rule and mark this down to a T if they'd like to.

Now, this of course transforms wonderfully under the usecase of the fine-tuned instruction-following model usecase. While indeed hampered by bias (to include perhaps the strongest of all: "as an AI model, I cannot blah blah blah blah...."), we see these disentangled concepts take flight as the user asks for varied cross-domain and multi-modal usecases. To me, it's probably the best test to see what's survived the fine-tuning and what hasn't. And we can see that in many of these large language models with RLHF and the like -- indeed it has! It can be quite wrong, but lots of people seem to jump on the "it's just statistical hallucinations" without really asking _why_ it's doing what it's doing. If it was merely a word-chain hallucination, then I don't believe people would be fooled as easily. To me, it's just a standard limits-of-out-of-distribution inference problem that we see with practically every other (non-symbolic) network out there.

That's the cool thing. Neural networks usually don't do this well OOD and that is special.

One other point to the John Smith example and New York is that there's not really a 'good' response to that question other than a perfect distribution of names and places matching the real world. I'm not sure what I'd want to see there, and I guess it depends upon the data it was fine-tuned on. Maybe that is a good test, it is out of my realm of experience with that particular dataset, however.

Hopefully this clears up some of the subtleties between the base and RLHF models and the tradeoffs/etc etc within, at the very least from the perspective I'm coming at it from.

I do really want to emphasize that this is the reason I'm frustrated that people who are skilled in DL are allowing this messaging to happen without reinforcing the math behind it. There's a second, much much much more interesting discussion about the actual structural and developmental elements of these networks that is getting displaced by this discussion, which to me is a bit more surface level and leads itself in circles to the same conclusions we have arrived to for other neural networks, and we generally have little to show for it in the end. Like, we've really got to get a move on to the core of the development of the network during training and the intrinsics of how info theory is specifically impacting these models during training. That's the most interesting area to me and it's what I've learned the most from focusing on. Let's focus as a field on that instead, it's cool stuff and has much more of an effective impact in the long run. *(In a large-enough batchsize domain, which we do see with the enormous token batchsizes in LLMs)

Re: ChatGPT as a Calculator for Words

#60

Another powerful use not mentioned in the article is the ability to convert unstructured data into structured date. For example you can copy paste a page describing API documentation and ask an LLM to not only make an API call but then also interpret results. This is the most fascinating use of LLMs to me so far.

I think this is one of the most powerful uses cases for the next one maybe two years (I have a hard time making guesses beyond that point these days). There’s a lot of stuff you can do with structured data. Millions of existing applications. Until now, that world is connected with our everyday world with something like a rope bridge. It’s like a six lane steel suspension bridge just popped up.
Post reply on HN