swyxio/ai-notes
notes for software engineers getting up to speed on new AI developments. Serves as datastore for https://latent.space writing, and product brainstorming
About swyxio/ai-notes
swyxio/ai-notes is an open-source project on GitHub, mainly written in HTML. notes for software engineers getting up to speed on new AI developments. Serves as datastore for https://latent.space writing, and product brainstorming It currently holds 6,253 stars and 560 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).
Project Overview
AI Homed tracks it on the AI Prompt Engineering board.
GitHub Repository Details
README
AI Notes
notes on AI state of the art, with a focus on generative and large language models. These are the "raw materials" for the https://lspace.swyx.io/ newsletter.
This repo used to be called https://github.com/sw-yx/prompt-eng, but was renamed because Prompt Engineering is Overhyped. This is now an AI Engineering notes repo.
This Readme is just the high level overview of the space; you should see the most updates in the OTHER markdown files in this repo:
TEXT.md- text generation, mostly with GPT-4TEXT_CHAT.md- information on ChatGPT and competitors, as well as derivative productsTEXT_SEARCH.md- information on GPT-4 enabled semantic search and other infoTEXT_PROMPTS.md- a small swipe file of good GPT3 promptsINFRA.md- raw notes on AI Infrastructure, Hardware and ScalingAUDIO.md- tracking audio/music/voice transcription + generationCODE.md- codegen models, like CopilotIMAGE_GEN.md- the most developed file, with the heaviest emphasis notes on Stable Diffusion, and some on midjourney and dalle.IMAGE_PROMPTS.md- a small swipe file of good image prompts- Resources: standing, cleaned up resources that are meant to be permalinked to
- stub notes - very small/lightweight proto pages of future coverage areas
AGENTS.md- tracking "agentic AI"- blog ideas- potential blog post ideas derived from these notes bc
Table of Contents
Motivational Use Cases
- images
- https://mpost.io/best-100-stable-diffusion-prompts-the-most-beautiful-ai-text-to-image-prompts
- 3D MRI synthetic brain images - positive reception from neuroimaging statistician
- multiplayer stable diffusion
- video
- img2img of famous movie scenes (lalaland)
- img2img transforming actor with ebsynth + koe_recast
- how ebsynth works https://twitter.com/TomLikesRobots/status/1612047103806545923?s=20
- virtual fashion (karenxcheng)
- seamless tiling images
- evolution of scenes (xander)
- outpainting https://twitter.com/orbamsterdam/status/1568200010747068417?s=21&t=rliacnWOIjJMiS37s8qCCw
- webUI img2img collaboration https://twitter.com/_akhaliq/status/1563582621757898752
- image to video with rotation https://twitter.com/TomLikesRobots/status/1571096804539912192
- "prompt paint" https://twitter.com/1littlecoder/status/1572573152974372864
- audio2video animation of your face https://twitter.com/siavashg/status/1597588865665363969
- physical toys to 3d model + animation https://twitter.com/sergeyglkn/status/1587430510988611584
- music videos
- video killed the radio star, colab This uses OpenAI's Whisper speech-to-text, allowing you to take a YouTube video & create a Stable Diffusion animation prompted by the lyrics in the YouTube video
- Stable Diffusion Videos generates videos by interpolating between prompts and audio
- direct text2video project
- https://twitter.com/_akhaliq/status/1575546841533497344
- https://makeavideo.studio/ - explorer https://webvid.datasette.io/webvid/videos
- https://phenaki.video/
- https://github.com/THUDM/CogVideo
- https://imagen.research.google/video/
- text-to-3d https://twitter.com/_akhaliq/status/1575541930905243652
- https://dreamfusion3d.github.io/
- open source impl: https://github.com/ashawkey/stable-dreamfusion
- demo https://twitter.com/_akhaliq/status/1578035919403503616
- text products
- has a list of usecases at the end https://huyenchip.com/2023/04/11/llm-engineering.html
- Jasper
- GPT for Obsidian https://reasonabledeviations.com/2023/02/05/gpt-for-second-brain/
- gpt3 email https://github.com/sw-yx/gpt3-email and email clustering
- gpt3() in google sheet 2020, 2022 - sheet google sheets https://twitter.com/mehran__jalali/status/1608159307513618433
- https://gpt3demo.com/apps/google-sheets
- Charm https://twitter.com/shubroski/status/1620139262925754368?s=20
- https://www.summari.com/ Summari helps busy people read more
- market maps/landscapes
- elad gil 2024 stack chart
- sequoia market map jan 2023, july 2023, sep 2023
- base10 market map https://twitter.com/letsenhance_io/status/1594826383305449491
- matt shumer market map https://twitter.com/mattshumer_/status/1620465468229451776 https://docs.google.com/document/d/1sewTBzRF087F6hFXiyeOIsGC1N4N3O7rYzijVexCgoQ/edit
- nfx https://www.nfx.com/post/generative-ai-tech-5-layers?ref=context-by-cohere
- a16z https://a16z.com/2023/01/19/who-owns-the-generative-ai-platform/
- https://a16z.com/2023/06/20/emerging-architectures-for-llm-applications/
- https://a16z.com/100-gen-ai-apps
- madrona https://www.madrona.com/foundation-models/
- coatue
- https://www.coatue.com/blog/perspective/ai-the-coming-revolution-2023
- https://x.com/Sam_Awrabi/status/1742324900034150646?s=20
- game assets -
- emad thread https://twitter.com/EMostaque/status/1591436813750906882
- scenario.gg https://twitter.com/emmanuel_2m/status/1593356241283125251
- 3d game character modeling example
- MarioGPT https://arxiv.org/pdf/2302.05981.pdf https://www.slashgear.com/1199870/mariogpt-uses-ai-to-generate-endless-super-mario-levels-for-free/ https://github.com/shyamsn97/mario-gpt/blob/main/mario_gpt/level.py
- https://news.ycombinator.com/item?id=36295227
Top AI Reads
The more advanced GPT3 reads have been split out to https://github.com/sw-yx/ai-notes/blob/main/TEXT.md
- https://www.gwern.net/GPT-3#prompts-as-programming
- https://learnprompting.org/
Beginner Reads
- Karpathy 2025 Intro to LLMs (summary)
- Bill Gates on AI (tweet)
- "The development of AI is as fundamental as the creation of the microprocessor, the personal computer, the Internet, and the mobile phone. It will change the way people work, learn, travel, get health care, and communicate with each other."
- Steve Yegge on AI for developers
- Karpathy 2023 intro to LLMs (notes from Sarah Chieng)
- Prompt Engineering guide from OpenAI at NeurIPS via Sarah Chieng
- Why this AI moment might be the real deal
- Sam Altman - Moore's Law for Everything
- excellent introduction to foundation models from MSR https://youtu.be/HQI6O5DlyFc
- openAI prompt tutorial https://beta.openai.com/docs/quickstart/add-some-examples
- google LAMDA intro https://aitestkitchen.withgoogle.com/how-lamda-works
- karpathy gradient descent course
- FT visual storytelling on "how transformers work"
- DALLE2 prompt writing book http://dallery.gallery/wp-content/uploads/2022/07/The-DALL%C2%B7E-2-prompt-book-v1.02.pdf
- https://medium.com/nerd-for-tech/prompt-engineering-the-career-of-future-2fb93f90f117
- How to use AI to do stuff across getting information, working with data, and making images
- https://ourworldindata.org/brief-history-of-ai ai progress overview with nice charts
- Jon Stokes' AI Content Generation, Part 1: Machine Learning Basics
- Andrew Ng - Opportunities in AI
- What are transformer models and how do they work? - maybe a bit too high level
- text generation
- humanloop's prompt engineering 101
- Stephen Wolfram's explanations https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
- equivalent from jon stokes jonstokes.com/p/the-chat-stack-gpt-4-and-the-near
- https://andymatuschak.org/prompts/
- cohere's LLM university https://docs.cohere.com/docs/llmu
- Jay alammar's guide to all the things: https://llm.university/
- https://www.jonstokes.com/p/chatgpt-explained-a-guide-for-normies for normies
- image generation
- https://wiki.installgentoo.com/wiki/Stable_Diffusion overview
- https://www.reddit.com/r/StableDiffusion/comments/x41n87/how_to_get_images_that_dont_suck_a/
- https://mpost.io/best-100-stable-diffusion-prompts-the-most-beautiful-ai-text-to-image-prompts/
- https://www.kdnuggets.com/2021/03/beginners-guide-clip-model.html
- https://www.seangoedecke.com/diffusion-models-explained/
- for nontechnical
- https://www.jonstokes.com/p/ai-content-generation-part-1-machine
- https://www.protocol.com/generative-ai-startup-landscape-map
- https://twitter.com/saranormous/status/1572791179636518913
Intermediate Reads
- State of AI Report: 2018, 2019, 2020, 2021, 2022
- reverse chronological major events https://bleedingedge.ai/
- What we Know about LLMs - great recap of research
- Karpathy's 1hr guide to LLMs - summary from Sarah Chieng
- 1. What is a large language model (LLM)?
- There are two main components of an LLM
- What does an LLM do?
- Stage 1: Model Pre-Training
- Stage 2: Model Fine-tuning
- Stage 2b: [Optional] Additional Fine-tuning
- Stage 3: Model Inference
- Stage 4: [Optional] Supercharging LLMs with Customization
- How to improve LLM performance?
- LLM Scaling Laws
- Self-Improvement
- How to improve LLM abilities?
- Multimodality
- System 1 + 2 Thinking
- Jailbreaking
- Prompt Injecting
- Data Poisoning & Backdoor Attacks
- Evan Morikawa guide to LLM math especially the 5 scaling challenges piece
- A Hacker's Guide to Language Models (youtube) Jeremy Howard's 90min complete overview of LLM learnings - starting at the basics: the 3-step pre-training / fine-tuning / classifier ULMFiT approach used in all modern LLMs.
- https://spreadsheets-are-all-you-need.ai
- "Catching up on the weird world of LLMs" - Simon Willison's 40min overview + Open Questions for AI Engineers
- LLMs overview from Flyte
- Clementine Fourrier on How Evals are Done
- VLMs Zero to Hero (tweet)
- Patterns for building LLM-based systems and products - great recap
- Evals: To measure performance
- RAG: To add recent, external knowledge
- Fine-tuning: To get better at specific tasks
- Caching: To reduce latency & cost
- Guardrails: To ensure output quality
- Defensive UX: To anticipate & manage errors gracefully
- Collect user feedback: To build our data flywheel
- [Vector Databases: A Technical Primer [pdf]](https://tge-data-web.nyc3.digitaloceanspaces.com/docs/Vector%20Databases%20-%20A%20Technical%20Primer.pdf) very nice slides on Vector DBs
- Missing coverage of hybrid search (vector + lexical). Further discussions
- Visual introduction to ML
- A16z AI Canon https://a16z.com/2023/05/25/ai-canon/
- Software 2.0: Andrej Karpathy was one of the first to clearly explain (in 2017!) why the new AI wave really matters. His argument is that AI is a new and powerful way to program computers. As LLMs have improved rapidly, this thesis has proven prescient, and it gives a good mental model for how the AI market may progress.
- State of GPT: Also from Karpathy, this is a very approachable explanation of how ChatGPT / GPT models in general work, how to use them, and what directions R&D may take.
- What is ChatGPT doing … and why does it work?: Computer scientist and entrepreneur Stephen Wolfram gives a long but highly readable explanation, from first principles, of how modern AI models work. He follows the timeline from early neural nets to today’s LLMs and ChatGPT.
- Transformers, explained: This post by Dale Markowitz is a shorter, more direct answer to the question “what is an LLM, and how does it work?” This is a great way to ease into the topic and develop intuition for the technology. It was written about GPT-3 but still applies to newer models.
- How Stable Diffusion works: This is the computer vision analogue to the last post. Chris McCormick gives a layperson’s explanation of how Stable Diffusion works and develops intuition around text-to-image models generally. For an even _gentler_ introduction, check out this comic from r/StableDiffusion.
- (2025) 3blue1brown on how diffusion works
- Explainers
- Deep learning in a nutshell: core concepts: This four-part series from Nvidia walks through the basics of deep learning as practiced in 2015, and is a good resource for anyone just learning about AI.
- Practical deep learning for coders: Comprehensive, free course on the fundamentals of AI, explained through practical examples and code.
- Word2vec explained: Easy introduction to embeddings and tokens, which are building blocks of LLMs (and all language models).
- https://news.ycombinator.com/item?id=44708028
- Yes you should understand backprop: More in-depth post on back-propagation if you want to understand the details. If you want even more, try the Stanford CS231n lecture (course here) on Youtube.
- Courses
- Stanford CS229: Introduction to Machine Learning with Andrew Ng, covering the fundamentals of machine learning.
- Stanford CS224N: NLP with Deep Learning with Chris Manning, covering NLP basics through the first generation of LLMs.
- https://github.com/mlabonne/llm-course
- https://cims.nyu.edu/~sbowman/eightthings.pdf
- 10 open challenges in LLM research https://huyenchip.com/2023/08/16/llm-research-open-challenges.html
- openai prompt eng cookbook https://github.com/openai/openai-cookbook/blob/main/techniques_to_improve_reliability.md
- on prompt eng overview https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/
- https://moultano.wordpress.com/2023/06/28/the-many-ways-that-digital-minds-can-know/ comparing search vs ai
- Recap of 2022's major AI developments https://www.deeplearning.ai/the-batch/issue-176/
- DALLE2 asset generation + inpainting https://twitter.com/aifunhouse/status/1576202480936886273?s=20&t=5EXa1uYDPVa2SjZM-SxhCQ
- suhail journey https://twitter.com/Suhail/status/1541276314485018625?s=20&t=X2MVKQKhDR28iz3VZEEO8w
- composable diffusion - "AND" instead of "and" https://twitter.com/TomLikesRobots/status/1580293860902985728
- on BPE tokenization https://towardsdatascience.com/byte-pair-encoding-subword-based-tokenization-algorithm-77828a70bee0 see also google sentencepiece and openai tiktoken
- see visualization here https://lucalp.dev/bitter-lesson-tokenization-and-blt/
- source in GPT2 source https://github.com/openai/gpt-2/blob/master/src/encoder.py
- note that BPEs are suboptimal https://www.lesswrong.com/posts/dFbfCLZA4pejckeKc/a-mechanistic-explanation-for-solidgoldmagikarp-like-tokens?commentId=9jNdKscwEWBB4GTCQ
- //---------------------------------------------------------------------------------------------------------------- is a single GPT-4 token
- GPT-3.5 crashes when it thinks about useRalativeImagePath too much
- causes math and string character issues https://news.ycombinator.com/item?id=35363769
- and cause issues with evals
- glitch tokens happen when tokenizer has different dataset than LLM
- karpathy talking about why tokenization is messy
- https://platform.openai.com/tokenizer and https://github.com/openai/tiktoken (more up to date: https://tiktokenizer.vercel.app/)
- Wordpiece -> BPE -> SentenceTransformer
- Preliminary reading on Embeddings
- https://youtu.be/QdDoFfkVkcw?si=qefZSDDSpxDNd313
- Huggingface MTEB Benchmark of a bunch of Embeddings
- notable issues with GPT3 Embeddings and alternatives to consider
- https://observablehq.com/@simonw/gpt-3-token-encoder-decoder
- karpathy wants tokenization to go away https://twitter.com/karpathy/status/1657949234535211009
- positional encoding not needed for decoder only https://twitter.com/a_kazemnejad/status/1664277559968927744?s=20
- creates its own language https://twitter.com/giannis_daras/status/1531693104821985280
- Google Cloud Generative AI Learning Path https://www.cloudskillsboost.google/paths/118
- img2img https://andys.page/posts/how-to-draw/
- on language modeling https://lena-voita.github.io/nlp_course/language_modeling.html and approachable but technical explanation of language generation including sampling from distributions and some mechanistic intepretability (finding neuron that tracks quote state)
- quest for photorealism https://www.reddit.com/r/StableDiffusion/comments/x9zmjd/quest_for_ultimate_photorealism_part_2_colors/
- https://medium.com/merzazine/prompt-design-for-dall-e-photorealism-emulating-reality-6f478df6f186
- settings tweaking https://www.reddit.com/r/StableDiffusion/comments/x3k79h/the_feeling_of_discovery_sd_is_like_a_great_proc/
- seed selection https://www.reddit.com/r/StableDiffusion/comments/x8szj9/tutorial_seed_selection_and_the_impact_on_your/
- minor parameter parameter difference study (steps, clamp_max, ETA, cutn_batches, etc) https://twitter.com/KyrickYoung/status/1500196286930292742
- Generative AI: Autocomplete for everything https://noahpinion.substack.com/p/generative-ai-autocomplete-for-e