Dev scratchpad. Digital garden

Great Resources for Learning Generative AI and Large Language Models (LLMs)

Apr 15, 2024 | Reading Time: 4 min

In this post, we will explore several excellent resources for understanding LLMs. My focus is primarily text and code inference, but most of the things should be generic enough for everyone. The post is structured as a step-by-step learning journey. This is intended to be a regularly updated list.

101 - Basic introductions

a) Andrej Karpathy’s - Intro to Large Language Models

  • This video provides a general and high-level introduction to LLMs, covering topics such as inference, scaling, fine-tuning, security concerns, and prompt injection.

b) Nvidia’s Generative AI explained

  • Note: This course would require you to login to nvidia first and then details are visible.
  • This video gives a very high level overview of GenAI, its usage, applications that companies are targeting, etc.

102 - Courses that cover basic usage

a) Microsoft’s Generative AI for Beginners

  • I personally have found this to be a excellent course that touches LLMs, prompting, RAG, Agents, multi modals etc.

b) Google’s Cloud Skills Boost

  • Havent gone through this personally, but content looks ok.

103 - Prompt engineering

Note that prompt engineering techniques may seem generic, but in practice every family of models generally have specific things that work for them. If you change models, the prompts may need to be adjusted for better results. (E.g Claude 2.x worked great with XML tags for constraints or 1 shot examples, GPT4 worked better with JSON)

a) Microsoft’s Introduction to prompt engineering

b) OpenAI’s Prompt engineering guide

c) Anthropic Claude’s Prompt engineering guide

d) Dedicated Prompt Engineering Guide

201 - LLMs

a) Andrej Karpathy’s State of GPT

  • Covers things like tokenization to pre-training, supervised fine-tuning, and Reinforcement Learning from Human Feedback (RLHF). Also, practical techniques and mental models for the effective use of these models, including prompting strategies, fine-tuning, etc are covered.

b) Visual Introduction: LLMs by Bycroft

  • Excellent visualizations and explanations of LLMs using nanoGPT, GPT2, GPT3
  • Understanding the visualizations is slightly involved, most probably a 301 rather than 201, but glancing through also can help to some extent.

301 - Deep Dive into Gen AI / Machine Learning

a) Andrew Ng’s Machine Learning Introduction

  • The definitive course to dive into ML. Updated for covering GenAI too. (94 hrs)

b)’s Course

c) Andrej Karpathy’s Zero to Hero

  • This is a youtube series that will build a GPT from scratch.

d) 3Blue1Browns Season 3 - Neural networks

  • Ideal course will be to take from season 1 to 4 to understand things end to end.

e) Google’s Cloud Skills Boost for Advanced Devs

  • I am skeptical about this learning path, but some folks have found this useful.

401 - Miscellaneous

a) Stanford AI Courses

b) Nvidias deep learning institute

  • The institute has some interesting learning paths that are self paced.
  • Free as well as paid content present.

c) Tools and more extensive resources list at awesome-generative-ai

Journey recommendation and conclusion

It is important to tailor the learning journey based on personal interests and goals. If you are interested in consumption of LLM’s, having a basic understanding of concepts in 10x and 20x should be enough.

For folks interested specifically in text or code generation, I would recommend understanding below order of key areas:

  1. Text Completion/Inference
  2. Prompt Engineering
  3. Tools/Function Calling
  4. RAG (Retrieve, Augment, Generate)
  5. Agents
  6. Fine Tuning

Thinking of a use-case of interest and starting with coding it as early as possible along with above material gives best results in this authors experience.

If possible, avoid libraries (For Python, LLamaIndex and Langchain are the most popular ones as of now), when learning and try to write your own code. Calling APIs in python or any other language is generally very straight forward (chat gpt with gpt-3.5 should be able to give that code very easily).

Libraries add a layer of abstraction that creates more impedance, than help during learning phase. I myself was able to pickup typescript, react, etc very easily using GPT’s and its APIs. One early experience is documented in this post . The open source FlexiGPT vscode plugin is an outcome of my personal AI journey.

Happy learning !!!