• Complain

Stephen Wolfram - What Is ChatGPT Doing ... and Why Does It Work?

Here you can read online Stephen Wolfram - What Is ChatGPT Doing ... and Why Does It Work? full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2023, publisher: Wolfram Media, Inc., genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    What Is ChatGPT Doing ... and Why Does It Work?
  • Author:
  • Publisher:
    Wolfram Media, Inc.
  • Genre:
  • Year:
    2023
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

What Is ChatGPT Doing ... and Why Does It Work?: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "What Is ChatGPT Doing ... and Why Does It Work?" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Stephen Wolfram: author's other books


Who wrote What Is ChatGPT Doing ... and Why Does It Work?? Find out the surname, the name of the author of the book and a list of all author's works by series.

What Is ChatGPT Doing ... and Why Does It Work? — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "What Is ChatGPT Doing ... and Why Does It Work?" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
What Is ChatGPT Doing and Why Does It Work Copyright 2023 Stephen - photo 1
What Is ChatGPT Doing and Why Does It Work Copyright 2023 Stephen - photo 2

What Is ChatGPT Doing ... and Why Does It Work?

Copyright 2023 Stephen Wolfram, LLC

Wolfram Media, Inc. | wolfram-media.com

ISBN-978-1-57955-081-3 (paperback)
ISBN-978-1-57955-082-0 (ebook)

Technology/Computers

Cataloging-in-publication data available at wolfr.am/ChatGPT-cip

For permission to reproduce images, contact permissions@wolfram.com.

Visit the online version of this text at wolfr.am/SW-ChatGPT and wolfr.am/ChatGPT-WA . Click any picture to copy the code behind it.

ChatGPT screenshots were generated with GPT-3, OpenAIs AI system that produces natural language.

First edition.

Contents

Preface

This short book is an attempt to explain from first principles how and why ChatGPT works. In some ways its a story about technology. But its also a story about science. As well as about philosophy. And to tell the story, well have to bring together a remarkable range of ideas and discoveries made across many centuries.

For me its exciting to see so many things Ive so long been interested in come together in a burst of sudden progress. From the complex behavior of simple programs to the core character of language and meaning, and the practicalities of large computer systemsall of these are part of the ChatGPT story.

ChatGPT is based on the concept of neural netsoriginally invented in the 1940s as an idealization of the operation of brains. I myself first programmed a neural net in 1983and it didnt do anything interesting. But 40 years later, with comput-ers that are effectively a million times faster, with billions of pages of text on the web, and after a whole series of engineering innovations, the situation is quite different. Andto everyones surprisea neural net that is a billion times larger than the one I had in 1983 is capable of doing what was thought to be that uniquely human thing of generating meaningful human language.

This book consists of two pieces that I wrote soon after ChatGPT debuted. The first is an explanation of ChatGPT and its ability to do the very human thing of generat-ing language. The second looks forward to ChatGPT being able to use computational tools to go beyond what humans can do, and in particular being able to leverage the computational knowledge superpowers of our Wolfram|Alpha system.

Its only been three months since ChatGPT launched, and we are just beginning to understand its implications, both practical and intellectual. But for now its arrival is a reminder that even after everything that has been invented and discovered, surprises are still possible.

Stephen Wolfram
February 28, 2023

What Is ChatGPT Doing ... and Why Does It Work?
Its Just Adding One Word at a Time

That ChatGPT can automatically generate something that reads even superficially like human-written text is remarkable, and unexpected. But how does it do it? And why does it work? My purpose here is to give a rough outline of whats going on inside ChatGPTand then to explore why it is that it can do so well in producing what we might consider to be meaningful text. I should say at the outset that Im going to focus on the big picture of whats going onand while Ill mention some engineering details, I wont get deeply into them. (And the essence of what Ill say applies just as well to other current large language models [LLMs] as to ChatGPT.)

The first thing to explain is that what ChatGPT is always fundamentally trying to do is to produce a reasonable continuation of whatever text its got so far, where by reasonable we mean what one might expect someone to write after seeing what people have written on billions of webpages, etc.

So lets say weve got the text The best thing about AI is its ability to . Imagine scanning billions of pages of human-written text (say on the web and in digitized books) and finding all instances of this textthen seeing what word comes next what fraction of the time. ChatGPT effectively does something like this, except that (as Ill explain) it doesnt look at literal text; it looks for things that in a certain sense match in meaning. But the end result is that it produces a ranked list of words that might follow, together with probabilities:

And the remarkable thing is that when ChatGPT does something like write an - photo 3

And the remarkable thing is that when ChatGPT does something like write an essay what its essentially doing is just asking over and over again given the text so far, what should the next word be?and each time adding a word. (More precisely, as Ill explain, its adding a token, which could be just a part of a word, which is why it can sometimes make up new words.)

But, OK, at each step it gets a list of words with probabilities. But which one should it actually pick to add to the essay (or whatever) that its writing? One might think it should be the highest-ranked word (i.e. the one to which the highest probability was assigned). But this is where a bit of voodoo begins to creep in. Because for some reasonthat maybe one day well have a scientific-style understanding ofif we always pick the highest-ranked word, well typically get a very flat essay, that never seems to show any creativity (and even sometimes repeats word for word). But if sometimes (at random) we pick lower-ranked words, we get a more interesting essay.

The fact that theres randomness here means that if we use the same prompt multiple times, were likely to get different essays each time. And, in keeping with the idea of voodoo, theres a particular so-called temperature parameter that determines how often lower-ranked words will be used, and for essay generation, it turns out that a temperature of 0.8 seems best. (Its worth emphasizing that theres no theory being used here; its just a matter of whats been found to work in practice. And for example the concept of temperature is there because exponential distributions familiar from statistical physics happen to be being used, but theres no physical connectionat least so far as we know.)

Before we go on I should explain that for purposes of exposition Im mostly not going to use the full system thats in ChatGPT ; instead Ill usually work with a simpler GPT-2 system , which has the nice feature that its small enough to be able to run on a standard desktop computer. And so for essentially everything I show Ill be able to include explicit Wolfram Language code that you can immediately run on your computer. (Click any picture here to copy the code behind it.)

For example, heres how to get the table of probabilities above. First, we have to retrieve the underlying language model neural net :

Later on well look inside this neural net and talk about how it works But - photo 4

Later on, well look inside this neural net, and talk about how it works. But for now we can just apply this net model as a black box to our text so far, and ask for the top 5 words by probability that the model says should follow:

This takes that result and makes it into an explicit formatted dataset - photo 5

This takes that result and makes it into an explicit formatted dataset :

Heres what happens if one repeatedly applies the modelat each step adding the - photo 6
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «What Is ChatGPT Doing ... and Why Does It Work?»

Look at similar books to What Is ChatGPT Doing ... and Why Does It Work?. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «What Is ChatGPT Doing ... and Why Does It Work?»

Discussion, reviews of the book What Is ChatGPT Doing ... and Why Does It Work? and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.