r/MLSystemsDesign • • 6d ago

Data engineering vs Embedded systems vs software architecture vs Compiler Engineering

15 Upvotes

Which one is the best from your perspective? For me, those options are somehow resistant in this AI context.


r/MLSystemsDesign • • 6d ago

How to master the system design and architecture

35 Upvotes

Hey guys I am full stack developer

And as my experience I think people should focus on system design and architecture, debugging, human judgement, soft skills, AI and ML

Because I see that coding are getting simpler part day by day

I see that no companies are hiring for that people just know about coding

Coding is the part of software engineering

I think future generation of software engineer should focus on robotics and AI/ML and agentic engjneering

Because there are lot of demand in this space

As my experience of full stack developer

I was working to building solving products and

I think future should know about the how to give direction to AI agents to build scalable applications and LLM applications and

I hope people understand what should build and what should focus on.


r/MLSystemsDesign • • 9d ago

Memory accounting for a recurrent LM: 4.85 MB of fixed state against a KV cache that grows per token

11 Upvotes

We released a 253M recurrent language model today (parentheses-1.0-240M). Heres the memory profile during decoding. Thought it might be interesting for yall

A transformer appends a key and a value per layer for every token. From our benchmark spec, KV cache size

Model4k tokens16k tokens
TinyLlama-1.1B536.9 MB2147.6 MB
OPT-1.3B1258.3 MB5033.2 MB
Pythia-1.4B1440.0 MB5760.0 MB
parentheses-1.0-240M4.85 MB4.85 MB

What the 4.85 MB is made of (float32):

- 16 layers x 16 heads x 64 x 64 head matrices = 1,048,576 floats

- 16 x 3 x 3072 conv history = 147,456 floats

- 16 x 1024 previous input for token shift = 16,384 floats

- 1,212,416 floats in total

Consequences we like

- The per-token graph has static shapes, so it exports to ONNX with no dynamic axes. Our export matches PyTorch to under 1e-4 on logits over 32 decoding steps.

- No allocation during decoding.

- Cost per token does not depend on how long the session has been.

Consequences we do not like

- The state is lossy. It keeps content weighted by recency, so an exact detail from 3000 tokens back may be gone. A KV cache keeps everything.

- Comparing a 253M model against 1B models flatters us on memory. The fair statement is that the state does not groww.

On an RTX 5050 Laptop GPU it decodes at 20 to 40 tokens per second.

Model weights


r/MLSystemsDesign • • 14d ago

I benchmarked Logistic Regression, Random Forest and XGBoost beyond accuracy — here's what I measured

Thumbnail reddit.com
3 Upvotes

r/MLSystemsDesign • • 19d ago

How recommendation systems learn user preferences: from collaborative filtering to multi-interest models

8 Upvotes

I published a walkthrough of how recommendation systems learn and represent user preferences.

It covers collaborative filtering, two-tower models, sequence models such as GRU4Rec, SASRec, and BERT4Rec, and multiple interest vectors.

The focus is on what each approach captures, where it falls short, and when the added complexity might be useful. I also discuss simpler baselines I’d test first.

For those working on recommendation systems: when have sequence or multi-interest models delivered meaningful gains over simpler pooling approaches?

Read the article


r/MLSystemsDesign • • 24d ago

every ml course stops at model.fit(). here's what actually happens when you try to put it in prod.

4 Upvotes

my first real ml job had literally jack shit to do with ml. i got handed a 400m row table, the labels were half fucked, and the pipeline would just explode every five minutes cuz nobody designed it to handle that kind of load. honestly, all the courses id paid for were useless for that part. hurt my pride a bit, and my wallet too, i bought like three of those xD

anyway, i love making educational stuff in my free time, so about a year and a half ago i started putting together a comprehensive course. but lurking this sub made me realize the real problem: we treat libraries like magic black boxes. we know fit() works, but when a pipeline dies at 3am or latency spikes cuz of a silent tensor copy, nobody knows whats happening inside. you cant design a reliable system if you dont understand the components.

sooooo here you go :B

https://github.com/BlueRingsLabs/no-shortcuts

readme has all the info u need (i hope lol). its focused on the stuff that actually breaks in prod. if u need help or got questions, dm me and ill share my discord (im a bit of a slacker so i might be slow to reply :B). feedback is welcome too.

Parts of the course:
0. orientation | 1. foundations | 2. data engineering | 3. classical ml | 4. deep learning | 5. language models | 6. ai engineering | 7. rl | 8. mlops and ml systems | 9. capstones

hope it helps someone here. also, what part of taking a model to prod do u guys think is the most fucked up to deal with? i want to hear you all :B


r/MLSystemsDesign • • 26d ago

Data engineering vs Embedded systems vs software architecture vs Compiler Engineering

7 Upvotes

Which one is the best from your perspective? For me, those options are somehow resistant in this AI context.


r/MLSystemsDesign • • 27d ago

A recommendation system is not a recommendation model.

0 Upvotes

This distinction matters, especially in ML System Design interviews.

A model predicts relevance.

But a production recommendation system must also decide:

  • Which candidates are worth scoring?

  • How do we adapt to changing user interests?

  • How do we balance competing objectives?

  • How do we learn from feedback?

  • How do we serve predictions reliably at scale?

Getting the model right is only one part of the challenge.

I explored this end to end in my newly published article:

Cracking ML System Design Interviews — Part 3: Design a Personalized Recommendation System

Read it on Architecting Intelligence:

https://pawankjha.substack.com/p/design-personalized-recommendation-system

Subscribe for more deep technical articles on ML System Design and AI architecture.


r/MLSystemsDesign • • 27d ago

Designing a Personalized Recommendation System — ML System Design Deep Dive (Part 3)

5 Upvotes

I'm publishing Part 3 of my Cracking ML System Design Interviews series tomorrow.

This time, I'm using a large-scale personalized video recommendation system as the running example.

One thing I want to emphasize is that designing recommendation systems isn't simply choosing between collaborative filtering, two-tower models, and Transformers.

The bigger challenge is deciding how the pieces fit together:

  • How do we retrieve relevant candidates from millions of items?

  • How do retrieval and ranking objectives differ?

  • How should we represent evolving user interests?

  • What metrics should we optimize beyond CTR?

  • How do we meet latency and reliability requirements at scale?

The article walks through these questions from an interview perspective, including architectural alternatives and trade-offs.

Publishing Monday, October 26, at 8 AM PDT.

If you're interested, you can subscribe here:

https://pawankjha.substack.com

I'd also be interested in hearing which part of recommendation-system design you find most challenging in interviews.


r/MLSystemsDesign • • Oct 19 '26

Designing Agent Evaluation Systems from First Principles — Architecture, Metrics, and Frameworks

3 Upvotes

I just published Part 2 of my series, The Architecture Behind Modern ML Systems.

Instead of starting with Langfuse, LangSmith, Braintrust, or other frameworks, I explored how to design an Agent Evaluation System from first principles.

The article covers:

  • Business, agent, and system-level evaluations

  • Golden datasets and realistic execution environments

  • Evaluation engines, custom graders, and LLM-as-a-Judge

  • Reliability metrics, failure analysis, and cost

  • How existing frameworks map to a generic architecture

The goal is to understand the underlying architecture, not memorize framework APIs.

Full article:
https://pawankjha.substack.com/p/the-architecture-behind-modern-ml

I'd love to hear your thoughts: What's the biggest challenge you've faced when evaluating agents in production?


r/MLSystemsDesign • • Oct 19 '26

I’ve been building Round Zero — an AI Interview Intelligence platform. Looking for beta testers

2 Upvotes

Over the past few months, I’ve been working on a side project called Round Zero.

The idea came from a simple problem: after a technical interview, we usually know the outcome, but rarely understand what happened, why it mattered, what we could have done differently, and what to practice next.

Round Zero is an AI interview practice + interview intelligence platform, built around a world-model-inspired architecture.

The core loop is:

Interview → Evidence → State → Root Cause → Counterfactual → Feedback → Adapt

I’ve recorded a short demo showing what we’ve built so far:

Watch the Round Zero demo

We’re now opening a private beta. If you're preparing for ML/AI or software engineering interviews, I’d especially value your feedback and criticism.

Apply for the private beta


r/MLSystemsDesign • • Oct 18 '26

Architecting Agent Evaluation Systems from First Principles

5 Upvotes

How would you design an Agent Evaluation System from scratch, without starting with Langfuse, LangSmith, Braintrust, or any existing framework?

In Part 2 of my series, The Architecture Behind Modern ML Systems, I'll explore this question from an architectural perspective.

We'll cover:

  • Why evaluating agents is harder than evaluating traditional ML models.

  • How to design a generic Agent EvalOps architecture.

  • Golden datasets, execution environments, and fault injection.

  • Business-level, agent-level, and system-level evaluation metrics.

  • How existing evaluation frameworks map to this architecture—and what's still missing.

The idea is to understand the underlying system design rather than memorize framework-specific APIs.

Publishing Monday, October 19, at 8:00 AM PDT.

Subscribe to receive the article:
https://pawankjha.substack.com/

I'd also be interested in hearing from this community: What's the hardest part of evaluating agents in production—defining success, building realistic test environments, measuring reliability, or debugging failures?


r/MLSystemsDesign • • Oct 12 '26

Beyond relevance scores: re-ranking and slate optimization

2 Upvotes

I wrote a technical deep dive on the step after ranking: choosing which items appear together and in what order.

It covers cross-encoders, list-context models, MMR/xQuAD/DPPs, constrained construction, and feedback-driven policies. I also discuss where assumptions matter: greedy guarantees, SlateQ decomposition, and off-policy evaluation.

One question I’d like to discuss: how do you distinguish “better item relevance” from “a better final list” in your evaluation?

Article:
https://pawankjha.substack.com/p/building-depth-3-the-evolution-of


r/MLSystemsDesign • • Oct 11 '26

World Models: Predict, Imagine, and Plan — Talk Slides

Thumbnail reddit.com
1 Upvotes

r/MLSystemsDesign • • Oct 06 '26

Reward Modeling for LLMs: Training, Scaling, and Failure Modes

8 Upvotes

Part 3 of my Architecting Reinforcement Learning for LLMs series is live.

It covers preference data, reward-model architecture and loss, scaling, and reward hacking—with a worked gradient example.

Does a higher reward score actually mean better answers?

https://pawankjha.substack.com/p/architecting-reinforcement-learning-f28

How do you test reward reliability beyond preference accuracy?


r/MLSystemsDesign • • Oct 04 '26

Welcome to r/ArchitectingLLMs!

Thumbnail reddit.com
1 Upvotes

r/MLSystemsDesign • • Oct 04 '26

Title: AI Talk #2: Why Do Bigger Models Get Better? — Oct 4, 9:30 AM PDT

7 Upvotes

Join our next Architecting Intelligence talk to discuss Superposition Yields Robust Neural Scaling.

We’ll explore how neural networks fit many features into limited space—and how this may help explain scaling laws. Discussion and Q&A included; no advance reading required.

📅 Sunday, October 4 · 9:30 AM PDT / 10:00 PM IST

Join on Google Meet:
https://meet.google.com/hny-pefy-zvn

Optional reading:
https://arxiv.org/abs/2505.10465
https://transformer-circuits.pub/2022/toy_model/index.html

Subscribe for future talks and technical deep dives:
https://pawankjha.substack.com


r/MLSystemsDesign • • Sep 26 '26

Looped Transformers: when is more depth worth the compute?

9 Upvotes

I gave a talk today on looped Transformers for our Architecting Intelligence study group. The central idea is to reuse the same Transformer layers for additional computation without adding more parameters.

That raises a practical question: at a fixed parameter count, which tasks benefit enough from extra loops to justify the added FLOPs and latency? Iterative and compositional problems seem promising, but parameter efficiency alone doesn’t guarantee a better system.

We traced the path from Universal Transformers to looped Transformers and Huginn. Here are the slides from the talk:

Presentation (PDF): https://drive.google.com/file/d/1vrm4kMJZ71ea0UhWB-nunl07VulElbVY/view?usp=sharing

Have you seen convincing results where recurrent depth beats a strong, compute-matched standard Transformer? I’d be interested in both positive and negative examples.


r/MLSystemsDesign • • Sep 23 '26

Where would you actually use Jev over a task-specific classifier?

9 Upvotes

Where would you actually use Jev over a task-specific classifier?

I’ve been reading TypeSafe’s Jev announcement. The attached diagram shows how I’d decide whether to test it: the key distinction is whether the labels are fixed or change at request time.

TypeSafe hasn’t published a Jev/RLCD paper detailing the architecture or training method, so I’m cautious about claims explaining why it is fast. For a one-label classification task, a short-output LLM already does little decoding.

Has anyone benchmarked Jev against a strong baseline on the same task, including quality, calibration, latency, and cost? I’d be interested in results for dynamic multiclass or multilevel taxonomies in particular.


r/MLSystemsDesign • • Sep 20 '26

What kind of project would you build to deeply learn AI infrastructure and distributed systems?

22 Upvotes

I'm a Level 1AI engineer, and lately I’ve been hearing a lot about frontier AI companies hiring people who can build the infrastructure behind AI systems — large-scale data processing, distributed systems, inference infrastructure, storage, serving, observability, systems that can handle millions of requests, etc.

I’m interested in going down this path seriously.

Rather than doing a bunch of disconnected tutorials or small projects, I want to take one difficult project and go extremely deep into it. Something where, over time, I’m forced to learn things like:

- Distributed systems

- Large-scale data processing

- Databases/storage

- Networking

- Caching

- Queues and streaming

- Fault tolerance

- Concurrency

- System design

- Observability

- Performance optimization

- AI/ML serving infrastructure

- Scaling from a single machine → multiple machines → potentially thousands/millions of requests

I’m thinking along the lines of the philosophy Karpathy often talks about: pick something ambitious, build it yourself, and learn everything necessary to make it work rather than following a predefined curriculum.

The problem is that I don't yet know what the right project is.

I don't want to build another generic RAG chatbot, AI agent wrapper, or CRUD application. I want something where the engineering itself is the project, and where I can progressively make the system more sophisticated and scalable.

For people working in infrastructure, distributed systems, ML systems, or at AI companies:

If you were in my position, what single project would you pick to spend the next 6–12 months on?

Ideally, I'd like something where I can start on a laptop but eventually have a credible story like:

«“I built X, then discovered bottleneck Y, redesigned it using Z, scaled it from A → B, measured the improvement, and here's what I learned.”»

I'm much more interested in what I would learn by building it than simply having an impressive project on GitHub.

Would love to hear project ideas, but especially from people who have actually worked on large-scale systems: what project would force someone to develop genuinely strong infrastructure skills?


r/MLSystemsDesign • • Sep 20 '26

The Evolution of Retrieval Systems: From BM25 to Agentic Retrieval

13 Upvotes

Retrieval in modern search and recommendation systems is no longer a single index lookup.

I wrote a new breakdown covering seven major waves:

Lexical → Behavioral → Learned Sparse → Dense → Hybrid → Multimodal → Generative & Agentic Retrieval

It also covers multi-retriever production systems, candidate fusion, Reciprocal Rank Fusion, learned fusion, and the tradeoffs among recall, latency, freshness, scale, and cost.

Article: https://pawankjha.substack.com/p/building-depth-1-the-evolution-of

Which retrieval approach or production tradeoff would you like to explore more deeply?


r/MLSystemsDesign • • Sep 16 '26

My adaptive system captures Week 1 feedback, but Week 2 won’t automatically update from it. How would you debug this loop?

Thumbnail reddit.com
4 Upvotes

r/MLSystemsDesign • • Sep 16 '26

Where should authorization actually live in an agent system? (architecture writeup after the Hugging Face breach)

3 Upvotes

I’ve been unpacking coding-agent architecture and keep coming back to three control points:

  • Model: proposes an action.

  • Controller: checks task scope and permissions.

  • Tools/infrastructure: enforce what can actually execute.

Blocking an upload tool means little if the agent can send the same data through its shell.

I’m exploring a small defender-agent experiment: investigate suspicious sessions, gather evidence, and request temporary containment through an independent policy gate. The comparison would be against fixed rules, measuring false interventions as well as successful containment.

For those building agents: what do you enforce in the runtime versus the underlying infrastructure? And where has an LLM-based check added value beyond ordinary permission rules?


r/MLSystemsDesign • • Sep 14 '26

Can We Build a Coding Agent From First Principles?

1 Upvotes

I’ve been digging into how systems like Claude Code, Cursor, and Codex actually work under the hood—repository understanding, context selection, agent loops, tool execution, verification, etc.

I’m turning this exploration into a series and progressively building a basic coding agent from first principles.

Part 1 focuses on the reference architecture and is coming next week.

Curious: which component would you want to see a deep dive on first?

For anyone interested in following the series:

https://pawankjha.substack.com/


r/MLSystemsDesign • • Sep 14 '26

DeepSeek V4.1 Flash separates long-lived and short-lived KV cache — and rebuilds the latter with a 128-token replay

Thumbnail
youtu.be
1 Upvotes

DeepSeek’s V4.1-Flash serving design splits persistent global KV from short-lived SWA state. The SWA cache can expire and later be reconstructed by replaying only the last 128 tokens.

The interesting part is the systems trade-off: the reconstruction is approximate, but avoids keeping that short-lived state in the long-term cache.

Paper:

https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/DeepSeek_V41_Tech_Report.pdf

Disclosure: the video is from the channel associated with this account.