Exploring Transformer Models for Text Mining and Beyond

undefined
 
Foundation Models
Including Text Mining, Part Two
 
Week 7 Video 2
 
Setting the stage
 
What do you even call them?
 
Transformer Models
Foundation Models
Large Language Models
But what about non-language models?
 
Transformer/Foundation Models
 
Some examples
 
BERT, MathBERT, GPT-2, GPT-3, DALL-E 2,
StableDiffusion, Github Copilot, …, …
 
Transformer/Foundation Models
 
Can predict
Words
Sentences
Pixels
Computer program text
Mathematical equations
Anything?
 
Transformer/Foundation Models
 
Can predict
Words
Sentences
Pixels
Computer program text
Mathematical equations
Anything?
 
And, in a sudden light-switch transformation,
prediction becomes generation
 
ChatGPT
(prompt originally from Kelsey Piper)
 
AI Dungeon (GPT-2)
 
You are a friendly blanket. You live in a nice warm house with some nice humans. You
like cuddling and keeping people warm. But you don’t want to be a "blanket baby"
anymore, so you have decided that it is time for you to leave this place.
> You look for a job as a blanket.
You find a job searching for blankets in the classifieds. You start reading the ads.
Most of them are for low paying menial jobs, but you find three that look interesting.
> You read the best ad.
You find the best job listed: WANTED: One blanket for sleeping on the cold ground
during the night. Must be able to fold yourself into one-third of the blanket's volume.
> You call the job ad.
A: The number you have called goes through to the "Blanket Museum“ where a
robotic voice informs you that the number you have called is not in their phone book.
 
AI Dungeon (GPT-2)
 
> You go inside museum.
You walk into the museum and see a robotic voice greet you. "Hello,
and welcome to the Blanket Museum!" it says.
> You say "I want a job" A: You are asked some questions and then fitted for a
security uniform, just like in the movies. You are given a tour of the museum and the
exhibits.
> You put on security uniform.
> You fold yourself. You find that you can easily turn the security uniform into a small
blanket. You spend the rest of your life working at the museum. Every day you spend
your time looking after the exhibits and cleaning the building.
YOU HAVE DIED
 
DALL-E 2
 
"Teddy bears
working on new
AI research
underwater with
1990s
technology"
 
DALL-E 2
 
“Sticking thumb out to hitchhike”
 
Stable Diffusion
 
Open-source alternative to DALL-E 2 with several
variants
More powerful and easier to customize
Significantly harder to set up and keep running
 
Text and image generation: not quite
together yet (Randall Munro)
 
Large Language Models
 
Based on text embeddings
 
Represent text as feature vector
(example from Neelakantan et al., 2022)
 
 
 
(example from Neelakantan et al., 2022)
 
If you want to generate embedding for
your own use…
 
Universal Sentence Encoder (Cer et al., 2018)
 
If you want to just generate predicted
text
 
Including assessing text
 
GPT-3/ChatGPT is the current best option
 
Prediction becomes Generation…
 
 
And Machine Learning Becomes Prompt
Engineering
 
 
And Machine Learning Becomes Prompt
Engineering
 
Write a summary of how GPT works
Write a summary of how GPT works, for a 5
th
 grader,
written at a 5
th
 grade reading level
Write a summary of how GPT works, written for a PhD
in Machine Learning who has not read a research
paper since 2017.
Write a summary of how GPT works, written for a
highly-intelligent person who knows essentially nothing
about artificial intelligence.
Ryan Baker is an Ivy League professor of Machine
Learning. He is explaining to a general audience how
GPT works. He says, “
 
And Machine Learning Becomes Prompt
Engineering
 
 
Two types of prompts
 
Request prompts (ChatGPT)
Completion prompts (GPT3)
 
A sample of things you can ask for
 
How to write a Python program for a specific goal
A simple example sentence involving a specific
word in a different language
A translation of any language
Grammatical correction, simplification, clarity
improvements, grading level adjustments on a
paragraph of text
Summarization of a topic or article
Generate examples of text (synthetic data for
signal-boosting in text mining)
 
Refining Foundation Models
 
Zero-shot: Just ask model to do something
One-shot: Give one example, ask model to do the
same thing
Few-shot: Give several examples, ask model to do
the same thing
Fine-tuning: Re-train model with examples
 
The Elephant in the Room
 
Why not just replace this class with a class about
foundation models?
 
When they succeed, they succeed spectacularly
 
But…
They can’t do everything (actually, they don’t do most of
the things this class has covered)
When they fail, they fail spectacularly
Not all tools 
quite
 as good as these ones (Galactica and
Sydney)
 
Next lecture
 
Multimodal Learning Analytics
Slide Note
Embed
Share

Delve into the world of transformer models, from foundational concepts to practical applications like predicting words, sentences, and even generating complex content. Discover examples like BERT, GPT-2, and ChatGPT, showcasing how these models can handle diverse tasks beyond traditional language processing. Dive into the intriguing AI Dungeon scenario with GPT-2, highlighting the imaginative capabilities of these AI systems.

  • Transformer Models
  • Text Mining
  • Language Processing
  • AI Applications

Uploaded on Sep 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Week 7 Video 2 Foundation Models Including Text Mining, Part Two

  2. Setting the stage

  3. What do you even call them? Transformer Models Foundation Models Large Language Models But what about non-language models?

  4. Transformer/Foundation Models Some examples BERT, MathBERT, GPT-2, GPT-3, DALL-E 2, StableDiffusion, Github Copilot, ,

  5. Transformer/Foundation Models Can predict Words Sentences Pixels Computer program text Mathematical equations Anything?

  6. Transformer/Foundation Models Can predict Words Sentences Pixels Computer program text Mathematical equations Anything? And, in a sudden light-switch transformation, prediction becomes generation

  7. ChatGPT (prompt originally from Kelsey Piper)

  8. AI Dungeon (GPT-2) You are a friendly blanket. You live in a nice warm house with some nice humans. You like cuddling and keeping people warm. But you don t want to be a "blanket baby" anymore, so you have decided that it is time for you to leave this place. > You look for a job as a blanket. You find a job searching for blankets in the classifieds. You start reading the ads. Most of them are for low paying menial jobs, but you find three that look interesting. > You read the best ad. You find the best job listed: WANTED: One blanket for sleeping on the cold ground during the night. Must be able to fold yourself into one-third of the blanket's volume. > You call the job ad. A: The number you have called goes through to the "Blanket Museum where a robotic voice informs you that the number you have called is not in their phone book.

  9. AI Dungeon (GPT-2) > You go inside museum. You walk into the museum and see a robotic voice greet you. "Hello, and welcome to the Blanket Museum!" it says. > You say "I want a job" A: You are asked some questions and then fitted for a security uniform, just like in the movies. You are given a tour of the museum and the exhibits. > You put on security uniform. > You fold yourself. You find that you can easily turn the security uniform into a small blanket. You spend the rest of your life working at the museum. Every day you spend your time looking after the exhibits and cleaning the building. YOU HAVE DIED

  10. DALL-E 2 "Teddy bears working on new AI research underwater with 1990s technology"

  11. DALL-E 2 Sticking thumb out to hitchhike

  12. Stable Diffusion Open-source alternative to DALL-E 2 with several variants More powerful and easier to customize Significantly harder to set up and keep running

  13. Text and image generation: not quite together yet (Randall Munro)

  14. Large Language Models Based on text embeddings Represent text as feature vector (example from Neelakantan et al., 2022)

  15. (example from Neelakantan et al., 2022)

  16. If you want to generate embedding for your own use Universal Sentence Encoder (Cer et al., 2018)

  17. If you want to just generate predicted text Including assessing text GPT-3/ChatGPT is the current best option

  18. Prediction becomes Generation

  19. And Machine Learning Becomes Prompt Engineering

  20. And Machine Learning Becomes Prompt Engineering Write a summary of how GPT works Write a summary of how GPT works, for a 5th grader, written at a 5th grade reading level Write a summary of how GPT works, written for a PhD in Machine Learning who has not read a research paper since 2017. Write a summary of how GPT works, written for a highly-intelligent person who knows essentially nothing about artificial intelligence. Ryan Baker is an Ivy League professor of Machine Learning. He is explaining to a general audience how GPT works. He says,

  21. And Machine Learning Becomes Prompt Engineering

  22. Two types of prompts Request prompts (ChatGPT) Completion prompts (GPT3)

  23. A sample of things you can ask for How to write a Python program for a specific goal A simple example sentence involving a specific word in a different language A translation of any language Grammatical correction, simplification, clarity improvements, grading level adjustments on a paragraph of text Summarization of a topic or article Generate examples of text (synthetic data for signal-boosting in text mining)

  24. Refining Foundation Models Zero-shot: Just ask model to do something One-shot: Give one example, ask model to do the same thing Few-shot: Give several examples, ask model to do the same thing Fine-tuning: Re-train model with examples

  25. The Elephant in the Room Why not just replace this class with a class about foundation models? When they succeed, they succeed spectacularly But They can t do everything (actually, they don t do most of the things this class has covered) When they fail, they fail spectacularly Not all tools quite as good as these ones (Galactica and Sydney)

  26. Next lecture Multimodal Learning Analytics

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#