Mohamed (@mohammad2012191) header
Mohamed (@mohammad2012191) profile picture

وماذا عليك لو ذهبوا هُم بالدنيا، وأنتَ ذهبت بالقرآن؟ | AI Researcher @ KAUST - Kaggle Competitions Master (Highest Rank: 236th in the World)

Joined October 2013
Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)Photo by Mohamed (@mohammad2012191)
Mohamed retweeted
Hi all, I have a new result I'm excited to share. It turns out that *all existing implementations* of softmax and cross-entropy (that's JAX, PyTorch, textbooks, etc) have a subtle bug --- two bugs, actually. A simple rewrite fixes both, and eliminates "slingshots" when grokking:
135
796
153
6,571
840,780
1/9 Current optimizers are static during training. What if the optimizer could think and react while the network trains? We let an agent watch the training dynamics and rewrite the optimizer's source code as training goes: a reactive optimizer. In every language and image setting we tried that has no tuned recipe, it matches or beats the best recipe one can one-shot, and it guards against loss spikes and overfitting by itself. In the near future, optimization decisions may belong to agents, not humans. 📝 xingjianbai.com/reactive-opt… 💻 Try it on your task: github.com/xingjian-bai/opal 🧵
78
204
70
1,558
218,763
1/ During OLMo3-32B pre-training, accuracy on an arithmetic diagnostic hits 81% at 2.17T tokens, collapses to 0% at 2.19T, and jumps back to 81.7% at 2.21T. All while validation loss decreases smoothly. The phenomenon: mode-hopping. 🧵
6
33
5
229
16,090
#KostasThoughts: Seeing your former trainees succeed in life after the lab is incredibly rewarding.
1
2
46
3,532
The vectors of late interaction models are highly redundant and it also has an exploitable geometry So why not learn a decoder to exploit it and regenerate the original vectors from a set of pooled ones? It allows to store only a small part of the vectors, use them to generate candidate and then decode to rerank! I think it starts to bridge the gap between ColBERT and MICE (cc @_VictorMorand_) and it is definitely a nice avenue!
🚨 New preprint GLIE: Generative Late-Interaction Embeddings for Visual Document Retrieval 🔵 TL;DR: Late-interaction retrievers store ~1,000 vectors per page. Turns out those ~1,000 vectors have only ~5 degrees of freedom, so a handful of stored vectors plus a tiny shared decoder can carry a page. So: store those projected vectors, use them as an index, and regenerate the full embedding set for the top candidates only, then rerank :)
2
6
71
4,967
Mohamed retweeted
Generative Late-Interaction Embeddings for Visual Document Retrieval Compresses multi-vector document embeddings to a few per page via a learned code that regenerates the full set for reranking, beating prior compression without retraining the encoder. 📝arxiv.org/abs/2609.11808
1
9
2
66
5,225
Mohamed retweeted
This is notable. DeepSeek, a lab usually first to pioneer novel algorithms and architectures, is saying that at this point, the ROI of improving data quality far exceeds that of working on novel post-training algorithms. I think this has already been true for some time for non-lab practitioners. If you're doing llm post-training, 80% of your effort should go into looking at your data. This means: - Hiring experts to dig through your RL tasks - Sifting through rollouts and sft data by hand to remove suspicious samples. Make sure all tasks are actually passable. - Making sure your data is diverse in both difficulty and category.
🚀 Introducing DeepSeek-V4.1-Flash: smarter, faster, more efficient. 🔹 Introducing the smallest model in our new architecture family, with native visual understanding. 🔹 Designed for greater capability, faster inference, higher throughput, and scaling to larger models. 1/6
56
150
50
1,727
218,879
So K3, with one simple question: how do you even train a 3T parameters model? Even though the paper is not out, there is enough public information to get a relatively consistent picture. Just piling on experts won't make an economically viable model. What worked and made training and inference business profitable is highly sparse models with high-margin: initial investment in compute infrastructure is recouped through expert parallelism. Now as you get way beyond 1T parameters, you start running into physical limits of the available infrastructure. 896 experts won't fit on one node, even when only 16 are activated at generation time, you need to start splitting weights and latency starts to leak on all sides. First, K3 is a LatentMoE. The technique is not invented by Moonshot but by Nvidia (arxiv.org/pdf/2601.18089) and it's fundamentally a communication trick: instead of routing on the full hidden state, we down-projec, route, run the experts in that latent space, and up-project back. It's a fixed cost so that you can grow an indefinite amount of experts and still bound communication and bandwith. Now the critical part: Nvidia approach was focused on inference and Moonshot's approach is a *Stable* LatentMoE oriented toward training. Extreme sparsity means that each expert sees very few tokens per batch: this new stable implementation seems to fix the load-balancing estimator getting incredibly noisy as sparsity grows. Quantile balancing addresses a common MoE equilibrium issue that becomes explosive: some experts are too popular, too many token gets routed to them and then other experts just have to wait, idle and starving. K3's announcement explicitly said they anticipated expert paralllelism at inference time as a shaping training constraints. With current loading methods, we don't know how many tokens each expert got until they're routed, so buffers can't be sized ahead and you need a host round-trip to find out. Instead quantile loading maximizes total routing score subject to each expert taking exactly mk/n tokens. Roughly, each expert takes exactly its quota by constructio, then every buffer is known at compile time and the sync disappears. Attention Residuals seems to be fundamentally a depth trick already published by MoonShot but never validated at scale (the AttnRes paper only trains at 48B). Attention is pointed at layers instead of tokens. Normally every layer dumps its output onto a shared pile (the residual stream) and every later layer reads the whole pile back, everything added with equal weight. AttnRes lets each layer attend over the earlier layers and pull out what it actually wants. Same shape of deal as LatentMoE: a small fixed cost, under 5% overhead for about 25% of the gain. DeepSeek's mHC went in a similar direction by widening the residual stream until it is effectively doing attention across layers, except implicitly, through a chain of matrix products that can explode or collapse, which is why mHC needs sigmoids and doubly-stochastic normalization to hold it together. AttnRes doesn't fix that machinery, it avoids needing it: write the attention explicitly and softmax gives you the guarantees for free. We have much less information at this stage about the other new components (head muon, gated MLA, SiTU (though last one is likely needed for MXFP4?). Yet they all seem to proceed from the same philosophy shared by Su Jianlin in an April post (kexue.fm/archives/11729): "small-model-safe does not mean big-model-safe". Neither LatentMoE or Quantile Balancing made already much sense at smaller scale. They are becoming an integral part of the training and inference stack as we move up to an entirely different dimension of scaling and infrastructure deployment.
10
69
9
743
82,550
Mohamed retweeted
Continual learning is widely discussed right now, but mostly as improving on the job or avoiding catastrophic forgetting. But it has a different, difficult, and already urgent form: Given nothing but a corpus of documents, how should AI systems develop expertise in a new, unfamiliar domain? We call this problem Machine Studying.
17
120
25
752
216,905
Mohamed retweeted
wrote my answers for this rl interview questions 2026 list here: app.notion.com/p/RL-Intervie… the questions were genuinely good. most of my time went into just staring at the wall and thinking through the answers properly 😅 kept the notion doc open with comments too, so feedback/corrections are very welcome if i’ve explained something wrong anywhere. raw/unfiltered notes for now -- spelling mistakes included, bear with me 😅 and setup was something like a split tab bw notion and x article
4
24
1
340
33,747
Recently met @srush_nlp and he started giving me an impromptu lecture on how targeted on-policy self-distillation works. I asked him if I could record it on my iPhone. The basic idea is this: if the model made a mistake at some point in the rollout (for example, calling a tool that doesn't exist), we want to discourage this specific error, but we don't want to just learn from the final reward, because it's a very noisy signal spread out over the whole trajectory. So we have another model read this trajectory and figure where the error was made. It simply inserts some hint tokens to the part of the trajectory right above where the mistake was made. Now with these injected hint tokens, have the model run a forward pass. You're not having to regenerate a new rollout - aka no new decode required. The hint causes the model to assign lower probabilities to the error tokens. You then trains the original model to match these new probabilities, teaching it to downweight that specific mistake.
42
175
38
2,553
431,992
probably the best reward function for reasoning efficiency i've seen
Replying to @eliebakouch
length penalty is very elegant and simple tbh
18
13
2
319
35,692
Insightful work! ARC-AGI is really more of a vision or representation problem than a reasoning problem that requires step-by-step thinking. The success of HRM and TRM depends heavily on the 500M learned puzzle embeddings stored in `nn.Buffer` for each separate task. These embeddings essentially store task-specific representations, without which 7M/27M backbone will fail completely. Another evidence comes from the dynamics of the learned computation steps assigned by the Adaptive Computation head. ARC and Sudoku exhibit very different behaviors. - On ARC, the number of steps smoothly collapses to nearly 1 - whereas on Sudoku, the drop in steps shows a transition between two stages, with different slopes.
Excited to share our CVPR 2026 paper, ARC Is a Vision Problem! 🖼️ The Abstraction and Reasoning Corpus (ARC) is often approached as a language reasoning problem, despite being an inherently visual puzzle for humans. 🧩Introducing Vision ARC (VARC)🧩: we reframe abstract reasoning as an image-to-image translation problem, solved by a plain Vision Transformer.
2
7
1
55
10,932
Local minima are rare in high dimensions because a strict local minimum has to curve upward in every direction, so all Hessian eigenvalues must be positive. In a D-dimensional toy model where eigenvalue signs are independent, that’s a 2^(-D) event. In GOE-like random matrix models, positive definiteness is even rarer, roughly exp(-cD^2). So as dimension grows, random critical points are much more likely to be saddles than minima. This is one reason high-dimensional optimization is often a saddle-escape problem, not a bad-local-minimum problem. Wrote up some of the math here: grantstenger.com/local-minim…
the greatest whitepill of all is that local minima are rare in high dimensional spaces
35
193
18
2,300
337,993
Mohamed retweeted
the broader implication is that there's abandoned architecture research from before Muon that failed because the empirical optimizers that worked in practice were, both literally and conceptually, stuck in element-wise local minima
For me, the coolest finding is that Muon optimizer is crucial for Parallax to move beyond Softmax Attention. Lesson — don't evaluate new architectures solely under AdamW, you'll miss the good ones. paper: arxiv.org/abs/2605.29157 code: github.com/Yifei-Zuo/Paralla… For the origin of Parallax, check out the LLA paper at ICLR 2026: paper: arxiv.org/abs/2510.01450 code: github.com/Yifei-Zuo/FlashLL…
9
21
2
301
40,416
Late-interaction retrieval is incredibly powerful, but scaling it is computationally challenging. k-means is a huge bottleneck. Our new architecture, TACHIOM, is fully open-source and tackles this problem: up to 247x faster clustering and 9.8x faster retrieval. ⚡ 🧵👇
3
23
2
118
9,032
Mohamed retweeted
Would you like to join the research effort on JEPA and World Models easily? After a full year of hard work, we’re excited to finally release stable-worldmodel: an open-source, scalable platform built to accelerate JEPA & World Model research! 📄: github.com/galilai-group/sta…
42
275
15
1,836
120,479