Pattabhi A (@impattabhi) header
Pattabhi A (@impattabhi) profile picture
Joined March 2010
Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)Photo by Pattabhi A (@impattabhi)
4 days - 4 visual cheat sheets => Everything you need to understand GenAI from fundamentals to production. → Day 1: How LLMs work → Day 2: Prompting & RAG → Day 3: Fine-tuning & Agents → Day 4: GenAI in Production. I’ve made the complete 4-day PDF free. Save it, share it, and use it as a quick reference whenever you're learning or building with GenAI PDF: t3pacademy.gumroad.com/l/wyq…
8
72
4
299
10,908
Pattabhi A retweeted
I thought I understood GPU utilization until I started working on this handbook. I kept collapsing three different things into one mental picture => the work a kernel launches, the work that is actually resident on the GPU, and the work that is ready to issue right now. They are not the same thing. Take a kernel with 240 blocks and 256 threads per block. That is 61,440 logical threads, or 1,920 NVIDIA warps. But those warps are not all physically resident at once. Blocks are admitted onto SMs as registers, shared memory, thread limits, warp limits and block limits allow. Even after a warp becomes resident, it may still be waiting on memory, an arithmetic dependency or synchronization. The scheduler can only choose from warps that are actually eligible to issue. That changed how I read performance numbers too. Occupancy is a residency number => resident warps compared with the architectural maximum. GPU utilization measures something different. In NVML it is basically the fraction of the sampling window during which at least one kernel was executing. So a GPU can show 100% utilization without Tensor Cores being saturated, without HBM bandwidth being saturated, and while one subsystem is the bottleneck and large parts of the GPU remain underused. Memory has the same kind of traps. Registers, shared memory, L1, L2 and HBM are not just increasingly slower boxes. They have different scope, capacity, management and access behavior. A model fitting in HBM tells you that it fits. It tells you almost nothing about how many bytes move, whether accesses coalesce well, how much reuse you get, or whether memory is what is holding the kernel back. FlashAttention is a nice example => the dense attention math stays the same, but the execution schedule is reorganized to reduce traffic between HBM and on-chip storage. Tensor Cores were another thing I had mentally oversimplified. They are specialized matrix multiply-accumulate hardware and they matter enormously for AI, but they do not “run the model.” Reductions, indexing, elementwise work, synchronization, memory movement, launches and plenty of other instructions still go through other parts of the GPU. After a while I stopped asking "why isn’t the GPU at 100%?" and started asking a better question => what is actually limiting useful progress right now? That ended up becoming a 42-page handbook. SMs, warps, schedulers, occupancy, latency hiding, registers, shared memory, caches, HBM, coalescing, Tensor Cores, GEMM mapping, precision, utilization and the performance numbers that are very easy to misread. Do read.
8
119
617
19,225
Pattabhi A retweeted
Day 50/100 of Learning System Design. Distributed Transactions – Challenges and Solutions. Grab the System Design Ebook: codewithdhanian.gumroad.com/…
Day 49/100 of Learning System Design. Distributed Consensus – Paxos and Raft Explained. Grab the System Design Ebook: codewithdhanian.gumroad.com/…
8
17
1
97
6,447
Pattabhi A retweeted
Who's gonna tell vibe coders about... > Rate Limiting > Caching > Load Balancing > Reverse Proxies > API Gateways > CI/CD > Docker > Kubernetes > Service Discovery > Circuit Breakers > Timeouts > Retries > Exponential Backoff > Idempotency > Message Queues > Pub/Sub > Event-Driven Architecture > Distributed Transactions > Saga Pattern > Dead Letter Queues > Cron Jobs > WebSockets > Long Polling > Server-Sent Events > Database Indexing > Query Optimization > N+1 Queries > Connection Pooling > Read Replicas > Sharding > Partitioning > Replication > Leader Election > CAP Theorem > Eventual Consistency > Optimistic Locking > Pessimistic Locking > Distributed Locks > Race Conditions > Deadlocks > Memory Leaks > Garbage Collection > Thread Safety > Backpressure > Autoscaling > Horizontal Scaling > Vertical Scaling > CDN > Edge Caching > Cache Invalidation > Feature Flags > Blue-Green Deployments > Canary Releases > Rolling Deployments > Rollbacks > Health Checks > Liveness & Readiness Probes > Monitoring > Logging > Distributed Tracing > Metrics > Alerting > SLOs > SLIs > Error Budgets > Observability > Secrets Management > IAM > OAuth > JWT Rotation > TLS > Encryption at Rest > Encryption in Transit > WAF > DDoS Protection > CORS > CSRF > SQL Injection > XSS > SSRF > Database Migrations > Schema Versioning > Disaster Recovery > Backups > Failover > Multi-Region Deployments > Chaos Engineering > Cost Optimization > Cold Starts > Serverless Limits > Latency > Throughput > P99 Latency > Tail Latency > Network Partitions > Clock Skew > DNS > TCP vs UDP > HTTP/2 & HTTP/3 > gRPC > Webhooks > API Versioning > Semantic Versioning > Infrastructure as Code > Terraform > Helm Charts > Build Caching > Dependency Hell > Production Incidents > On-call > Postmortems ...until the app gets its first million users.
932
671
240
6,755
776,370
Pattabhi A retweeted
MCP vs A2A vs ACP 𝗠𝗖𝗣 is for connecting agents to tools and data. It standardizes how agents discover and use capabilities like querying databases, calling APIs, accessing files, and interacting with external systems. 𝗔𝟮𝗔 is for communication between independent AI agents. It lets agents discover each other’s capabilities, delegate tasks, exchange information, and coordinate work across different frameworks and environments. If you want to go deeper on how A2A fits alongside MCP, here’s a great breakdown → lucode.co/agent-communicatio… 𝗔𝗖𝗣 was another approach to agent-to-agent communication, built around RESTful HTTP APIs, JSON payloads, and standard web infrastructure. It has since merged into A2A, consolidating the two efforts around agent interoperability. MCP and A2A are complementary, not rivals. Agents use MCP for tool access and A2A for coordination, while ACP has merged into A2A. But MCP and A2A aren't always the answer. If you're deciding which approach to use in production, this guide breaks down when to use MCP, A2A, or something else → lucode.co/agent-communicatio… What else would you add? —— ♻️ Repost to help others learn AI. 🙏 Thanks to @OracleDevs for sponsoring this post. ➕ Follow me ( Nikki Siapno ) to improve at AI and system design.
MCP vs A2A vs ACP 𝗠𝗖𝗣 is for connecting agents to tools and data. It standardizes how agents discover and use capabilities like querying databases, calling APIs, accessing files, and interacting with external systems. 𝗔𝟮𝗔 is for communication between independent AI agents. It lets agents discover each other’s capabilities, delegate tasks, exchange information, and coordinate work across different frameworks and environments. If you want to go deeper on how A2A fits alongside MCP, here’s a great breakdown → lucode.co/agent-communicatio… 𝗔𝗖𝗣 was another approach to agent-to-agent communication, built around RESTful HTTP APIs, JSON payloads, and standard web infrastructure. It has since merged into A2A, consolidating the two efforts around agent interoperability. MCP and A2A are complementary, not rivals. Agents use MCP for tool access and A2A for coordination, while ACP has merged into A2A. But MCP and A2A aren't always the answer. If you're deciding which approach to use in production, this guide breaks down when to use MCP, A2A, or something else → lucode.co/agent-communicatio… What else would you add? —— ♻️ Repost to help others learn AI. 🙏 Thanks to @OracleDevs for sponsoring this post. ➕ Follow me ( Nikki Siapno ) to improve at AI and system design.
16
99
3
427
34,576
Anthropic engineer: "You don't need better prompts, you need graph engineering that makes agents remember everything." In 28 minutes he shows how Anthropic wires agents into a graph, each with a job, running in parallel, verifying each other. This beats any paid course on building agents I've seen. Watch it, then read the full guide on graph engineering below.
18
35
1
282
64,688
Pattabhi A retweeted
quantization, or: where 12GB of an 8B model went ok here's a fact that should feel more surprising than it does: the same 8B parameter model can need ~16GB in BF16, or ~4GB-ish in 4-bit. Same 8 billion parameters. We didn't prune any of them. what changed is how many bits we spend representing each one. the arithmetic is simple: 16 bits/weight → ~16GB 8 bits/weight → ~8GB 4 bits/weight → ~4GB (this is theoretical weight storage only btw, not total VRAM, you still need KV cache, activations, buffers, plus the scale factors and metadata quantization itself introduces. real 4-bit quantized models usually land above the raw 4GB math, so the "4GB model" comment you see online is doing a fair amount of quiet rounding.) so what's actually happening under the hood. in a simple integer quantization scheme, a weight might be some float, say 0.137. instead of storing that directly, we pick a scale factor and round to the nearest representable integer in our smaller format. during computation, the scale lets us approximate the original value, something close to 0.137, not necessarily 0.137 exactly. (FP4/FP8 work a bit differently, they cast into a low-precision float representation rather than rounding to an integer code, but the spirit is the same: fewer bits, some information lost.) that's the whole trick. you're not compressing for free, you're throwing away precision on purpose and betting the model doesn't care that much. with a good quantization method, surprisingly often it doesn't, but push too far and quality absolutely can drop. now, the terminology soup, because this trips up a lot of people: GPTQ / AWQ are quantization methods, different ways of deciding how to turn higher-precision weights into lower-precision ones while limiting the damage. GPTQ uses approximate second-order information while quantizing weight-matrix columns in blocks, updating the remaining weights to compensate for the error it introduces. AWQ instead uses activation statistics to identify salient weight channels, then rescales them so quantization hurts those channels less. INT4 / FP4 / FP8 are number formats, the actual bit layout. GGUF is a file format, a box you put a model in. these are three completely different axes and people talk about them like they're interchangeable. the word GGUF alone doesn't tell you the quantization scheme, the format and the quantization are separate concepts. in practice, many published GGUF files put labels like Q4_K_M or Q5_1 right in the filename, which is why the two ideas get mentally bundled together even though nothing forces that pairing. you'll also see notation like W4A16 (4-bit weights, 16-bit activations) or W8A8 (both 8-bit). weights are the most common target, activations are trickier because their distributions shift with the input, so quantizing them well is a harder problem. KV cache is its own thing entirely, and at sufficiently long contexts it can become a major part of the memory bill, not just a footnote. one more thing people get wrong: 4-bit does not mean 4x faster. that's not how any of this works. speed depends on whether your hardware actually has fast kernels for that format, memory bandwidth, batch size, model architecture, a whole pile of variables that have nothing to do with the bit count itself. if your bottleneck is somewhere else, smaller weights may not buy you much. anyway. the mental model that actually matters: parameter count stays the same → we spend fewer bits representing some of those parameters → less weight memory and less weight traffic. how much quality you lose, and how much speed you gain, is where the quantization method, format, hardware and kernels start to matter.
1
26
111
4,506
Pattabhi A retweeted
This Github repo contains 500 AI Agents Projects across various industries like healthcare, finance, education, retail. It showcases practical applications and provides links to open-source projects for implementation, illustrating AI agents github.com/ashishpatel26/500…
17
77
407
34,063
Pattabhi A retweeted
This GitHub repository (with 100+ case studies) contains everything you need to become proficient in System Design: github.com/Coder-World04/Com…
9
100
530
34,669
Pattabhi A retweeted
Hermes Agent is still one of the BEST AI agents for business. I've spent hundreds of hours in it, wiring into HubSpot, Gong, Slack, Google Docs, Obsidian logs, and more. It went from answering my questions to literally running parts of my business. Give me 20 minutes, and I'll show you how you can too: 00:00 The #1 Mistake Killing Your Hermes Results 00:31 Context → Artifacts → Skills 01:32 Building a Strategic Thought Partner 03:27 Scaling Your Thinking With Artifacts 07:19 Making Hermes Multiplayer (Company Brain) 08:52 Skills vs Prompts vs Loops 11:12 Single Brain & Skills Dojo 13:35 Connectors, Governance & The Desktop App 17:39 Cron Jobs & Memory Systems 19:53 The 8 Levels of Hermes
27
52
1
459
67,930
this is f*cking gold Andrej Karpathy joined Anthropic five weeks ago. Two Anthropic seniors just made Karpathy's loop 1000x better with "Graph Engineering" the agentic systems got 1000x better the moment you wired agents into a graph I dropped it into my setup. The very first response was different. Not slightly different. Completely different. Claude stopped giving generic answers and started working exactly the way I think. Bookmark it before it gets lost in your feed. Read it now, then check the article below.
16
49
248
25,043
Pattabhi A retweeted
I met someone who showed me how top AI users actually write prompts. I asked him what made his prompts so effective. He shared a 2-hour Anthropic course with me. Halfway through, I realized I had been using Claude completely wrong. If you use Claude, you need to see this. 🔖 Bookmark this video.
61
80
230
11,448
Pattabhi A retweeted
Two phases run under every LLM call Prefill and decode. Phase 1: PREFILL - Your prompt first gets tokenized. Conceptually, "Why is the sky blue?" might look like [Why] [is] [the] [sky] [blue] [?]. - Then the model processes the prompt through its transformer layers, with computation across prompt tokens heavily parallelized. - During this pass, it builds the KV cache, stored attention states for the prompt that can be reused during generation. - At the final prompt position, the model scores the possible next tokens, picks one according to the decoding strategy, and you get the first output token. - This is a major model-side contributor to TTFT: time to first token. Longer prompts generally mean more prefill work before generation starts. Phase 2: DECODE - Now the model works very differently. - One new token at a time. Over and over. - At each step, it processes the newest token while reusing the KV cache from everything before it → produces next-token scores → selects a token → adds that token's new key/value states to the cache → repeats. - Ordinary autoregressive decoding is sequential: token 47 depends on token 46 already being in the context. This is why two responses from the same model can feel completely different. One can sit there doing nothing before the first token appears, another can start instantly but take forever to finish. Several things affect inference speed and cost: 1./ Prompt length → more prefill work 2./ Output length → more decode steps 3./ Model architecture / active parameters → compute per token 4./ Context + KV-cache size → more memory pressure 5./ Hardware → compute + memory-bandwidth limits 6./ Batch size → throughput/latency trade-offs 7./ Quantization → lower memory; speed depends on hardware + kernels Two numbers are especially useful: TTFT → how long you wait for the first token TPS → how quickly output tokens arrive after that Output length mostly determines how many decode steps you have to pay for, TPS tells you how quickly those steps are running. So when an LLM feels slow, ask two different questions: Was it slow before the first token? Or slow after it? Prefill explains much of the first. Decode explains much of the second.
8
51
2
268
9,607
Anthropic engineer: "The fastest way to make an agent better isn't a smarter model, it's the right loop and graph around it." In 60 minutes she breaks down how Anthropic engineers use Claude Code, build agents that catch their own mistakes and improve with every run. This beats any $500 agentic engineering course you can find. Watch it, then read the full guide on loops and graphs below.
31
85
6
544
136,930
Pattabhi A retweeted
Andrew Ng just dropped a 2-hour course on Graph Engineering: from Loops to full automation 9:14 - Your first agent 33:11 - Loop engineering 1:02:46 - Graph engineering 1:30:15 - Agents that rewrite themselves 1:49:05 - Full graph system Free, the best thing on graph engineering I've come across Watch it, then build your first graph with the guide below
13
241
4
1,322
240,131
Pattabhi A retweeted
This repo is a goldmine if you are preparing forn Systemd Design Interviews github.com/liquidslr/system-…
40
626
9
4,616
277,028
Pattabhi A retweeted
Andrew Ng just dropped 15-page PDF on 4 agentic steps "from Loops to Graphs from scartch" The twist: bigger context windows don't fix memory, they just postpone the forgetting to the next session. Here's the architecture, step by step: step 1 → the problem: RAG was built for static documents. Agents need memory that updates from live conversations and business data at the same time. step 2 → the engine: a temporal knowledge graph that ingests both chat and structured records into one queryable layer, no separate stores. step 3 → the twist that matters: every fact carries two timestamps, when it happened and when the system learned it. Nothing overwrites, it supersedes. step 4 → contradictions get invalidated, never deleted. "Who owned this in April" still answers, months later. then the receipts: step 5 → on Deep Memory Retrieval, the benchmark MemGPT's own team built, it scores 94.8% against MemGPT's 93.4%. step 6 → on LongMemEval, the harder enterprise benchmark: up to 18.5% better accuracy with 90% lower latency. Save it, then read the full graph engineering build below ↓
20
27
184
21,363
Pattabhi A retweeted
Yes, open-source / open-weight models are important for a healthy AI ecosystem. That's how we can verify things, check claims, and keep up outside the closed labs. Plus, it gives us the freedom to run AI on our own hardware if we are not ready to share personal data and IPs with closed labs through using their models. (Not that proprietary models are bad, actually I use them a lot as well, but it wouldn't healthy not to have any alternatives.) Anyway, while pretty much everyone is waiting for the Kimi K3 and Ling 3.0 weights to land on the model hub any day now, there were quite a few other interesting new open-weight model releases the past week. Yes, one of those weeks! So, here are the architecture pics along with some notes on what I found most interesting: 1) Nanbeige 4.2 3B uses looped depth sharing. This basically means it runs the same 22-layer (=transformer block) stack twice. So, it extends the 22-layer architecture to 44-layers, but without duplicating the weights. (2x the transformer block compute but same memory footprint.) Why? The info is a bit sparse, but section 2.1 of the Nanbeige 4.2 technical report says two passes gave the best trade-off and retained about 75% of the token efficiency of a standard architecture. More passes gave barely any gains but made the training much slower and much more expensive. 2) Laguna S 2.1 is poolside's Laguna model in a really nice size: 118B sparse MoE with 8B active parameters and a 1M-token context window. Otherwise, the architecture is pretty standard. It uses 36 sliding-window and 12 global (gated-)GQA layers. However, given this size, and the fact that it (just barely) runs on my DGX Spark (uses about <80 GB of RAM), this is right now the most interesting model for me personally. It's 3x bigger and thus a tad slower but maybe a good candidate as daily-driver-Qwen3.6-35B-replacement. (Still waiting on some more independent performance benchmarks though.) 3) Motif-3-Beta is a new 314B-A13B sparse MoE that is somewhat based on DeepSeek V4 in terms of mHC and latent attention. But it uses a new component, Grouped Differential Latent Attention, which is inspired by Multi-head Latent Attention. I probably should write an article about this some time, but for now, the tl;dr is as follows. Regular MLA compresses the keys and values into a smaller latent representation to mainly reduce the KV cache size. GDLA does a similar low-rank compression but puts the attention heads into groups and also learns a noise head for each group where the noise gets subtracted for filtering purposes... Anyway, a topic for another day! 4) Solar Open 2 is a new 250B-A15B hybrid MoE by Upstage that interleaves three Kimi Delta Attention layers with one GQA layer. 5) Antares 1B is a small model (and there is also an even smaller 0.3B variant) from Cisco starts that with the IBM Granite 4.0 1B backbone and uses SFT plus GRPO for terminal-based cybersecurity stuff. It is a nice example of task-specific post-training on a genuinely small model. 6) BTL-3 is a rank-32 LoRA adapter for Qwen3.6-27B aimed at coding agents and structured tool use. The really strong benchmark performance suggests that LoRA adapters are still a useful tool/technique in 2026. I added all six to the LLM Architecture Gallery for some additional details: sebastianraschka.com/llm-arc…
92
254
13
1,596
75,631
Andrej Karpathy says 80% of what a kid studies should be three subjects. "There's a correct answer in my mind, and the correct answer is math, physics, CS." He calls it the best thinking skill core. Those subjects train you to manipulate ideas instead of storing them, and we lost the memorizing contest to our own tools a long time ago. Karpathy calls childhood the critical period, when a brain has the most time and the most attention to give. He wants that window going into these three. It gets you hired today, and it keeps you an empowered human on the other side of AGI.
37
50
9
492
92,957