首页›Jay Alammar›文章

The Illustrated Retrieval Transformer

2022年1月3日

AI 摘要 AI 生成,可能有误

The article explains DeepMind's RETRO (Retrieval-Enhanced Transformer), a language model that performs on par with GPT-3 despite being only 4% of its size (7.5 billion vs. 185 billion parameters) by augmenting its input with information retrieved from a database containing 2 trillion tokens. The model uses BERT sentence embeddings to look up nearest neighbors in a key-value database and incorporates the retrieved text through an encoder-decoder architecture that employs chunked cross-attention in special RETRO decoder blocks. This approach demonstrates that continuously scaling up model size is not the only way to improve performance, since separating factual world knowledge from language processing allows for smaller, cheaper, and faster models.

Discussion: Discussion Thread for comments, corrections, or any feedback.
Translations: Korean, Russian

Summary: The latest batch of language models can be much smaller yet achieve GPT-3 like performance by being able to query a database or search the web for information. A key indication is that building larger and larger models is not the only way to improve performance.

Video

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Jay Alammar

Moving To Substack

I’m freezing this blog and starting to post on my Substack instead. The authoring experience is much more convenient for me there. Please follow me there, and check out The Illustrated DeepSeek R-1 if you haven’t yet. And check out our How

Generative AI and AI Product Moats

Here are eight observations I’ve shared recently on the Cohere blog and videos that go over them.: Article: What’s the big deal with Generative AI? Is it the future or the present? Article: AI is Eating The World

Remaking Old Computer Graphics With AI Image Generation

AI 摘要The author recounts using AI image generation tools—Stable Diffusion (via Dream Studio), Midjourney, and DALL-E—to recreate the intro cinematic of the 1987 MSX video game Nemesis 2 in higher-resolution graphics. He describes the prompting process and the challenges encountered, such as reproducing specific poses, consistent characters, and readable text, which he addressed through prompt engineering, in-painting, outpainting, and manual Photoshop edits. He concludes with a comparison of the three services, praising Dream Studio's workflow and API, Midjourney's superior image quality, and DALL-E's outpainting capabilities.

The Illustrated Stable Diffusion

AI 摘要This article provides an illustrated, accessible explanation of how Stable Diffusion works, breaking down its three main components: a CLIP text encoder that converts prompts into token embeddings, a UNet + scheduler that gradually denoises information in latent space, and an autoencoder decoder that produces the final pixel image. It explains how diffusion models are trained to predict and remove noise, and how text conditioning allows users to control what images are generated. The article also highlights the speed benefit of running diffusion on compressed latent representations rather than raw pixels, and notes that larger language models improve generated image quality.

Applying massive language models in the real world with Cohere

A little less than a year ago, I joined the awesome Cohere team. The company trains massive language models (both GPT-like and BERT-like) and offers them as an API (which also supports finetuning). Its founders include Google Brain alums in