The Code/X ArchiveView on X
karan

@karancl

the single greatest project you should do if you are trying to become better at ai systems is to take an open weights model and build the entire production system around it. do this by yourself and watching tutorials only when needed.
1. take a pretrained model and understand its inference path. this will help you learn what computational work happens for every token that is generated.
2. build an inference server. put your model behind something like vllm/sglang. then expose it through and api, handle multiple users
3. understand why inference is fast or slow. learn about batching, kv cache, quantization, gpu memory, scheduling, and the tradeoff between speed, cost, and quality.
4. build the backend around the model. add users, login, chat history, databases, caching, request limits, error handling, and basic security.
5. build a simple chat product around it. create a frontend where users can start conversations, send messages, receive streamed responses, and manage their chat history.
6. give the model access to outside knowledge. build a simple rag system that can load documents, retrieve relevant information, and give that information to the model before it answers.
7. give the model the ability to take actions. add tool calling so it can use apis, search, databases, or other functions. then build a simple agent loop around these tools.
8. build evaluation and monitoring. measure answer quality, retrieval quality, latency, errors, token usage, gpu usage, and cost. make sure you can tell when a change makes the system better or worse.
9. make the system reliable and safe. learn about authentication, rate limits, retries, timeouts, failures, data isolation, prompt injection, and safe tool use.
10. deploy the whole system. run it on a cloud gpu, containerize it, and learn how the different parts communicate with each other in production.
11. test it under real load. send many requests at the same time, find the bottlenecks, and learn how to improve throughput, latency, gpu usage, and cost.
12. scale it. move from one model server to multiple servers and eventually learn multi-gpu and distributed inference.
13. automate the whole lifecycle. add testing, model versions, evaluation before deployment, automatic deployment, monitoring, and rollback.
14. keep improving the system. whenever you find a bottleneck, don't immediately watch a tutorial. first understand the problem, form a hypothesis, test it, and only then look for outside help if you are stuck.

this isn't meant to be built in two weeks and will take you months to build depending on your understanding of software engineering. but this has by far been my steepest learning curve in a project coming from a core ml background.
401722.3K3.8K