Ayon Roy (@iayonroy) profile picture
Joined November 2025
Ayon Roy retweeted
I'm sharing with you one of the best papers I've read on Harness Engineering it breaks down Claude Code (Fable 5.2), Codex, Gemini CLI and more, and distills all of them into one line: agent = model + harness what you take away: > what a harness is, in plain terms > how today's coding agents are built under the hood > the patterns they all share > the direction the entire field is moving > a checklist for building your own the model collects the applause the harness decides whether the agent actually works then read the article below ↓
your CLAUDE.md is a wish list the agent reads it, weighs it, and skips it at step 40 hooks don't ask. they check 6 events, 3 exit codes and the Stop hook that makes "done" mean the tests passed
65
187
5
1,263
111,528
Ayon Roy retweeted
Google trained an AI to predict your neighbourhood's income by counting the coffee shops, bus stops, and high-rises on a map. Nobody told it what income was. The model is called S2Vec, and it was published by Google Research as part of their Earth AI initiative. It takes the built environment (every building, road, park, and business in an area) and converts it into a layered image. Three coffee shops and one park in a grid cell become pixel values. The AI then reads that image the same way a computer vision model reads a photograph. The training method is the part that matters. S2Vec uses masked autoencoding: you show the model a patch of a city with chunks missing, and it learns to fill in the gaps. Show it a cluster of high-rise apartments next to a subway station, mask out a section, and it predicts a grocery store belongs there. Do that millions of times across the globe and the model learns the deep spatial grammar of how cities organise themselves. No human ever labels a region as "financial district" or "suburban residential." The model figures out those groupings on its own from the geometry of what's built where. The output is an embedding, a string of numbers that acts as a mathematical fingerprint for any location on Earth. Feed those embeddings into a prediction task and S2Vec can estimate population density, median income, and carbon emissions for regions it has never seen before. On zero-shot geographic extrapolation (predicting for regions entirely absent from training data) S2Vec was typically the best-performing individual model. It matched or beat satellite imagery baselines like RS-MaMMUT and outperformed GEOCLIP on socioeconomic prediction. The best results came from combining S2Vec with satellite image embeddings. Built environment data alone couldn't capture vegetation, terrain, or transportation patterns well enough for environmental tasks like tree cover and elevation. But fused together, the two modalities outperformed everything else. The standard approach to geospatial ML has been hand-crafting indicators for every new problem. Predicting air quality meant building a bespoke feature set. Estimating housing prices meant building another one. S2Vec replaces that with a single general-purpose representation that transfers across tasks. The training data is map features, not satellite pixels. That distinction is pretty important to understand. It means: map data updates faster, costs less to process, and covers built infrastructure at a resolution satellite imagery can't always match. A satellite sees rooftops. S2Vec knows there are three cafes, a pharmacy, and a bus stop underneath them. Google's broader Earth AI pipeline now has three foundation models working in parallel. 1. PDFM for population dynamics. 2. RS-MaMMUT for satellite imagery. 3. S2Vec for the built environment. Stack them and you get a system that can read a neighbourhood the way a local understands it. More info on it here: research.google/blog/mapping…
10
92
7
745
33,253
Ayon Roy retweeted
LLM inference is where the real systems engineering begins. A model generating tokens looks simple from the outside, but there's a lot happening underneath: > Prefill and Decode > KV Cache management > Continuous Batching > PagedAttention > Quantization > Speculative Decoding > GPU Memory Optimization The challenge isn't just generating tokens. It's generating more tokens, faster, at lower cost. That's inference engineering
3
3
29
812
AI models getting smaller and faster? Three moves do the heavy lifting: pruning cuts dead weight, distillation teaches a small model to act like a big one, quantization shrinks numbers for speed and memory. #AI #MachineLearning #LLM
1
19
Improving model inference speeds round #2. Let's have a look at the 4 common approaches to model compression! 1) Quantization 2) Pruning 3) Knowledge Distillation 4) Low-rank tensor decomposition (Anything missing?) 1/4 👇
Some techniques for optimizing inference speeds (without changing the model architecture): (1) Parallelization (2) Vectorization (3) Loop tiling (4) Operator fusion (5) Quantization Anything missing? [1/6]
5
53
3
306
Ayon Roy retweeted
Model Optimization and Post-Training Quantization Model quantization is an effective method to reduce VRAM usage and improve inference performance on consumer devices. By lowering computational and memory requirements while preserving model quality, quantization helps AI models run more efficiently in resource-constrained environments. This post walks through how to use NVIDIA Model Optimizer to quantize a CLIP model in FP8 format with the post-training quantization (PTQ) method, including an example workflow exporting a PyTorch checkpoint. Read the complete blog post: developer.nvidia.com/blog/mo…
2
22
137
12,349
If you want to be an AI Engineer and preparing for such interviews, then these are the top 10 things you must know: 1. Prompt Caching and Semantic Caching along with their tradeoffs 2. KV Cache Management at scale 3. Speculative Decoding vs Quantization 4. RAG Evaluation (RAGAS and Human Evaluations) 5. Cost Monitoring and Hidden Token Leaks 6. Agent Guardrails and Infinite Loop Detection 7. LLM Observability, Tracing, and Debugging 8. Context Engineering and Context Window Optimization 9. AI Security, Prompt Injection, and Data Exfiltration 10. Model Routing, Callbacks, and Provider Resilience
5
3
1
34
2,765
Ayon Roy retweeted
🎓TinyML and Efficient Deep Learning Computing You can now catch up on the efficient ML space with this new set of YouTube lectures by MIT. Topics include model compression, pruning, quantization, neural architecture search, distributed training, data/model parallelism, gradient compression, and on-device fine-tuning. As we look ahead, it's starting to become very clear on the importance of this topic. I might summarize a few of these and share my takeaways/notes in an upcoming post. youtube.com/playlist?list=PL…
6
224
3
977
118,991
Model compression in AI utilizes pruning, quantization, model distillation, and matrix factorization to shrink network size and enhance computational speed while preserving performance, enabling robust functionality on devices with limited resources. Microblog @antgrasso #ai
2
61
2
90
6,636
Concepts I'd master to build production ML systems with PyTorch. Bookmark this 👇 1. TorchScript for model serialization 2. torch.compile for 2x speedups 3. Distributed training with DDP/FSDP 4. Mixed precision with torch.amp 5. Custom CUDA kernels with Triton 6. Model quantization (PTQ & QAT) 7. TorchServe for model deployment 8. Lightning for cleaner training loops 9. Dataset optimization with DataLoader workers 10. Profiling with torch.profiler 11. ONNX export for cross-platform inference 12. Gradient accumulation for large batches 13. Learning rate scheduling strategies 14. Model checkpointing & recovery 15. TorchVision/Audio/Text domain libraries 16. Integration with HuggingFace ecosystem
2
20
220
11,279
Quantization, explained simply. Smaller number formats can reduce model memory use. Test accuracy and speed on your hardware. #AI #GenAIGuru
1
1
3
158
Quantization Is All You Need SOTA LLMs are too large to run on laptops. Quantization is a technique used to reduce LLMs' computational and memory requirements and create a smaller version of the model. Quantization is central to OSS progress It involves converting the model's parameters, typically stored as 32-bit floating-point numbers, into lower-precision formats such as 16-bit or even 8-bit integers. This process significantly decreases the model's size and accelerates inference speed, enabling deployment on resource-constrained devices. Quantization can affect model performance, but the trick is finding a balance between model compression and accuracy, achieved through careful calibration and fine-tuning of the quantization process. This visual guide is an excellent way to learn about quantization (link in alt)
32
131
5
600
95,641
Ayon Roy retweeted
This paper studied quantization for LLMs with linear recurrent layers. Qwen-3.5, Nemotron-H and Kimi-Linear mix these layers with attention. Attention keeps a KV cache that grows with every token, but a recurrent layer keeps one fixed-size state. Most quantization methods were made for attention, so it was unclear how well they work here. Without rotation tricks, recurrent models with decay lose less quality with 4-bit activations than attention models. They trained 11 models of 1.3B parameters that differ only in the attention or recurrent layer. With 4-bit weights and activations, perplexity rose 92% to 98% with attention but only 45% to 57% with decay. For the state, stochastic rounding beat round-to-nearest in Qwen-3.5, Nemotron-H and Kimi-Linear. A KV cache entry is rounded once, but the state is rounded again after every token. With round-to-nearest, an update smaller than half a rounding step can be rounded away every time, so the error keeps growing. Stochastic rounding rounds up or down at random, with odds set by the distance, so it is right on average. With an 8-bit state, Qwen-3.5 scored 79.5 on AIME with stochastic rounding and 54.0 with round-to-nearest. A 32-bit state gave 82.3. With nothing else quantized, their method kept 8-bit states within 0.6 points of 32-bit states on GSM8K, MMLU-Pro, GPQA and RULER, in all three. It also sped up decoding at large batch sizes, because a big batch has many states to load. On one H100 at batch 256, Nemotron-H took 17.32 ms per output token instead of 29.35 ms with a 32-bit state.
(1/9) Quantizing recurrent language models is easier than you think! Hybrids compete at scale (e.g. Qwen, Kimi, Nemotron). Yet the PTQ stack has largely been tailored to softmax attention. 🤔 In this work, we reveal that recurrent models can be easier to quantize.
2
9
2
100
5,759
Ayon Roy retweeted
Model Quantization Component: spent the weekend turning model quantization into something you can actually feel
sliders, tradeoffs, compression, latency, accuracy Designed in @paper, animated with @motiondotdev
3
8
1
221
11,272
How does Model Quantization work? Read here: outcomeschool.com/blog/how-d…
1
12
55
3,019
TinyML and Efficient Deep Learning Computing, MIT 2023 A course that covers efficient AI techniques used for deploying deep learning models on resource-constrained devices. The topics covered include model compression, pruning, quantization, neural architecture search, distributed training, data/model parallelism, gradient compression, on-device fine-tuning, and applications specific techniques for large language models, diffusion models, and video recognition. Large language(and image) models are remarkably great at tasks they do but getting them to actually work require a huge amount of computational resources. It's nice to see courses that are dedicated for demystifying large models deployments. Lecture videos: youtube.com/playlist?list=PL… Website: efficientml.ai
9
249
4
1,019
118,125
Ayon Roy retweeted
AI TOPIC FOR BIG TECH INTERVIEWS DAY 16 - QUANTIZATION 📌 Why do we need quantization? LLMs are huge. More parameters ↓ More memory ↓ More GPU cost ↓ More latency Quantization reduces the precision used to represent model weights and activations. ━━━━━━━━━━━━━━━━━━ 1. WHAT IS QUANTIZATION? Instead of storing numbers with very high precision: FP32 we can use fewer bits: FP16 ↓ INT8 ↓ INT4 Fewer bits → Less memory → Faster computation → Lower serving cost ━━━━━━━━━━━━━━━━━━ 2. FP32 vs FP16 vs INT8 vs INT4 FP32 → 32 bits per value → High precision → More memory FP16 → 16 bits → Lower memory → Common in GPU inference INT8 → 8 bits → Significant memory reduction INT4 → 4 bits → Very large memory reduction → May introduce more accuracy loss The trade-off: Precision ↓ → Memory ↓ → Cost ↓ → Potential quality loss ↑ ━━━━━━━━━━━━━━━━━━ 3. WHAT CAN WE QUANTIZE? LLMs contain different types of numerical values. Weights → Model parameters Activations → Intermediate values produced during inference So we can have: → Weight-only quantization → Weight + activation quantization Weight-only approaches are particularly common for LLM inference. ━━━━━━━━━━━━━━━━━━ 4. POST-TRAINING QUANTIZATION The model is already trained. Then: Trained model ↓ Quantization ↓ Lower-precision model ↓ Deploy No complete retraining of the model is required. This makes PTQ attractive when you want to optimize an existing model. ━━━━━━━━━━━━━━━━━━ 5. QUANTIZATION-AWARE TRAINING Another approach: Train model ↓ Simulate quantization during training ↓ Learn to handle lower precision ↓ Deploy quantized model This can help preserve quality, but requires additional training work. ━━━━━━━━━━━━━━━━━━ 6. WHY DOES IT MATTER FOR LLMs? Imagine a model with billions of parameters. If every parameter requires more memory: Huge model ↓ More GPU memory ↓ More GPUs required ↓ Higher infrastructure cost Quantization: Huge model ↓ Lower precision ↓ Smaller memory footprint ↓ Fewer resources ↓ Lower serving cost ━━━━━━━━━━━━━━━━━━ 7. THE TRADE-OFF Quantization isn't free. Lower precision can cause: → Accuracy loss → Quality degradation → Numerical errors So the goal isn't: "Use the lowest precision possible." The goal is: Best quality + Best efficiency ━━━━━━━━━━━━━━━━━━ 8. BIG TECH INTERVIEW QUESTION Q: You have a 70B parameter model that is too expensive to serve. How would you reduce its memory footprint while keeping quality acceptable? Think about: → Quantization → KV Cache optimization → Batching → GPU utilization → Model parallelism A strong answer explains the trade-offs instead of just saying "use INT4." ━━━━━━━━━━━━━━━━━━ BIG TECH TAKEAWAY LLM optimization is not only about making the model smarter. It's also about making it cheaper and faster to serve. Quantization → Precision ↓ → Memory ↓ → GPU requirements ↓ → Cost ↓ But: Efficiency ↑ ≠ Quality automatically stays the same. Always think about the trade-off. ━━━━━━━━━━━━━━━━━━ NEXT → MODEL PARALLELISM
1
8
82
2,500
Ayon Roy retweeted
Guide to AI model quantization.
9
66
33,471
Ayon Roy retweeted
Important AI engineering topics every developer should know: > LLM Fundamentals & Transformer Architecture > Tokenization & Context Windows > Prompt Engineering & Context Engineering > Embeddings & Vector Databases > RAG Architecture > Chunking & Retrieval Strategies > Semantic Search & Hybrid Search > Reranking & Retrieval Optimization > Fine-tuning & LoRA > Model Quantization > AI Agents & Agentic Workflows > Tool Calling & Function Calling > MCP & Agent Communication > Memory Management > Multi-Agent Systems > AI Evaluation & Evals > Hallucination Detection > Guardrails & AI Safety > Structured Outputs > LLM Observability & Tracing > Inference Optimization > KV Cache & Paged Attention > Latency & Token Cost Optimization > Model Routing & Fallbacks > AI Security & Prompt Injection > Production Deployment & Scaling Building an AI wrapper is easy. Building reliable, cost-efficient AI systems that work in production is real AI engineering.
Important system design topics every developer should know: > Load Balancing > Horizontal vs Vertical Scaling > Reverse Proxy & API Gateway > Caching Strategies > Database Replication > Database Sharding > Consistent Hashing > CAP Theorem > ACID & BASE > Eventual Consistency > Message Queues & Pub/Sub > Event-Driven Architecture > Microservices vs Monolith > Service Discovery > Distributed Locks > Leader Election > Rate Limiting > Circuit Breakers > Fault Tolerance > High Availability > Database Indexing > CDN & Edge Computing > Idempotency > Distributed Transactions > Observability & Monitoring > Disaster Recovery Don't just memorize system design concepts. Understand the trade-offs, bottlenecks, and failure scenarios behind every design.
4
5
49
1,968
Ayon Roy retweeted
My tier 69 college will never teach me about these things, but they're becoming essential for anyone serious about AI Engineering: 1. Transformer architecture & attention mechanisms 2. KV Cache optimization 3. Prefill vs Decode latency 4. Continuous Batching 5. PagedAttention 6. Speculative Decoding 7. Quantization (INT8, INT4, FP8) 8. FlashAttention 9. Mixture of Experts (MoE) 10. Model Distillation 11. Context Engineering 12. RAG Architecture & Retrieval Optimization 13. Vector Search & HNSW Indexing 14. LLM Inference Optimization 15. GPU Memory Management 16. Distributed Training & Data Parallelism 17. Agent Orchestration & Multi-Agent Systems 18. LLM Evaluation & Benchmarking 19. Structured Output & Tool Calling Reliability 20. AI Guardrails & Production Observability This is the engineering happening behind modern AI systems. Learning to call an LLM API is easy. Understanding how to build, optimize, evaluate, and deploy reliable AI systems at scale is where real AI engineering begins.
11
18
1
227
7,763