Main Greg Channel!

Main Greg Channel!

By
Download on the App Store

Main Greg Channel! episodes

  • Attention in transformers, step-by-step | DL6

    Demystifying attention, the key mechanism inside transformers and LLMs.

    Instead of sponsored ad reads, these lessons are funded directly by viewers: https://3b1b.co/support
    Special thanks to these supporters: https://www.3blue1brown.com/lessons/attention#thanks
    An equally valuable form of support is to simply share the videos.

    Demystifying self-attention, multiple heads, and cross-attention.

    Instead of sponsored ad reads, these lessons are funded directly by viewers: https://3b1b.co/support

    The first pass for the translated subtitles here is machine-generated, and therefore notably imperfect. To contribute edits or fixes, visit https://www.criblate.com

    Звуковая дорожка на русском языке: Влад Бурмистров.

    And yes, at 22:00 (and elsewhere), "breaks" is a typo.

    Here are a few other relevant resources

    Build a GPT from scratch, by Andrej Karpathy

    https://youtu.be/kCc8FmEb1nY

    If you want a conceptual understanding of language models from the ground up, @vcubingx just started a short series of videos on the topic:

    https://youtu.be/1il-s4mgNdI?si=XaVxj6bsdy3VkgEX

    If you're interested in the herculean task of interpreting what these large networks might actually be doing, the Transformer Circuits posts by Anthropic are great. In particular, it was only after reading one of these that I started thinking of the combination of the value and output matrices as being a combined low-rank map from the embedding space to itself, which, at least in my mind, made things much clearer than other sources.

    https://transformer-circuits.pub/2021/framework/index.html

    Site with exercises related to ML programming and GPTs

    https://www.gptandchill.ai/codingproblems

    History of language models by Brit Cruise,  @ArtOfTheProblem 

    https://youtu.be/OFS90-FX6pg

    An early paper on how directions in embedding spaces have meaning:

    https://arxiv.org/pdf/1301.3781.pdf

    Timestamps:

    0:00 - Recap on embeddings
    1:39 - Motivating examples
    4:29 - The attention pattern
    11:08 - Masking
    12:42 - Context size
    13:10 - Values
    15:44 - Counting parameters
    18:21 - Cross-attention
    19:19 - Multiple heads
    22:16 - The output matrix
    23:19 - Going deeper
    24:54 - Ending

    These animations are largely made using a custom Python library, manim. See the FAQ comments here:

    https://3b1b.co/faq#manim
    https://github.com/3b1b/manim
    https://github.com/ManimCommunity/manim/

    All code for specific videos is visible here:

    https://github.com/3b1b/videos/

    The music is by Vincent Rubinetti.

    https://www.vincentrubinetti.com
    https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
    https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u

    3blue1brown is a channel about animating math, in all senses of the word animate. If you're reading the bottom of a video description, I'm guessing you're more interested than the average viewer in lessons here. It would mean a lot to me if you chose to stay up to date on new ones, either by subscribing here on YouTube or otherwise following on whichever platform below you check most regularly.

    Mailing list: https://3blue1brown.substack.com

    Twitter: https://twitter.com/3blue1brown
    Instagram: https://www.instagram.com/3blue1brown
    Reddit: https://www.reddit.com/r/3blue1brown
    Facebook: https://www.facebook.com/3blue1brown
    Patreon: https://patreon.com/3blue1brown
    Website: https://www.3blue1brown.com

    0 min
  • How might LLMs store facts | DL7

    Unpacking the multilayer perceptrons in a transformer, and how they may store facts

    Instead of sponsored ad reads, these lessons are funded directly by viewers: https://3b1b.co/support
    An equally valuable form of support is to share the videos.

    AI Alignment forum post from the Deepmind researchers referenced at the video's start:

    https://www.alignmentforum.org/posts/iGuwZTHWb6DFY3sKB/fact-finding-attempting-to-reverse-engineer-factual-recall

    Anthropic posts about superposition referenced near the end:

    https://transformer-circuits.pub/2022/toy_model/index.html
    https://transformer-circuits.pub/2023/monosemantic-features

    Some added resources for those interested in learning more about mechanistic interpretability, offered by Neel Nanda

    Mechanistic interpretability paper reading list

    https://www.alignmentforum.org/posts/NfFST5Mio7BCAQHPA/an-extremely-opinionated-annotated-list-of-my-favourite

    Getting started in mechanistic interpretability

    https://www.neelnanda.io/mechanistic-interpretability/getting-started

    An interactive demo of sparse autoencoders (made by Neuronpedia)

    https://www.neuronpedia.org/gemma-scope#main

    Coding tutorials for mechanistic interpretability (made by ARENA)

    https://arena3-chapter1-transformer-interp.streamlit.app/

    Звуковая дорожка на русском языке: Влад Бурмистров.

    Sections:

    0:00 - Where facts in LLMs live
    2:15 - Quick refresher on transformers
    4:39 - Assumptions for our toy example
    6:07 - Inside a multilayer perceptron
    15:38 - Counting parameters
    17:04 - Superposition
    21:37 - Up next

    These animations are largely made using a custom Python library, manim. See the FAQ comments here:

    https://3b1b.co/faq#manim
    https://github.com/3b1b/manim
    https://github.com/ManimCommunity/manim/

    All code for specific videos is visible here:

    https://github.com/3b1b/videos/

    The music is by Vincent Rubinetti.

    https://www.vincentrubinetti.com
    https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
    https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u

    3blue1brown is a channel about animating math, in all senses of the word animate. If you're reading the bottom of a video description, I'm guessing you're more interested than the average viewer in lessons here. It would mean a lot to me if you chose to stay up to date on new ones, either by subscribing here on YouTube or otherwise following on whichever platform below you check most regularly.

    Mailing list: https://3blue1brown.substack.com

    Twitter: https://twitter.com/3blue1brown
    Instagram: https://www.instagram.com/3blue1brown
    Reddit: https://www.reddit.com/r/3blue1brown
    Facebook: https://www.facebook.com/3blue1brown
    Patreon: https://patreon.com/3blue1brown
    Website: https://www.3blue1brown.com

    0 min
  • How I use LLMs

    The example-driven, practical walkthrough of Large Language Models and their growing list of related features, as a new entry to my general audience series on LLMs. In this more practical followup, I take you through the many ways I use LLMs in my own life.

    Chapters

    00:00:00 Intro into the growing LLM ecosystem
    00:02:54 ChatGPT interaction under the hood
    00:13:12 Basic LLM interactions examples
    00:18:03 Be aware of the model you're using, pricing tiers
    00:22:54 Thinking models and when to use them
    00:31:00 Tool use: internet search
    00:42:04 Tool use: deep research
    00:50:57 File uploads, adding documents to context
    00:59:00 Tool use: python interpreter, messiness of the ecosystem
    01:04:35 ChatGPT Advanced Data Analysis, figures, plots
    01:09:00 Claude Artifacts, apps, diagrams
    01:14:02 Cursor: Composer, writing code
    01:22:28 Audio (Speech) Input/Output
    01:27:37 Advanced Voice Mode aka true audio inside the model
    01:37:09 NotebookLM, podcast generation
    01:40:20 Image input, OCR
    01:47:02 Image output, DALL-E, Ideogram, etc.
    01:49:14 Video input, point and talk on app
    01:52:23 Video output, Sora, Veo 2, etc etc.
    01:53:29 ChatGPT memory, custom instructions
    01:58:38 Custom GPTs
    02:06:30 Summary

    Links

    • Tiktokenizer https://tiktokenizer.vercel.app/

    • OpenAI's ChatGPT https://chatgpt.com/

    • Anthropic's Claude https://claude.ai/

    • Google's Gemini https://gemini.google.com/

    • xAI's Grok https://grok.com/

    • Perplexity https://www.perplexity.ai/

    • Google's NotebookLM https://notebooklm.google.com/

    • Cursor https://www.cursor.com/

    • Histories of Mysteries AI podcast on Spotify https://open.spotify.com/show/3K4LRyMCP44kBbiOziwJjb

    • The visualization UI I was using in the video: https://excalidraw.com/

    • The specific file of Excalidraw we built up: https://drive.google.com/file/d/1DN3LU3MbKI00udxoS-W5ckCHq99V0Uqs/view?usp=sharing

    • Discord channel for Eureka Labs and this video: https://discord.gg/3zy8kqD9Cp

      Educational Use Licensing

      This video is freely available for educational and internal training purposes. Educators, students, schools, universities, nonprofit institutions, businesses, and individual learners may use this content freely for lessons, courses, internal training, and learning activities, provided they do not engage in commercial resale, redistribution, external commercial use, or modify content to misrepresent its intent.

      0 min
    • Text CRDTs from scratch, in code!

      Want to know how google docs would work, if it was decentralised and therefore better? Lets make one!

      In this video I implement a text CRDT (That is, a conflict-free replicating data type) for collaborative text editing, from scratch. And I explain how it all works along the way.

      Which CRDT? FugueMax! Which is the gold standard for text editing. And instead of doing it the tree way, like in the paper, I show how to implement it as a list - which is essential if you want to optimise the algorithm.

      Here's the code I wrote on camera: https://github.com/josephg/crdt-from-scratch

      The FugueMax paper is here: https://arxiv.org/abs/2305.00583

      And here's the blog post talking about how to make this algorithm go really fast: https://josephg.com/blog/crdts-go-brrr/

      00:00:00 Intro

      00:05:01 How do CRDTs work?
      00:13:12 Project setup
      00:19:11 Add items
      00:34:04 Understanding integrate
      00:40:41 Testing
      00:45:05 Document versions
      00:50:57 Merging documents
      00:59:16 Testing
      01:02:56 Deletion
      01:10:22 Moer tests
      01:12:47 Editor
      01:21:58 It works!
      01:25:36 recap & end

      0 min
    • Functional Parsing - Computerphile

      Functional or Combinator Parsing explained by Professor Graham Hutton.

      Professor Hutton's Functional Parsing Library: http://bit.ly/C_FunctParsLib

      https://www.facebook.com/computerphile

      https://twitter.com/computer_phile

      This video was filmed and edited by Sean Riley.

      Computer Science at the University of Nottingham: https://bit.ly/nottscomputer

      Computerphile is a sister project to Brady Haran's Numberphile. More at http://www.bradyharan.com

      0 min
    • Das Modul - 1100101 (Official Audio)

      Listen all Songs of the Album “Musik Mit Hertz” here: https://youtube.com/playlist?list=PLd657Dme_2QYh0VyRW7ZfE-MkSlenVYdP&si=jQwCxHGAfJjJ0hMu

      Artwork [Graphix]: I-D Büro
      Composed By, Arranged By, Producer: Felix J. Gauder*, Olaf Roberto Bossi
      Photography By: Philipp Honstetter
      Written-By: Felix J. Gauder*, Olaf Roberto Bossi
      Label: Urban
      Vocals: Yasemin Baysal, Felix J. Gauder, Olaf Roberto Bossi
      Year: 1995
      Genre: Electronic
      Style: Happy Hardcore, Euro House, Ambient

      LYRICS:

      Eins-eins-null-null-eins-null-eins
      Heißt ich liebe dich, ich möchte bei dir sein
      Die ganze Zeit, für immer zu zweit
      Komm lass uns wie Binäre sein
      Eins-eins-null-null-eins-null-eins
      Die Binäre können niemals einsam sein
      Das ist der Code zum Liebes-Mode
      Komm programmier mich, ich bin dein

      We do not make money from these videos, all income and rights go to the respective artist or label.

      6 min
    • how to place your desk in Feng Shui?

      a simple question with a very complicated answer, there is no satisfying single answer at the end of this video, but I hope it will help you understand the complexities behind how best to position yourself for one of the most important activities you'll be doing during your day, your work. by getting this right, you will improve your concentration and performance. while no two rooms are alike, try your best and take a moment to look around you, feel the energy and environment around, and be sure you're sat in the best possible spot in your office!

      7 min
    • Mindfulness of Body Guided Meditation

      This episode of our Weekly Guided Meditation podcast is a practice in mindfulness of the body. Rooted in the First Foundation of Mindfulness, this is a practice that helps us build awareness, understanding, and clarity of the body as we see it in the present moment.

      The period of meditation begins with a few minutes of breath awareness. Mindfulness of the breath is one aspect of mindfulness of the body, and a great place to start. The breath is always with us, always changing, and serves as a powerful object of awareness.

      We then open the attention up quite a bit, tuning into other physical sensations in the body. We rest in a relaxing open awareness of the body practice, noticing what is arising and passing in the body. Without judgement, we simply observe the sensations in the body.

      Mindfulness of the body is the first of the Four Establishments of Mindfulness, and a foundational Buddhist meditation practice. We can build insight into the nature of our experience, namely the Three Marks of Existence. It also can be a calming and relaxing practice that helps us change our relationships with our bodies.

      You can always visit us on Instagram at https://instagram.com/oneminddharma or email us at [email protected] with any questions. We also have a Facebook group at https://web.facebook.com/groups/TESWmeditation/.

      For some more reading and resources on mindfulness of the physical body, you can read these articles and try these meditations:

      https://oneminddharma.com/mindful-body/
      https://oneminddharma.com/metta-for-the-body-2/
      https://oneminddharma.com/breathing-with-the-body-3/
      https://oneminddharma.com/four-foundations-mindfulness/
      https://oneminddharma.com/kindness/
      https://oneminddharma.com/breath-body-mindfulness/
      https://oneminddharma.com/calming-body-meditation-kindness-compassion/
      https://oneminddharma.com/body-scan-meditation/

      To support this podcast, visit https://oneminddharma.com/donate/

      25 min
    • Meditation: Kind Mindfulness

      Today I offer a guided meditation on bringing the qualities of loving-kindness and gentleness to your mindfulness practice. This practice accompanies the dharma talk "Talk: Self-Compassion & Mindfulness."

      For full show notes, links, and contact information, visit https://OneMindDharma.com/.

      For individual mindfulness counseling sessions, please visit https://themindfulcounselor.me

      15 min

    About Main Greg Channel!

    From the publisher's feed

    Unsorted stuff