Afaque (@afaqueumer) header
Afaque (@afaqueumer) profile picture

ML Engineer 🧑‍💻 | AI Enthusiast 🤖 | ✍️ ➡️ https://nitter.cf/t.co/0ZJS5txWw6 | #Python #DataScience #MachineLearning #MLOps

Joined August 2022
me every time I buy a new laptop 😁
25
29
4
535
19,211
Afaque retweeted
This is what your soul needs, not Dubai.
1,505
8,343
766
63,317
2,389,862
The 2026/27 UEFA Champions League has officially begun 💙
163
1,163
91
16,181
1,100,795
Afaque retweeted
Jose Mourinho ball, enjoy.
34
691
40
10,347
224,933
Afaque retweeted
They made a 13 min short movie on Argentina's failed robbery attempt vs Spain 😭😭😭😭😭😭
2,212
52,124
3,100
289,854
6,435,611
Here we go again. VAR and the rule book are being used selectively and always to favor Argentina. To top it off, Messi gets to reprimand referees.
458
2,259
80
9,682
189,720
Afaque retweeted
Replying to @goal
Here's 4+ mins of these BS refs letting ARG slide.
1
10
642
I packaged up the "autoresearch" project into a new self-contained minimal repo if people would like to play over the weekend. It's basically nanochat LLM training core stripped down to a single-GPU, one file version of ~630 lines of code, then: - the human iterates on the prompt (.md) - the AI agent iterates on the training code (.py) The goal is to engineer your agents to make the fastest research progress indefinitely and without any of your own involvement. In the image, every dot is a complete LLM training run that lasts exactly 5 minutes. The agent works in an autonomous loop on a git feature branch and accumulates git commits to the training script as it finds better settings (of lower validation loss by the end) of the neural network architecture, the optimizer, all the hyperparameters, etc. You can imagine comparing the research progress of different prompts, different agents, etc. github.com/karpathy/autorese… Part code, part sci-fi, and a pinch of psychosis :)
1,042
3,569
1,136
28,103
11,188,472
🚨 Anthropic dropped a FREE 33-page playbook revealing Claude's very own cheat code: The 'Skills' folder. Spend 30 minutes building it, and you’ll never have to explain your process again. Top-tier users don't just type commands, they build systems. Playbook link in 🧵↓
35
363
7
2,741
336,843
Fusion of 𝗥𝗔𝗚 (Retrieval Augmented Generation) and 𝗖𝗔𝗚 (Cache Augmented Generation). You must understand fundamentals behind this architecture to save costs and reduce your system latency efficiently. So how can you benefit from it as AI Engineer? Let’s see what it looks like and what additional considerations should be taken into account. Here are example steps to implement CAG + RAG architecture: 𝘋𝘢𝘵𝘢 𝘗𝘳𝘦𝘱𝘳𝘰𝘤𝘦𝘴𝘴𝘪𝘯𝘨: 𝟭. We use only rarely changing data sources for Cache Augmented Generation. On top of the requirement of data changing rarely we should also think about which of the sources are often hit by relevant queries. Once we have this information, only then we pre-compute all of this selected data into a KV Cache of the LLM. Cache it in memory. This only needs to be done once, the following steps can be run multiple times without recomputing the initial cache. 𝟮. For RAG, if necessary, precompute and store vector embeddings in a compatible database to be searched later in step 4. Sometimes simpler data types are enough for RAG, a regular database might suffice. 𝘘𝘶𝘦𝘳𝘺 𝘗𝘢𝘵𝘩: We can now utilise the preprocessed data. 𝟯. Compose a prompt including user query and the system prompt with instructions on how cached context and retrieved external context should be used by the LLM. 𝟰. Embed a user query to be used for semantic search via vector DBs and query the context store to retrieve relevant data. If semantic search is not required, query other sources, like real time databases or web. 𝟱. Enrich the final prompt with external context retrieved in step 4. 𝟲. Return the final answer to the user. 𝘚𝘰𝘮𝘦 𝘊𝘰𝘯𝘴𝘪𝘥𝘦𝘳𝘢𝘵𝘪𝘰𝘯𝘴: ➡️ Context window is not infinite and even while some models boast enormous context window sizes, the needle in the haystack problem has not yet been solved so use available context wisely and cache only the data you really need. ✅ For some business cases, specific datasets are extremely valuable to be passed to the model as cache. Think about an assistant that has to always comply with a lengthy set of internal rules stored in multiple documents. ✅ While CAG has been popularised for Open Source just recently, it is already viable for some time via Prompt Caching features in OpenAI and Anthropic APIs. It is really easy to start prototyping there. ✅ You should always separate hot and cold data sources, only use cold (data that changes rarely) in your cache, otherwise the data will go stale and the application will go out of sync. ❌ Be very careful about what you cache as the data will be available for all users to query. ❌ It is very hard to ensure RBAC for cached data unless you have a separate model with its own cache per role. Have you used the combination already?
15
62
4
282
12,607
If you're a software engineer who wants to upskill in system design, read these 14 articles (links below):
51
795
21
6,156
437,972
A small Qwen3.5 from-scratch reimplementation for edu purposes: github.com/rasbt/LLMs-from-s… (probably the best "small" LLM today for on-device tinkering)
44
498
13
3,073
153,373
Neural networks and machine learning, visualized
84
756
53
5,740
366,826
The video i watched at 9 AM for 9 days
24
1,103
19
6,593
273,909
The Interior dream of every real football fan
183
1,630
176
12,203
1,375,160
OpenAI, Google, and Anthropic just published guides on: • Prompt engineering • Building agents • AI in business • 601 AI use cases 9 of the best guides you can't miss:
38
287
8
1,558
128,742
"Context Engineering for Multi-Agent Systems: Move beyond prompting to build a Context Engine, a transparent architecture of context and reasoning" — at amzn.to/448dSiA v/ @PacktDataML 𝓦𝓱𝓪𝓽 𝓨𝓸𝓾 𝓦𝓲𝓵𝓵 𝓛𝓮𝓪𝓻𝓷: 🔵Develop memory models to retain short-term and cross-session context 🟣Craft semantic blueprints and drive multi-agent orchestration with MCP 🟠Implement high-fidelity RAG pipelines with verifiable citations 🟡Apply safeguards against prompt injection and data poisoning 🔵Enforce moderation and policy-driven control in AI workflows 🟣Repurpose the Context Engine across legal, marketing, and beyond 🟠Deploy a scalable, observable Context Engine in production
2
24
143
6,179
The LLM Engineering Roadmap. If you want to start today, here's the roadmap👇 1️⃣ LLM Foundations Start by understanding Python and LLM APIs and how they work. Learn prompt engineering, structured outputs, and tool use. ↳ Python/Typescript Basics ↳ LLM APIs ↳ Prompt Engineering ↳ Structured Outputs ↳ Function Calling 2️⃣ Vector Stores Before building anything, you need to understand how text becomes vectors. Learn embedding models, chunking strategies, and similarity search. ↳ Embedding Models (OpenAI Ada, Cohere, BGE) ↳ Vector Databases (Pinecone, Qdrant, ChromaDB, FAISS) ↳ Chunking Strategies ↳ Similarity Search 3️⃣ Retrieval-Augmented Generation (RAG) This is how LLMs answer questions using your data. You learn how to retrieve context and feed it correctly. ↳ Orchestration Frameworks (LangChain, LlamaIndex) ↳ Ingesting Documents ↳ Retrieval Methods (Dense, BM25, Hybrid) ↳ Reranking ↳ Prompt Templates 4️⃣ Advanced RAG This steps helps you understand how to make RAGs reliable and accurate. ↳ Query Transformation ↳ HyDE ↳ Corrective RAG ↳ Self-RAG ↳ Graph RAG 5️⃣ Fine-Tuning Sometimes prompts are not enough for a specialised use case. Fine-tuning will help you understand how models learn domain-specific behaviour. ↳ Data Preparation ↳ LoRA, QLoRA, DoRA ↳ SFT, DPO, RLHF ↳ Training Tools (Unsloth, Axolotl, HF TRL) 6️⃣ Inference Optimization Once systems work, they need to be fast and affordable. This step focuses on learning performance and cost efficiency. ↳ Quantization (GGUF, GPTQ, AWQ) ↳ Serving Engines (vLLM, TGI, llama.cpp) ↳ KV Cache ↳ Flash Attention ↳ Speculative Decoding 7️⃣ Deployment Models are useless if they stay in notebooks. Here you learn how to ship LLM systems to users. ↳ GPU Scheduling ↳ Cloud Platforms (AWS Bedrock, GCP Vertex AI) ↳ Docker, Kubernetes ↳ FastAPI, Streaming (SSE) 8️⃣ Observability This step helps you track quality, latency, and cost. ↳ Tracing (LangSmith, Langfuse, Arize Phoenix) ↳ Latency (TTFT) ↳ Token Usage ↳ Cost Tracking 9️⃣ Agents Agents allows LLMs to plan and use tools. Learn them to understand how LLMs solve multi-step and complex tasks. ↳ Frameworks (LangGraph, CrewAI, Autogen) ↳ Function Calling ↳ Memory Systems ↳ Patterns (ReAct, Plan-and-Execute, Multi-Agent) 🔟 Production & Security Production LLM systems can fail in subtle ways. This step helps you prevent misuse, outages, and cost spikes. ↳ Prompt Injection Defense ↳ Guardrails (NeMo, Guardrails AI) ↳ Semantic Caching ↳ Fallbacks & Rate Limiting ♻️ Repost if you found this insightful Follow us for more AI engineering content!
23
226
8
1,064
51,965
Never doubt the power of small decisions:
28
476
24
2,019
111,491
Afaque retweeted
This Novak Djokovic piece by Billy Oppenheimer is one of the best I've ever read. "Days after a quarterfinals loss in the 2010 French Open, Novak Djokovic told his coach, Marian Vajda, that he had decided to quit playing tennis. He was No. 3 in the world, a grand slam winner, and a favorite to win Wimbledon. After Djokovic said he was quitting, Vajda asked, “Why did you start playing this sport?” Vajda immediately sensed what the problem was: Djokovic was focusing too much on rankings, records, titles, and external expectations. As a result, Djokovic said, “I was mentally at one very messed up place.” As Djokovic thought about Vajda’s question, he thought about how many of his earliest childhood memories include his “most beloved toy”—a mini tennis racket and a soft foam ball. He started playing tennis, answering Vajda’s question, “because I just really loved holding that racket in my hand.” “Do you still love holding a racket in your hand?” Vajda asked. Djokovic thought about it for a few seconds, got excited, and said: “I do. I still love holding a racket in my hand. Whether it’s a grand slam final on center court or just playing around on a public court, I like playing for the sake of playing.” Vajda nodded, “Well that’s your source. That's what you need to tap into. Put aside rankings and what you want to achieve and what you think others are expecting of you.” Vajda then suggested that Djokovic take a few weeks off. Djokovic agreed that he would. But when he woke up the next morning, Djokovic was dying to hit tennis balls. He went to the courts to play for the sake of playing. “And I never looked back ever since that moment.” The following season, Djokovic enjoyed one of the greatest seasons in sports history. He won 43 straight matches. He won three Grand Slams, including his first Wimbledon title. And he finished the year as the number one player in the world. “I started to play freely,” he says of that season. “I became the kid that I was when I started playing.” Takeaway 1: There's a word for being like the kid who does something for the sake of doing it: Autotelic. From the Greek "auto" (self) & "telos" (end)—an Autotelic is "someone or something that has a purpose in, and not apart from, itself." As opposed to someone who focuses on rankings, records, titles, and external expectations—for an Autotelic. ”The work is the win,” as Ryan Holiday once told me. Since you control the effort more than the outcome, “Ultimately, you have to love doing it,” Ryan said. “You have to get to a place where doing the work is the win and everything else is extra.” Takeaway 2: When reading about Autotelics—people who describe their work as play, who simply seem to love what they do—a common mistake is to think that it’s all bliss all the time. One of my favorite Autotelics is the legendary skateboarder Rodney Mullen, who is in his 50s and still skateboards every day. “There are days,” Rodney said, “where you don’t want to go out. Or it hurts. Or you’re sore. Or you just suck—you're not making progress, and you feel defeated...But that's the nature of love—it's got hate in there, it's got pain in there. And that’s what draws you in, that's the magnetism.” At one point during the recent Wimbledon final, Djokovic angrily smashed and shattered his racket. And after losing the match, he admitted that it will take him a while to get over the loss. That’s the nature of love—it’s got hate in there, it’s got pain in there."
36
267
22
2,361
250,660