Distributed file systems
also quantization
How does this interact with the following points covered in the chapter on GPU and Flash Attention?
Prefill phase is memory bound and is one chip
attention can go to one chip; MLP will go to another chip
Come up with a new architecture where different parts of the Transformer such as attention, MLP, layer norm are placed on different chips and analyze the trade-offs in terms of performance and memory usage.
ReLU and how to speed it up
can quantize activations after ReLU
however more bang by quantizing matmul
train a bigger model and then quantize it?
📝 how many cycles for computing sin^ x + cos^x ?


Concept 🧩 🚀 backpropagation intuition

💡 in a world where memory is slower and compute is cheap/faster, you just recompute the activations!


Assessment Task: Scaling LLMs to 900 Million Users
To serve 900 million active users simultaneously on platforms like ChatGPT, Claude, or Sarvam, engineers must design an architecture capable of handling extreme, stateful concurrency. Global edge servers manage initial traffic via dynamic geo-load balancing, resolving edge routing and validating session tokens before handing off traffic to local regional clusters. Once inside the cluster, intelligent API gateways route incoming prompts to distributed databases to fetch conversational history, user profiles, and system prompts. To prevent persistent database bottlenecks during traffic spikes, localized read-only replica caches (e.g., Redis or distributed in-memory stores) serve high-frequency user metadata and system state with sub-millisecond latency.
After state and history retrieval, the request reaches the core inference engines, where the most complex engineering challenges reside. Compute clusters rely on continuous batching and dynamic continuous sequence scheduling to maximize GPU utilization across tens of thousands of accelerator chips. Crucially, memory management uses techniques like PagedAttention to dynamically allocate and offload Key-Value (KV) cache chunks, preventing VRAM fragmentation during long context generation. By decoupling the lightweight API orchestration layer from the compute-heavy, memory-bound GPU clusters, the system maintains ultra-low latency while serving billions of daily tokens across a massive worldwide user base.
KV Cache Management: To prevent VRAM out-of-memory errors and fragmenting, systems utilize virtual memory management (e.g., PagedAttention) to store key-value matrices in non-contiguous memory chunks, rapidly swapping or sharing context blocks across attention layers.
Question on self attention
Is self attention layer linear with respect to context length? Why or why not?
Implement an LLM-based application for low resource scenarios
Stanford CS365 practical on GPUs, architecture choices and benchmarking metrics and reports here
only use open-source models that will run on Google Colab such as Qwen