Data & AI @SponsorUnited | IITK & Stanford Alumni | Stream of consciousness my own

Longmont, CO
Joined February 2012
“Brandfolder’s Machine Learning Platform” by Ajaykumar Rajasekharan medium.com/p/8b2cfd3b3dd2?so…
2
6
Ajaykumar retweeted
Such a beautiful way to express math to humans.
Navier-Stokes Equation, explained with colors p.migdal.pl/equations-explai…
5
139
1
2,039
76,789
Ajaykumar retweeted
Just took on the CTO role at Workday. Every enterprise is about to rebuild around agentic AI — and with Workday serving as the system of record for people and money across the Fortune 500, I’m focused on building the rails that make AI safe, compliant, and real. Stay tuned 😀
83
15
4
523
200,834
The (true) story of development and inspiration behind the "attention" operator, the one in "Attention is All you Need" that introduced the Transformer. From personal email correspondence with the author @DBahdanau ~2 years ago, published here and now (with permission) following some fake news about how it was developed that circulated here over the last few days. Attention is a brilliant (data-dependent) weighted average operation. It is a form of global pooling, a reduction, communication. It is a way to aggregate relevant information from multiple nodes (tokens, image patches, or etc.). It is expressive, powerful, has plenty of parallelism, and is efficiently optimizable. Even the Multilayer Perceptron (MLP) can actually be almost re-written as Attention over data-indepedent weights (1st layer weights are the queries, 2nd layer weights are the values, the keys are just input, and softmax becomes elementwise, deleting the normalization). TLDR Attention is awesome and a *major* unlock in neural network architecture design. It's always been a little surprising to me that the paper "Attention is All You Need" gets ~100X more err ... attention... than the paper that actually introduced Attention ~3 years earlier, by Dzmitry Bahdanau, Kyunghyun Cho, Yoshua Bengio: "Neural Machine Translation by Jointly Learning to Align and Translate". As the name suggests, the core contribution of the Attention is All You Need paper that introduced the Transformer neural net is deleting everything *except* Attention, and basically just stacking it in a ResNet with MLPs (which can also be seen as ~attention per the above). But I do think the Transformer paper stands on its own because it adds many additional amazing ideas bundled up all together at once - positional encodings, scaled attention, multi-headed attention, the isotropic simple design, etc. And the Transformer has imo stuck around basically in its 2017 form to this day ~7 years later, with relatively few and minor modifications, maybe with the exception better positional encoding schemes (RoPE and friends). Anyway, pasting the full email below, which also hints at why this operation is called "attention" in the first place - it comes from attending to words of a source sentence while emitting the words of the translation in a sequential manner, and was introduced as a term late in the process by Yoshua Bengio in place of RNNSearch (thank god? :D). It's also interesting that the design was inspired by a human cognitive process/strategy, of attending back and forth over some data sequentially. Lastly the story is quite interesting from the perspective of nature of progress, with similar ideas and formulations "in the air", with a particular mentions to the work of Alex Graves (NMT) and Jason Weston (Memory Networks) around that time. Thank you for the story @DBahdanau !
132
973
145
6,641
865,724
People have too inflated sense of what it means to "ask an AI" about something. The AI are language models trained basically by imitation on data from human labelers. Instead of the mysticism of "asking an AI", think of it more as "asking the average data labeler" on the internet. Few caveats apply because e.g. in many domains (e.g. code, math, creative writing) the companies hire skilled data labelers (so think of it as asking them instead), and this is not 100% true when reinforcement learning is involved, though I have an earlier rant on how RLHF is just barely RL, and "actual RL" is still too early and/or constrained to domains that offer easy reward functions (math etc.). But roughly speaking (and today), you're not asking some magical AI. You're asking a human data labeler. Whose average essence was lossily distilled into statistical token tumblers that are LLMs. This can still be super useful ofc ourse. Post triggered by someone suggesting we ask an AI how to run the government etc. TLDR you're not asking an AI, you're asking some mashup spirit of its average data labeler.
546
1,781
476
13,079
1,805,610
Ajaykumar retweeted
Really enjoyed LinkedIn's report on what worked and what didn't when deploying LLM applications. 4 takeaways. 1. Structured outputs They chose YAML over JSON as the output format because YAML uses less tokens. Initially, only 90% of the outputs are correctly formatted YAML. They used re-prompting (asking the model to fix its YAML responses), which increased the number of API calls significantly. They then analyzed the common formatting errors, added those hints to the original prompt, and wrote an error fixing script. This reduced their errors to 0.01%.
11
160
14
1,105
158,214
KAN: Kolmogorov–Arnold Networks is a really elegant paper. It's refreshing to see that things worked by design rather than by accident in ML. I made a small KAN experiment comparing it to MLP and spline fitting. (notebook in comments!)
26
335
23
2,303
329,252
# CUDA/C++ origins of Deep Learning Fun fact many people might have heard about the ImageNet / AlexNet moment of 2012, and the deep learning revolution it started. en.wikipedia.org/wiki/AlexNe… What's maybe a bit less known is that the code backing this winning submission to the contest was written from scratch, manually in CUDA/C++ by Alex Krizhevsky. The repo was called cuda-convnet and it was here on Google Code: code.google.com/archive/p/cu… I think Google Code was shut down (?), but I found some forks of it on GitHub now, e.g.: github.com/ulrichstern/cuda-… This was among the first high-profile applications of CUDA for Deep Learning, and it is the scale that doing so afforded that allowed this network to get such a strong performance in the ImageNet benchmark. Actually this was a fairly sophisticated multi-GPU application too, and e.g. included model-parallelism, where the two parallel convolution streams were split across two GPUs. You have to also appreciate that at this time in 2012 (~12 years ago), the majority of deep learning was done in Matlab, on CPU, in toy settings, iterating on all kinds of learning algorithms, architectures and optimization ideas. So it was quite novel and unexpected to see Alex, Ilya and Geoff say: forget all the algorithms work, just take a fairly standard ConvNet, make it very big, train it on a big dataset (ImageNet), and just implement the whole thing in CUDA/C++. And it's in this way that deep learning as a field got a big spark. I recall reading through cuda-convnet around that time like... what is this :S Now of course, there were already hints of a shift in direction towards scaling, e.g. Matlab had its initial support for GPUs, and much of the work in Andrew Ng's lab at Stanford around this time (where I rotated as a 1st year PhD student) was moving in the direction of GPUs for deep learning at scale, among a number of parallel efforts. But I just thought it was amusing, while writing all this C/C++ code and CUDA kernels, that it feels a bit like coming back around to that moment, to something that looks a bit like cuda-convnet.
121
839
99
6,818
1,023,386
Just read Apple's "OpenELM: An Efficient Language Model Family with Open-source Training and Inference Framework". Similar to the OLMo, it's refreshing to see an LLM paper that shares details discussing the architecture, training methods, and training data. Let's start with the most interesting tidbits: - OpenELM comes in 4 relatively small and convenient sizes: 270M, 450M, 1.1B, and 3B - OpenELM performs slightly better than OLMo even though it's trained on 2x fewer tokens - The main architecture tweak is a layer-wise scaling strategy Sharing details is not the same as explaining them, which is what research papers were aimed to do when I was a graduate student. For instance, they sampled a relatively small subset of 1.8T tokens from various publicly available datasets (RefinedWeb, RedPajama, The PILE, and Dolma). This subset was 2x smaller than Dolma, which was used for training OLMo. What was the rationale for this subsampling, and what were the criteria? The layer-wise scaling strategy (adopted from the "DeLighT: Deep and Light-weight Transformer" paper) is very interesting. I wish there was an ablation studio training an LLM with and without this strategy on the same dataset. But those experiments are expensive, and I can understand why they didn't do it. An interesting bonus that I didn't expect was that the researchers compared LoRA and DoRA (which I discussed a few weeks ago) for parameter-efficient finetuning! It turns out that there wasn't a noticeable difference between the two methods, though. Anyways, great work, and big kudos to the researchers (and Apple) for sharing!
7
180
5
855
82,339
Code is largely worthless, more of a liability than an asset. Problem-solving is where the value is.
21
140
25
1,122
75,015
Ajaykumar retweeted
Replying to @yishan @ESYudkowsky
Again, I will say this: any time you see a comedic large-scale error by AI, it is evidence that we do not know how to align and control it, that we are not even close.
23
139
14
1,226
119,201
This video was generated by Sora. That's the new model by OpenAI. The most advanced text-to-video tool created so far. I'll share the videos here. Absolutely insane. Prompt: This close-up shot of a Victoria crowned pigeon showcases its striking blue plumage and red chest. Its crest is made of delicate, lacy feathers, while its eye is a striking red color. The bird’s head is tilted slightly to the side, giving the impression of it looking regal and majestic. The background is blurred, drawing attention to the bird’s striking appearance.
734
2,262
4,094
16,505
17,039,168
Ajaykumar retweeted
Gemini 1.5 Pro - A highly capable multimodal model with a 10M token context length Today we are releasing the first demonstrations of the capabilities of the Gemini 1.5 series, with the Gemini 1.5 Pro model. One of the key differentiators of this model is its incredibly long context capabilities, supporting millions of tokens of multimodal input. The multimodal capabilities of the model means you can interact in sophisticated ways with entire books, very long document collections, codebases of hundreds of thousands of lines across hundreds of files, full movies, entire podcast series, and more. Gemini 1.5 was built by an amazing team of people from @GoogleDeepMind, @GoogleResearch, and elsewhere at @Google. @OriolVinyals (my co-technical lead for the project) and I are incredibly proud of the whole team, and we’re so excited to be sharing this work and what long context and in-context learning can mean for you today! There’s lots of material about this, some of which are linked to below. Main blog post: blog.google/technology/ai/go… Technical report: “Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context” goo.gle/GeminiV1-5 Videos of interactions with the model that highlight its long context abilities: Understanding the three.js codebase: youtube.com/watch?v=SSnsmqIj… Analyzing a 45 minute Buster Keaton movie: youtube.com/watch?v=wa0MT8Ow… Apollo 11 transcript interaction: youtube.com/watch?v=LHKL_210… Starting today, we’re offering a limited preview of 1.5 Pro to developers and enterprise customers via AI Studio and Vertex AI. Read more about this on these blogs: Google for Developers blog: developers.googleblog.com/20… Google Cloud blog: cloud.google.com/blog/produc… We’ll also introduce 1.5 Pro with a standard 128,000 token context window when the model is ready for a wider release. Coming soon, we plan to introduce pricing tiers that start at the standard 128,000 context window and scale up to 1 million tokens, as we improve the model. Early testers can try the 1 million token context window at no cost during the testing period. We’re excited to see what developer’s creativity unlocks with a very long context window. Let me walk you through the capabilities of the model and what I’m excited about!
177
1,125
485
5,974
1,684,294
It’s been a crazy few days which have been filled with a whole range of emotions. But as you all now know, after an incredible 11 years at Mercedes-AMG PETRONAS F1 Team, the time has come for me to start a new chapter in my life and I will be joining Scuderia Ferrari in 2025. I feel incredibly fortunate, after achieving things with Mercedes that I could only have dreamed of as a kid, that I now have the chance to fulfil another childhood dream. Driving in Ferrari red. Mercedes has been a huge part of my life since I was 13 years old, so this decision has been the hardest I’ve ever had to make. I’m incredibly proud of all that we’ve achieved together and I’m very grateful for the hard work and dedication of everyone I have worked with over the years and of course Toto, for his friendship, guidance and leadership. Together we have won titles, broken records and become the most successful Driver-Team partnership in F1 history. And of course I cannot forget Niki who was a huge supporter and who I still miss everyday. I must also share my huge appreciation to the whole of the Mercedes-Benz board and everyone at the company in Germany and around the world for supporting me over these 26 years. But the time is right to make a change and take on a new challenge. I still remember the feeling of taking a leap of faith into the unknown when I first joined Mercedes in 2013. I know some people didn’t understand it at the time but I was right to make the move then and it's the feeling I have again now. I’m excited to see what I can bring to this new opportunity and what we can do together. However, right now, I’m not thinking about 2025. My focus is on the upcoming season and getting back out on track with Mercedes. I am more driven than ever, I am fitter and more focussed than than ever and I want to help Mercedes win once again. I am 100% committed to the job I need to do and determined to end my partnership with the team on a high. Thank you to all of you who have been on this journey with me, you have all lifted me up as I chase my dreams and I hope I can continue to make you proud. As always, sending you my love and positive energy.
5,556
33,954
6,698
220,178
10,570,360
Ajaykumar retweeted
100%. Larry & Sergey always knew 10 blue links were merely a waypoint en route to answers. But as query growth slowed - ad load increased - and the machine gushed $$. Now the whole $GOOG machine is geared to more paid clicks - which must actually be attacked to win at answers. If I were @sama I might change the name of the company to ChatGPT and singularly focus on winning the consumer prize en route to AGI - leave the enterprise to $MSFT. The battle to be my trusted assistant / my answer engine - is a multi trillion prize. Unless you see another way? #innovatorsdilemma. @BG2Pod
Using both ChatGPT and Google in parallel has shown me what percent of the time I'm looking for an answer rather than a resource of some kind, and the result looks bad for Google. I'm almost always looking for answers.
42
37
5
533
356,139
😓 What are seven of the top failure points that occur when engineering a RAG system? 1⃣ Missing Content The first fail case is when asking a question that cannot be answered from the available documents. In the happy case the RAG system will respond with something like “Sorry, I don’t know". However, for questions that are related to the content but don’t have answers the system could be fooled into giving a response. 2⃣ Missed the Top Ranked Documents The answer to the question is in the document but did not rank highly enough to be returned to the user. In theory, all documents are ranked and used in the next steps. However, in practice the top K documents are returned where K is a value selected based on performance. 3⃣ Not in Context - Consolidation Strategy Limitations Documents with the answer were retrieved from the database but did not make it into the context for generating an answer. This occurs when many documents are returned from the database and a consolidation process takes place to retrieve the answer. 4⃣ Not Extracted Here the answer is present in the context, but the large language model failed to extract out the correct answer. Typically, this occurs when there is too much noise or contradicting information in the context. 5⃣ Wrong Format The question involved extracting information in a certain format such as a table or list and the large language model ignored the instruction. 6⃣ Incorrect Specificity The answer is returned in the response but is not specific enough or is too specific to address the user’s need. This occurs when the RAG system designers have a desired outcome for a given question such as teachers for students. In this case, specific educational content should be provided with answers not just the answer. Incorrect specificity also occurs when users are not sure how to ask a question and are too general. 7⃣ Incomplete Answers Incomplete answers are not incorrect but miss some of the information even though that information was in the context and available for extraction. An example question such as “What are the key points covered in documents A, B and C?” A better approach is to ask these questions separately. 📄 Paper: arxiv.org/abs/2401.05856
11
59
4
264
52,967
Ajaykumar retweeted
It is only rarely that, after reading a research paper, I feel like giving the authors a standing ovation. But I felt that way after finishing Direct Preference Optimization (DPO) by @rm_rafailov @archit_sharma97 @ericmitchellai @StefanoErmon @chrmanning and @chelseabfinn. This beautiful paper proposes a much simpler alternative to RLHF (reinforcement learning from human feedback) for aligning language models to human preferences. RLHF has been a key technique for training LLMs. In brief, RLHF (i) Gets humans to specify their preferences by ranking LLM outputs, (ii) Trains a reward model (used to score LLM outputs) -- typically represented using a transformer network -- to be consistent with the human rankings, (iii) Uses reinforcement learning to tune an LLM, also represented as a transformer, to maximize rewards. This requires two transformer networks, and RLHF is also finicky to the choice of hyperparameters. DPO simplifies the whole thing. Via clever mathematical insight, the authors show that given an LLM, there is a specific reward function for which that LLM is optimal. DPO then trains the LLM directly to make the reward function (that’s now implicitly defined by the LLM) consistent with the human rankings. So you no longer need to deal with a separately represented reward function, and you can train the LLM directly to optimize the same objective as RLHF. Although it’s still too early to be sure, I am cautiously optimistic that DPO will have a huge impact on LLMs and beyond in the next few years. You can read the paper here: arxiv.org/abs/2305.18290 I also write more about this in The Batch (linked to below). deeplearning.ai/the-batch/is…
48
745
78
4,982
696,164
I'd like to start 2024 with some thoughts on the state of optimization theory. To begin with, let me quote Nesterov's 2003 book: "The main fact, which should be known to any person dealing with optimization models, is that, in general, the optimization problems are unsolvable" 🧵
3
67
3
402
86,705
An explanation for why GPT-4 is degrading: "... we find that on datasets released before the LLM training data creation date, LLMs perform surprisingly better than on datasets released after" New tasks are difting away from what GPT-4 was trained on.
43
355
88
2,257
766,115
Run Mixtral-8x7B models in Free colab or smallish GPUs like a 3060. Quite a big achievement for low-resource Inferencing indeed. It relies upon parameter offloading algorithms that accelerates offloading by taking advantage of innate properties of MoE LLMs. This technique works by loading model parameters just-in-time when they are needed for computation. Since most deep learning models use layers in a fixed order, offloading can pre-dispatch the next layer parameters in the background, ahead of time. As per the paper - "Mixture-of-Experts language models were often observed to assign individual experts to distinct sub-tasks. However, this does not mean that the model uses the same expert over long stretches of tokens. Instead, some experts are active in short sequences of 2-4 tokens, while others are often used with “gaps”. To take advantage of this pattern, we can keep active experts in GPU memory as a “cache” for future tokens. If the same experts are activated again in future, they will be available instantaneously. Naturally, the number of experts that can be stored this way if very limited by the available GPU memory. For simplicity, we choose to always keep k least recently used experts as a type of LRU cache. If k is greater than the number of active experts, the cache will save experts from multiple previous tokens." However, need to note - Even if you can perfectly predict which experts to preload, you still have to preload them. That means you're bottlenecked by PCIe bandwidth, which is considerably worse than being bottlenecked by RAM speeds.
7
78
6
358
98,748
“Read enough, and you become a connoisseur. Then you naturally gravitate more towards theory, concepts, non-fiction”, says Naval Ravikant. The genuine love for reading itself, when cultivated, is a superpower. 25 books recommended by @naval 🧵
94
1,715
61
8,898
1,748,914