# Workshop 23996

- Kind: Workshop
- Talk page and recording: https://iclr.cc/virtual/2025/workshop/23996

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Okay. Good morning everyone. So welcome to the Sparsian LLMs workshop. I'm happy to have you all here, and we have an exciting day ahead of us. Um so let's get started. So first I'd just like to introduce the organising committee. I'm gonna have the ones who are present to come up to the stage. Mostly so that you know who to find when you need somebody. So we all have these little oops, I've got it the wrong way around, so please come up. We all have these little stickers down here. So if you're trying to pull up a poster and there's any other issues, just try look for
and we'll be sure to try to help you. So we're all a diverse set of people from different backgrounds in industry and academia, from PhD student up to assistant professor and research scientist, and the one thing that unites us all is being interested in making atoms more efficient. So thank you. Okay, so speakers today, we have a great set of people speaking, so we're going to start off with Dan Allister.
And we have people from industry, of course, so we have IST, DENS from industry and academia. We have Cerebris, Meta, and DeepMind all giving talks. We'll have a panel session in the afternoon, and so we have a great set of panelists as well, again across academia and industry. We're looking forward to that. And just quickly go over the schedule. So the main thing to identify here is, of course, when the coffee breaks are. So coffee does just open at 10, by the way. I just checked.
No coffee until then, but make sure to get coffee at 10. We will have a set of orals. So these are invited talks from the various posters. We've chosen four orals from the various papers that were submitted to the workshop. And of course, invited talks. The lunch session will be both a lunch and mentoring session. So if you're in the mentoring group, either as a mentor or mentee, make sure to stick around and try to bring some food back here.
The panel will be just after lunch, and in the afternoon we will have a mentoring session and a break out session as well. So just some quick stats. Workshops don't always release stats, but I think it's kind of interesting go over. And so we got a lot of papers for this this workshop, and I was very happy to see the quality of the papers. We got some really amazing work. Um so do make sure check out the posters.
Out of 83 workshop submissions, we accepted 71 as papers. In terms of reviewers, we had 67 reviewers and it worked out to about two to three papers per reviewer. Of those, as I said, we selected four for orals. And in terms of mentors, we've had 13 people volunteer to be mentors and we have 27 mentees.
So I just want to thank all the reviewers and the mentors for volunteering. They really are the people who make this workshop possible and ensure that we have great quality submissions. Okay, poster instructions. So this is probably the most complex part of this. So first thing to highlight is that ICLEAR organizers have made it clear we have to emphasize that you can only put up your posters with this special blue tape that we have.
Who has the blue tape? Shuwei could just... This is the one tape to rule them all. Do look for this tape. This is the tape you have to put your poster up with. Don't use anything else to put it on because apparently anything else can damage the poster boards quite easily. Now there are two poster sessions. This was because we were told we had space for 36 posters per session essentially. I believe we have enough space for everyone. So feel free to put your poster up at any point.
Of course before your session ideally, but you can also put it up in the morning just fine to take

But you can also put it up in the morning, just find the tape. And just a quick, we'll put this back up for the mentor session later. But if you are a mentor or mentee, just make note of what group you are and that will be how we arrange those meetings later in the mentor sessions. Okay. With that, I'll just give it over to Shih-Wei to introduce our invited speaker.
Hello everyone, I'm Sui. Let me introduce our first speaker, Dan Alista, uh whose work is obviously very solid and insightful. So Dan Alista is a professor at Institute of Science and Technology, Austria, Ista, and he is a machine learning research lead at Neuromagic.
And his research focused on efficient algorithms, systems for machine learning, and spans from algorithms and lower bounds to practical implementation. Before ISTA he was a researcher at ETH Zurich and Microsoft Research at Cambridge. And prior to that he did a post-doc at MIT and working with Professor Nir Shavit. And he received his PhD at EPFL.
Okay, uh the the stage is yours. Alright, uh thanks a lot. Uh thanks for the very nice um introduction and uh thanks a lot for the invitation. Let me try to get set up here.
All right. So yeah. So basically today I'd like to talk a bit about some recent work on the power and limitations of model compression at GP detail. And this is gonna cover work with with my lab and some collaborators from neural magic, which was recently acquired by by Red Hat. So I mean it's it's usual to be a bit philosophical when you get invited to give these talks so I I thought I'd start with a bit of that. So
Okay, so just give me a second.
So I've been doing this for a while now. So I just wanted to tell you how it used to be in the not so good times of compression research. So around 2017 or 2016, 2017 when I started doing this, it was more like a desert with some oasis of some groups doing very interesting work. But it was pretty tough times in compression back in the day. So we were supposed to prune and quantize resonant.
50 birds in YOLO. You'll see this in some papers. I I spent a huge amount of my life uh trying to prune uh Resonance 50. Uh this w I i you wouldn't imagine. And and uh like at the same time, hardware support was pretty thin on the ground. So we we had INT eight uh on recent Intel Nvidia chips. We had deep sparse CPU kernels which we also worked a lot for at Neural Magic. But we used to get fairly low speed-ups and it was uh
a pretty pretty tough going and uh community excitement was i'm not going to lie to you fairly low so i i mean i'm not sure if you can see here this is this was kind of a repository of sparse models that we worked on called the sparse zoo and after five years of being up i think it has 362 stars on github many of those being of the people who actually worked on this so uh yeah so yeah so i mean it's it's not entirely lost on me that this
This makes me sound like a very old person, but let me try to be a bit more optimistic and just tell you how good you have it these days. So compression research is doing really well, I think.
Like we have way more techniques like pruning, quantization, distillation, thinning, and I'm not even mentioning like early exiting and so on. The models are massive, so I don't think I need to spend too much time on describing model sizes. And we have a lot of hardware and software support. So basically INT8 is everywhere these days. Now we have fancy new formats like INT4, FP8, FP4, NVIDIA 2.4.
Then there's a ton of people working on kernel support like Lama CPP, like we have much fancier sparse kernels, Bitnet, Marlin, and so on, okay?
And there is a lot of communica uh community excitement. I was trying to get a number for uh how like how much impact uh work can have and in this in this area. So basically I went to Hugging Face and downloaded some model statistics and I I found out that there were fifty five million GPTQ model downloads over the past couple of years. So which which I I don't know who's downloading all these models, this is remarkable. I'll also mention that for AWQ models the num uh this is like f
like fift more than 15 million downloads and actually for G G U F models is more than 300 million. So I think actually a large part of the uh storage space is probably just uh just storing G_G_U_F_ models I would I would guess. Okay, so so my point my point uh here is an optimistic one. The point I wanna start with is that it's probably the best time to be working on compression. It's basically models are large. Um
Compute support is widely available and people care about what we do. So I think it's it's sort of I uh if your graduates and working on this great uh great choice. At the same time I wanna point out a few difficulties or sort of pain points that just still exist. In particular, I think the benchmarks we have are s still a bit ad hoc in in specific areas. I this is also because LLMs are hard to evaluate.
Compute support is still non-trivial to leverage. If you're from NVIDIA, maybe we can talk at some point. And people care a lot about impact. I mean, impact is hard to define, but like I'll just mention that I think the two tools from the community that have had the most impact are probably bits and bytes from Ted Detmers and co-authors and Lama CPP. And these don't directly take methods. I mean, these are fairly simple methods if you think.
Think think about it. So they they mostly do round to nearest quantization with some fancy optimizations So one thing to keep in mind when designing your new sort of novel state -of-the-art I know lattice quantization vector or quantization method is that someone is going to have to use that and it's going to have to map on to some efficient hardware supports And that's what I mean by by impact So I think it's good to keep in mind that sort of one of the curses of actually if you want to do open source is that you actually have
they have to go all the way in sort of implementing your method and making it uh available to people. Okay? So uh I don't have that much time to uh sort of uh uh on the soapbox, so so I'm just gonna talk a bit uh quickly about a couple of projects in the lab that sort of try to address some of these uh pain points and hopefully also get some time to talk about something new and exciting that I wanna um sort of emphasise. So uh the first question uh I I wanna get to is
Is is actually is there such a thing as lossless LLM compression. And I mean this we've been doing some research on this and it's all great research it all starts with with a tweet, which is from this person who I think is sort of CEO at startup that says, give me BF 16 which is sort of standard half precision, or give me death because he ran a benchmark of the FP8 model versus the
We have sixteen model and he got uh different results. So he didn't check uh I don't think he checked whether his the benchmark setup was wrong or something like that. He said it's a low precision is is the is the culprit here. So uh full precision is the only thing that that he wants to do. So we started to analyse this because this is actually something important if you work if you do a c um if you work for a company, like there is low precision actually something that is inherently going to be bad or lost.
See? And this is work that uh should appear in ACL later this year that uh led by um my collaborator. So uh we did like a very large scale study of post-training quantisation methods, and we looked at weight only quantisation methods. So basically where you comp uh compress the weights, it's mostly for space, and then you get speed-ups in the bandwidth-bound regime. And we analysed a bunch of methods like GPTQ, AWQ and so on. Uh I won't go over them because I have to be a bit faster.
be a bit fast. And then we also looked at weights and activations mostly for eight bit weights and activations. And then we mostly focused on, I mean we only focused on methods that have fast execution support in the leading open source engine, which I think is still VLLM. And so here we looked mostly at gbtqawq and omnicont and then we looked at a couple of methods for int eight and fp8 weights and activation quantization.
And then uh the the benchmarks were the part that was kind of most time consuming to choose and uh so on, but we basically went over leaderboard V_ one, which is the one that I think everyone still uses. And then there's the second harder version of leaderboard V_ two that includes M_M_U_ pro, G_B_T_ G_P_Q_A_ uh mat level five and so on. We also have in the study generative benchmarks like arena hard, uh human eval and B_B_P_ also long context like
like ruler from NVIDIA and uh reasoning benchmarks because we also analyze some uh reasoning models. Okay, and then in terms of models we looked at a Lama, three uh Quan Gemma, we also look I'll show some brief results for MoEs uh and then some R_ one distills from uh deep CQ R_ one. Uh all in all, I mean this is a very boring sign, but but all in all we I mean we had a lot of results. I think we had more than half a million.
in, if not m m much more by now, in fact, a TASCAM model evaluations for for this. So uh one thing that we actually had to be before I go c go the results, one thing we actually had to decide was whether to use A_W_Q_ or G_P_T_Q_ for weight only quantisation. And here we actually notice something that's quite quite funny. So uh we looked at academic

Uh we looked at academic benchmarks versus real order benchmarks, and what we noticed is that like GPTQ and AWQ, I think are within the noise margin uh on academic benchmarks. Uh I think AWQ may be slightly winning, but I think this is literally within the noise. However, what we noticed is that there are very large differences if you start to do generative benchmarks. We we don't we can't really explain why this is. It might be just the weight updates that are kind of fixing.
uh outputs uh over longer executions. But in the end we actually decided to uh use G_P_T_Q_ rather rather than A_W_Q_ Uh I mean I'll uh because I I mean uh obviously I'm slightly conflicted here with having been one of the G_P_T_Q_ authors, I'll mention that there are much better methods than both of these out there. So for for instance quip, sharp and Q_L_M_ cutip that are really great methods, but they don't they're much more complex in terms of the representation they use, so they could don't currently have fast support in in V_L_L_M_
Um okay. So uh with that out of the way, um uh here here are the three findings of our study. The papers on archive if you wanna have a look uh at uh everything. So the first thing that we found is that we believe this person is wrong. So uh we what we found is across all of these benchmarks F_P_ W_ eight eight um W_ eight eight is actually lossless. I mean there's not I I didn't uh give you a high resolution version of this because there's not much
Not much to see here. All of these are actually the same. They're within noise. Okay, so we don't exactly know what this person was observing. Uh that uh the the second thing is that all compression approaches, including W_ uh including in eight weights and activations and uh weight for uh activation sixteen
are within one percent of the baseline on all of across all of the benchmarks we found. Uh and so basically this this is uh these are the results on uh leaderboard V_ one. And we w it's interesting that we we actually found that uh doubly four uh A_ sixteen is quite close to uh double A_ eight eight. Um and then what we found is that there are some hard tasks where you get towards let's say less than one percent recovery uh but this this uh only happens on smaller models. So very s for instance
This is for something like LAMA 70B or LAMA 405B, you actually don't usually get a statistically significant difference in favor of the full precision model. So you can observe this here. So yeah, I won't spend too much time going over the individual results, but I'll just say that roughly the same findings hold across all models and tasks that we use.
we we found. Uh I also have uh comparisons for the V_ two version of G_P_T_Q_ uh that are somewhat surprising. If people are interested, just ask me and I'll show you. Uh okay, one highlight uh because we actually had to run um our algorithms on large scale models like on on R_ one. So it what we actually had to do was uh my my students had to re-implement it for M_O_E_s and the the um implementation is publicly available. This is super fast and I was very very impressed with what it what they
what they were able to do. In particular you can uh uh quantize deep seek V_ three in two hours on on eight uh eight eight one hundred server. And uh so and then we looked at the evaluation on hard reasoning tasks, like basically these are the hardest you can find these days. And uh a sort of um average so w we what we saw is that the four bit recovery is ninety eight point nine zero percent whereas uh A_W_Q_ is ninety five here and G_P_T_
GPTQ ternary, the ternary version of their algorithm is at 80%. So I think that sounds pretty good. On the leaderboard task, the recovery is actually 100% on these massive models. So it seems there's still some life in these methods. And it seems like this kind of 99 % ML-perf standard for recovery is met, at least for all of the tasks that we found. Okay, but at the same time, there is a...
Is a problem here because as you can I mean I will admit that 98.9 % is not 100%. So perhaps if you really want the full quality then perhaps it's either BF16 or death. Okay? So one I mean because I'm a theorist at heart I one of my one of my sort of key questions was like is this inherent? Is there some issue here? Because technically a quantization is noise, right? You're adding noise. You cannot
not obtain the same thing. If some f unless you do something like speculative decoding or additional uh techniques, you're just not gonna get the same outputs all the time. Okay, so my my question was um going into this this next project, which was can we predict can we understand what the accuracy impact is? And turns out we can. This is a paper that will appear in uh in a A_C_L_ uh later this year.
So basically what we're able to show by just doing in some sense doing like a fancy version of a Taylor expansion is that uh under many assumptions, the impact of quantization and perplexity is approximately linear in the relative L_ two errors uh that are happening at every layer. So in a single equation, the expected perplexity over the randomness in quantization is going to be the original perplexity of the unquantized model plus d a set of linear terms, one for each layer,
Where you have this kind of alpha factor that is an absolute per layer constant. This is like the saliency or uh sensitivity of a layer. And T_L_ here is literally the L_ two error that your your quantization algorithm is registering at layer L_ okay? Uh I'll I'll say that that this theory only holds currently for w methods without weight updates, but we believe it can be extended uh to more general methods. So what does this actually mean? So w this this has two major
implications. One uh that we can actually predict how close we are to the sort of compression limit wi uh given um because we can compute these these coefficients you can compute them very easily just by injecting noise into the model and sort of seeing how the p perplexity jiggles. Okay, and then we also give a method that's, I would say, quite simple that reaches this limit or is very close to this limit. And then the the other thing that's kind of nice is that if you once you have the alph
Alpha Ls, this actually gives you by dynamic programming kind of a an optimal solution to this layer-wise compression problem. So if you want to choose the layer-wise quantization uh levels uh it does give you this. So I just want to show you briefly how this how well this works. So basically we can like the dotted line is the predicted perplexity and the dots are actually points that we ob uh sort of obtained using our method. So notice like they're literally on the line.
line up to around three bits per parameter. At three bits per parameter the noise levels are so high that you can no longer predict or you would have to recompute the coefficients. So uh but but notice we can literally uh perfectly predict the perplexity increase based on the the um based on these kind of uh noise levels that we measure synthetically. Okay? So uh that's that's that was maybe the one thing I wanted to uh highlight. So what this says is that I mean w what this says is that
Is that uh we are I mean uh we uh we there's no such thing in some sense as as lossless quantisation unless you have super small error. And notice there's some kind of inherent error that you're going to be injecting if you're going to quantise to four bits or less. So uh and and notice this this is literally what's what's happening here. Okay? Mm. So the last thing I wanna uh talk about today is actually going in a completely different direction. This is ongoing work.
work. And what we're trying to do is we're trying to go towards sort of the more expensive sort of workloads, which are the training workloads. So because we want to save some trees. And the key question here is that can we port some of these ideas about sort of compressibility or inherent limits to compressed LLM training? And this is what the next
Uh this is what what m the la the last project I'm gonna mention does. So uh what we're looking at is this quantised training or Q_A_T_ problem. So basically we want to get accurate models with quantised weights and activations and w w so what we're gonna do is like we're gonna quantise on the forward pass, but we we still have access to full resident gradients on the backward pass. So what we would like to run is basically gradient descent or stochastic gradient descent.
which is this equation. But what we actually run, because that's what's what we kind of have to do, is we have to project the iterate for like this X_T_ uh before we execute. Okay? So th our first b I mean very rudimentary idea is that we would like to minimize this difference, which is literally the it difference that between the two iteration. The error between the two iterations, right? The the the difference between the gradient
independent over quantized weights versus the real gradient. Okay? So uh for to do this dif intuitively two things should happen. One is that X_ X_t should be close to Q_ of X_t. So we want we want to essentially overlap like make make sure that we don't lose too much in terms of mean square error. I mean this is not a new idea at all. Uh this is what pretty much all of the Q_a_t_ methods before us do. Uh like first is L_S_Q_L_S_Q_ plus and so on.
But the other thing that which I think is slightly newer is that we we're saying that the gradient itself should not get too distorted before because of the quantization uh approach and we actually give a new approach that we show uh actually gives much much better gradient alignment between this iteration the original one you wanna run and the weird one that you have to run because of Q_A_T_ So the the we this is where the talk gets a bit weird because I'm not gonna talk about how this method works.
because this is actually the the one of the orals later in the day so I'll invite you to have a look at that. I'll just tell you a bit about the results, okay? So uh we we think we have uh gotten the first method called QUEST that's uh or on archive already.

that's uh on archive already that gets near the compression limit in terms of uh the like uh equating the noise you get from quantization from sort of an equivalent amount of noise that you would get just by injecting uh sort of Gaussian noise into your weights or activations. So uh what this what this method can do is it can do kind of two things that are interesting. One, it can train meth it can train um m models stably with extremely low bit width.
with weights and activations. And I think it's probably the the first one to to do so uh stably. So basically, like this is a scaling along where we have the size of the model on this axis and the validation loss on this axis. So this is kind of a standard uh sort of scaling law. And what we see here is that this is what you get with B_F_ sixteen. So basically, either larger your model is, the lower your validation loss will be. So nothing
thing too surprising here. But notice that we actually can do the same thing on one bit weights and activations, and we can in fact kind of meet and sometimes slightly improve, I mean, just by very little, but over the over this trade-off, the trade-off given by BF16, but we're actually training a model that's completely binarized, both in terms of weights and activations. Okay, so I think I think this is somewhat remarkable that
that one can do this in a stable way. And this also leads to more interesting trade offs, because what we observe here is that the four bit results, which are in in yellow here, they're actually Pareto dominate. They're they're uh dominating the B_F_ sixteen results because at the same size you get much lower perplexity all across the line, okay. So I I think this is interesting and I mean if we uh what we're trying to do now is get access to more compute
Because we would like to understand how this uh whether we can actually train uh such models in extremely low precision at very large scale. Because I think these w these would be very fast to uh to execute, okay? And we also the paper also has kernels for uh this W_ four eight four format that we have.
And then the other thing that's kind of interesting is this kind of near the compression limit part that uh that I mentioned before. So what we can do here is that we can actually we can predict how uh our model will behave at a specific l uh at a specific uh or how our method will behave at a specific quantization sort of uh quantization format just by taking a regular model like a BF16 model and injecting noise, doing a short um i bit
basically doing a short amount of training, and then seeing how the m uh sort of how the scaling law behaves with respect to noise, and then re-scaling this in order to predict how it's going to how the method's gonna do when you actually do sort of actual quantized uh training. Okay, so notice these are points that so here what we have is points that are given by our actual model in blue.
And then the noise injection model is in red, and we sort of fitted a line here. So what we get is actually extremely close. So what we notice is that our our uh method is is essentially almost matching uh noise injection, okay. The other thing that's kind of interesting, which is why I sort of kept it on this graph, is the same we we we have a version that works for sparsity that also does the same thing. So you can actually also uh sort of predict what you get uh for for the case of sparse.
first. Okay, so I'll I'll let uh Andre, uh sort of describe the method. This is going to be the third oral ten ten fifty five, and uh he also will give you way more data about this this method, but we're we're very excited by it, okay? So I think I'm close to uh time. So I'll uh uh wrap up here. So uh I'll I'll uh I wanna reiterate my sort of uh optimistic message, but what would what the community was able to do, so using
With algorithmic techniques coming from this community we w we were able to compress LLMs with minor impact on accuracy, let's say one percent relative across all current benchmarks. So that's that's great. Uh I mean there are limits to this and some of the limits are inherent. The results like this linearity theorem that I flashed earlier provide inherent bounds on how accurate these compressed models can be. So there there are just limits that you cannot uh that that you cannot beat. Uh I will say that methods
s such as the the Higgs one we we gave, but also Q-tip they get extremely closed to this kind of inherent limit. So in some sense the community has to look at di af other directions if we want to uh improve. And uh ma um I I also briefly described how if to extend these results to quantisation-aware training and uh some some new results we're quite excited about. So uh I'll think I'll stop here and uh take any questions. Thank you.
Thank you. Uh maybe one question and meanwhile uh the next speaker maybe can come to the stage and prepare. Yeah, okay. Question there there I don't know. Let's okay. I'm also here almost entire day, so you can always come to me. Hello, uh thanks for the nice talk. Uh uh do you have any insights on how the neural architecture
impact s uh like quantization or sparsity. Like uh if in the end we are going to use a compressed model for inference, Mm-hmm. uh can we design better architectures during free training stage? And uh the next question is like does multi-modality impact the kind of quantization you do?
Yeah, so I think both of those are very good questions. I don't have great answers to myself, so thanks. I mean, what I'll say is that there's been a bunch of interesting work on different, so for instance activation functions are known to impact the quantizability a lot, in particular for the activation, so I think that's something that's very clearly, I mean there's good research on that, but other than that what we have found is that we have work.
work together with UTKU where we actually tried different architectures like this is the sparsity scaling law paper from from last year's ICLR and we had we also did some extra results on that it does seem like these scaling laws like the one I showed before these are kind of they seem to hold irrespective architecture fortunately so it seems at least to my understanding modulo some things we don't really model I would say these this seems to be somewhat of an orthogonal aspect
aspect. I we haven't really found an architecture that's really bad at quantization or something that's really really good at quantization. But we also haven't searched so much. Uh that that's a good question and and I think it also applies to multi-modality. I mean maybe for multi-modality I'll take it offline, because there's a bit more detail and I I don't wanna make the next speaker too angry. Alright. Thank you. Thank you Dan. Um next we will have our first oral talk. Um
Uh it will be ten minutes and then we will have questions, uh time for questions.
Good morning. My name is Vimal. Um I'll be presenting um our work uh on uh param title Parameters versus Flops, where Uh. we uh s Yeah. I can try uh I can try to use a computer. Uh I can try this. Yeah. Is this bit any better?
Okay, let me just adjust a little. Good morning. My name is Vimal. Um I am representing our team uh from Apple where we studied um spar uh um scaling loss for optimal sparsity in uh mixture of experts uh language models. Uh this work was uh led by uh Samira and uh Harshay who is currently at a mighty uh but worked as an intern for us at Apple um where
The question that we asked was, can we draw scaling laws for optimal trade-off between the model size,
and uh compute for example or flops. Now you might be wondering why uh uh we wanna uh mix the two together. Uh for that I will uh provide some background that will help us understand why we think uh it's important to understand the trade-off between the two. Um scaling laws as we know uh have uh been a very useful uh tool uh to say the least that has uh shown that
In order uh for us to train um uh models optimally, we should pro uh proportionally uh scale up the model size along with the data set size and this will uh lead us uh to pr predictable gains during pre-training and also uh in downstream tasks and it has also helped us um um uh uh encounter emergent abilities uh in models.
else. Now the uh type of models that we typically study in scaling loss including our study is the so-called compute optimal model, uh which means that these are the models that have the lowest so loss for a given setting. I also acknowledge that there are other models that are either overtrained, uh are typically overtrained but also undertrained that are of uh interest to the in research, but we are gonna limit uh the scope of uh our study to uh training computer optimal models. Now
A recurrent idea in uh uh uh in these studies is the capacity of the model is uh qua uh quantified by the model size. Now this works well with uh dense uh arleca with transformers uh where there's like a one-to-one mapping and has been shown to be successful. However, there are other architectures that exist where you can uh improve the capacity or increase

uh improve the capacity or increase the capacity just by using a compute. Where compute is uh typically uh quantified by a floating-point operations or flops. Um an example uh for this would be uh paramet be a parameter sharing uh in so-called universal transformers or also other architectures. On the other hand, if you look at the uh the y-axis in this figure, you can also increase the number of parameters and we can actually have
have uh flops-free parameters uh for instance uh an an example architecture for that would be a sparse uh mixture of experts. Now I was trying to um
provide uh uh some motivation on why uh sparse mixture of experts uh uh is uh an interesting model, but I don't have to say it. I've also seen a great uh tutorial uh as recently as like from a couple weeks ago by a professor Hashimoto um at Stanford that shows why mixture of experts are important. So I'll refer you to that for complete background. In our case um we are interested in uh sparse mixture of experts because it allows us to trade off
of uh the m parameter size along with compute. Um and that's one of the motivation for why that mo model was even discovered. Now sparsity in mixture of experts is quantified uh by the number of uh inactive experts uh divided by the total number of experts as uh shown in the equation here.
So uh with this background we once again revisit the question, can we draw scaling laws for optimally trading of model set size for compute. And um in order to do that we uh trained um many many mixture of experts models um at a reasonable scale uh for us to at least do a scaling law study where we varied uh the model set a model size as well as sparsity and of course uh uh across a range of uh
uh training budget. And um just following um uh
the approaches from other studies we uh essentially um fit a so-called isoflop surface. Since we have uh uh the uh sparsity variable in addition to uh the parameter size, we instead have like a three D_ plot versus the typical two D_ plot that you might encounter in papers. So what we see here is as uh for optimal models uh tend to have high sparsity.
So that's itself interesting, although that also probably confirms our intuition. On the other hand, when we increase uh the model size along with sparsity, uh we tend to find the optimum models in that range. Now in order to really uh understand uh the phenomenology here, we take slices um of this three D surface as shown in the figure here, and we can ask uh two related questions.
Suppose we fix the data set size, or the b rather the uh training budget, and also uh fig g uh for a given sparsity, we want to understand what the optimal model sizes are. What we see is some uh uh an interesting trend. As we increase the uh sparsity, the models tend to get larger, as shown by the plot on the left, whereas as we increase sparsity, the number of active
active parameters tend to get smaller. So um what we see is like we're able to have a large uh model that we can train, which is good, because we can fit our training distribution. But we can also keep uh the compute at inference uh manageable.
On the other hand, when we uh uh think about a practical scenario where we're given a model such size, then we see that the optimal sparsity really depends on the model size itself, and the optimal sparsity uh seemingly uh uh i are i increases and seemingly converges to one, although I'm not sure what one really means here. So we just uh we can uh say that we find the model optimal sparsity increases uh with
model size. Now the previous plots were shown for one specific training budget. Now we may wonder it does the trend hold across a range of training budgets and the answer is yes. For the total number of parameters we see that the model size tends to increase with training budget whereas for the number of active parameters the trend holds it is just that the increase seems to be sub-linear as shown in the
the plot in the middle. Now in terms of like the uh effect of uh uh the training budget on optimal sparsity, we once again uh see that the optimal sparsity increases uh as we increase the model size. Another way to look at the plot on the right is that if we fix a model size then the optimal sparsity decreases as we increase the training budget, which also intuitively uh makes sense.
Now so far we have covered uh what happens uh during pre-training. So we are also interested in uh understanding if there are any scaling laws that we could potentially uh draw for downstream transfer.
Um here I have to uh acknowledge and caution that um we only use uh uh few shot uh in context evaluations. Um so this is um a little different from what you would typically do in practice where you have post-training and then uh further steps and you um then uh evaluate on like a large scale benchmarks. Instead here to get a sense for what we can do with downstream transfer we uh s use a few shot uh in context uh
the transfer um uh set up where we see uh couple of uh interesting trends. First of all there are certain types of tasks uh for instance the plot on the left shows the performance or language uh understanding where sparsity doesn't seem to uh affect or hurt downstream performance. Note that we are using models that are perplexed perplexity of loss um equ equalisable here. So uh the comparison I believe is fair.
There. On the other hand, if you have a task that have more of a reasoning component, like reading comprehension, the picture is richer or it's like uh the there's no clear trend where the dense um permit my abuse of term, but the denser models seem to work better than uh the sparser models. Um we don't completely understand uh what is happening here, however our hypothesis is
The uh FLOPS does seem to have a role in uh downstream uh performance scenarios. And uh we do believe that uh test time scaling is something that could be of interest to study in the contact of context of these models. Finally, we also provide or suggest a functional form, our parametric form for the scaling law. You would see uh terms, the first two terms are very familiar uh from uh say uh
our previous work, we just add a couple of other terms related to sparsity. And the final term is a generalised form for the number of active parameters. And uh we just go ahead and uh try to fit uh uh with our empirical data. What we find is uh uh with our validation uh data on the right, the way we validate our parametric form is by holding out um
uh data from models with higher sparsity and we just want to see how far we can push our parametric form. We see that in general uh the model's predictive power is uh reasonable. I mean our paper has the information on R squared if you are interested in the statistics, so on and so forth. We do notice that like larger models trained on a smaller um data size do seem to uh perform uh or the prediction for those seem to perform worse.
and that's another thing that we would like to understand. So in conclusion, we see that with a sparse mixture of experts, during pre-training, large models are still the way to go. Like you can train as big of a model as you can, and as long as you set the sparsity accordingly, then you should be able to fit the training distribution. On the other hand, at inference, flops seem to
to play a more prominent role. And I think this is very intriguing because sparse mixture of experts are still efficient in the sense that you are only activating a subset of parameters. So these models could potentially perform better than their equivalent dense counterparts, even when you use a chain of thought or other
post-training or rather like a uh inference time um uh approaches. So um it the last uh statement make here is kind of needless to say to this group but we would love to see uh more research being invested in uh uh uh building infrastructure and also understanding the behaviour of sparse mixture of experts models. So with that I conclude my talk and thank you for your time.
Thank you. Um questions? Thank you for a good talk. Um I have a question about uh architecture. So for let's say for uh
the M_O_E_ routers. So let's say if you have a different routing mechanism, better or worse, would it change the story entirely? This is a c a great question. So we went with the most vanilla set-up that we could find just to have like a starting point for our study.
I do believe uh that um um the routing um that we chose is a fairly standard um routing algorithm, just like um a token routing, top K, uh what have you. Um uh the type of routing algorithm that you go you have might change the story. Um I would be curious about that. But there's also like uh other aspects of this whole setup. Because this question really

because this question really kind of speaks to the way we want to draw scaling laws for an architecture like this is to really do like a hardware software co-design, meaning like we really need to get as close to the real implementation as possible. So I would say the answer is maybe, but I'm not sh I cannot give you like a clear answer on what what it it'll look like. Uh we have two more questions. I'll give this so that next Okay. speaker can set up. Okay.
Oh, okay. Uh so I I had a question regarding kind of your modelling. So I th if I understand correctly, your modelling flops, which is like let's say weights activated for token, Mm-hmm. but are you is there any way to take into account the fact that you have this huge blob of weights that's k sort of sitting there and there's like pre-fetching costs and stuff like that? Th that's a great question. So the way we have written that in the paper is if you disregard the cost like you just like make it all of one, then especially the uh conclusion on the modelling
on the model size will hold, but if you start going to realistic models then we need like a better um uh uh model for the architecture itself. And uh that's a great qu uh question and I think it this story might change or it'll become clearer. Okay, thanks.
Hi, good great talk and my question is like will in my opinion will that be all MOE models in the future? Like deep seek just give us a sign that the the give us the deep seek V_ three and they have the best performance also the accuracy. So will that be all MOE architecture in the future? Um so
What our study suggests is if you are interested in um uh fitting your training distribution, then the num the parameter count is still what makes a difference. Mm-hmm. Now you could try to train um a huge dense transformer, or you can go with a M_O_E_ type approach. So that becomes a question of what
is uh um important for you. Um I also acknowledge that the architecture that's uh rather the infrastructure that's needed to train MOE models is non-trivial. So so um
I would say like if the infrastructure cost is just like s ignored, Okay. like the way um I sometimes ignore many important things, then MOEs seem to be like a good choice. Okay. Oh, and one more one more is that, uh according to your sparsity like MOE, uh deep seek VCM proposed like two thousand two hundred and fifty six uh MOE uh experts, it's that's a huge number. I uh call
compared to the existing like mixture, it's only have eight Yeah. clusters. So what would be the trend of these expert numbers? So what I have noticed from the papers that have been published recently are the reports, the sparsity values seem to be landing in the ninety to ninety five percent range, which is kind of what our city suggests that like if you keep increasing the model size, Mm-hmm. you really need to also like set the sparsity optimally. You cannot still have like a
Like I think Minx drawl, I could be wrong, but it's more like a twenty five percent or so. It's like uh in terms of like the sparsity value. Yeah. Um so I do our study is consistent with what we are seeing, at least in the field, in that sense. So the more experts in the future, right? Um and there's also like uh another uh paper from last year that talks about granularity uh. Okay. So th there's that aspect as well. So more experts um sure, but again it goes back to
what can you get to actually work Okay. for you. Okay, thank you. Thank you, Rimal. Maybe another round of applause for sharing this work. It takes a lot of GPRs, I'm sure. Thank you. I can take that. Oh no, Yeah, I'm going to I drop can take that. So next talk, our next oral talk
Yep, you're running three minutes late so we'll I start think that now someone and we'll will have to show. questions later and fix the presentation. Uh do you So don't leave a look on that. Okay, you'll get the help uh choose the mirror from the menu.
That's one. Chu, this one this one. Chu is correct. Yeah, it should be there. See? You We can do extended play or Yeah, we can just do this. Okay. And it's gonna ask you which one. Perfect.
Yeah, so good morning ev uh good morning everyone. I'll be presenting our work Matr-Yoshka quantization, which was done in collaboration with Puranche, Jeff, Pratik and Aditya. Uh so yeah, let's get started. Uh so let's start us let's start by quantizing a pre-trained Gemma 2 9B model, uh and for example let's consider Google Firebase, uh which requires an int8 quantized model.
and then obviously uh let's say you're doing post-training quantization or QAT you would optimize for the eight bit lot, it may be a the L_ two error loss or a end-to-end cross entropy loss. And and then obviously let's say now Gemma two uh let's say Google FireBase has a very high serving load and then on the flight one cent in two model or an end four model because the load is just too much for an end eight model. And in that case serving three model becomes like super expensive because you don't want to have like three slices serving three separate models.
Oh, and then one obvious solution or one like solution out out of box solution would be to quantize the models on the fly, but then obviously that leads to poor quality and not satisfactory performance and yeah, and then you have mad quantity. That's true. Uh so the idea is pretty straight-forward here. You jointly optimise for like three models, the eight bit model, the four bit model and the two bit model and the four and the two bit model are nested into the eight bit models.
Uh so that's pretty much the core idea of our algorithm. And I mean it may be a P_T_Q_ method or a Q_a_T_ method that is jointly optimised for. And then for the baselines we have three baselines here. So the red one, the red triangles, the inverted triangles, are basically models trained explicitly for that precision. The two bit model, the four bit model, the three and the eight bit model.
And you can also have a sliced in-date model where we actually just train the in-date model through let's say P_t_q_r_k_t_ and then just slice the first two M_S_B_s to get the two bit model or the first four M_S_B_ to get the four bit model. And with mat point we just optimise for the two bit sub-model, the four bit sub-model and the eight bit sub-model, but we are able to sort of interpolate to intermediate positions like three bit, six bit without any loss in quality and our two bit models are usually much better than the baseline two bit model.
So this plot is for uh this is with omnicont uh per channel quantisation.
Oh, and then we also look at the wave distribution as to see what's exactly happening behind the scenes, and we see that with Mach cone the waves are usually shifted towards the right, and that sort of kind of makes sense because now our two bit model basically corresponds to the top two M_S_B_s of the eight bit model, and then given that four bit and eight bit can tolerate some bit shifts here and there to sort of account for quality for the two bits quality, we see that the waves are usually shifted towards the higher side because that's what the two bit
two bit model optimises for. And we also mix and match to get like we can basically mix and match to get like several models. Uh we only saw a few of them, the stars correspond to the mix and match models. We only saw a few of them because I mean, we you can just basically span the entire graph uh and the pyramidal strategy is what we find to work the best. Where you have like lower precision in towards the end and like a very high precision somewhere in the middle.
Uh but as you can see this curve is not Perito optimal, the three bit interpolated model which is the circle on there on the top is sort of better than the star right next to it. So is there a way we can make it Perito optimal, something like this? Yes. Yeah, so is there a way we can make it Perito optimal is the next question that we try to address.
And then it turns out we can, but uh for that we store a small number of values for the two bits um model in a higher precision. So usually two to five percent of the values for the two bit model are stored with three bits and that basically gives like a significant improvement for the two bit base line, and now we can mix and match between the extra precision two bits um model, the four bit sub model and the eight bit parent model and get a Pareto-optimal curve.
uh and obviously can we improve it further. So we also do chord distillation where the eight bit large model where the two bit sub-model distills from the eight bit large model along with the ground truth uh logits. And there we again see like a four percent improvement over the baseline with chord distillation. Uh
Oh so what more? We also find that I mean I think there were some other works that yesterday during the poster session as well where I found this where when we're trying to do like vanilla Q_E_T_ where we just optimise for the downstream uh for the end-to-end cross entropy loss to be very unstable when we optimise uh when we are doing F_F_N_ plus attention quantisation. So most of our results up till now were for F_F_ and only quantisation. But the moment we do F_F_N_ plus attention we find that
The Q_R_T_ runs are usually very very unstable. Uh but then it turns out we are able to stable stabilise it with matcon, so what we essentially do is we stop optimising for the four bit some model and the eight bit model, but instead of always quantizing it directly to the two bit precision, we first quantize it to like eight bits and then slice the two more significant bits to get our two bit model. And this somehow stabilises uh F_F_M_ plus attenuation really well. I don't have the curves here right in the slide.

cellular level. I don't have the curves here right in the slide, but uh yeah, we can probably look at them later. And we also find that just optimising for the two bit loss also improves the two bit model's performance by like two percent then. Uh so that's another start side result we have here. Uh and then yeah, what next I guess. Uh so
Can we basically do the same analogy to like F_P_8, F_P_4. But given that your exponent for uh F_P_ models for floating points is usually present in the log base, the moment you try slicing things out, your rounding of errors are like exponentiated and then becomes it's not like very easy. We did some initial experiments there, but then our results were pretty looking pretty bad. So it's not very trivial as to how to do it here.
Uh also, can we uh dynamically sort of f route how many bits we need for like say the next block of token speculative decoding or for like the next auto-regressive token that we want to generate. And then just load those many bits from our HBM to the SRAM so that we are not I mean if we know the token's going to be very easy or if it's something that the drafter can do very easily, we probably just want like a two-bit model to it and not a four-bit or an eight-bit model to do it. Uh I think yeah, that's it. Thank you.
Thank you. Yeah, we have five minutes uh for questions. Uh yeah, very cool work uh do you plan to open source the code?
Uh we I mean we are so our c uh I mean we are working on it'll take uh some time to pl open source the code uh but we are working on uh an open source Jacem Jack's implementation for this. Yeah.
Yeah, I guess I can ask one like uh you said you uh worked with the omnicon. Uh did you try other quantization methods? Um Uh so we didn't try other quantization method. Most of our results are on vanilla QAT or omnicon, but we did some, I mean so the thing is it's not we are not very sure as to how to extend it to methods that actually don't do gradient descent. For example, let's say GPTQ or AWQ. Because like I mean the basis of our algorithm is that we do like gradient descent for the three loss.
the loss is the main model loss and the sub-model losses. So extending it to methods that actually don't use gradient descent, let's say something like A_W_Q_Q or G_P_T_Q, doesn't seem very trivial to us at the moment. So we haven't tried along those directions. Yeah. Thank you. Great work. And uh my question is that uh currently we all focus on the weight quantil quantilisation, but what about the key V_
It's like in the real implementation, I I mean the deployment uh in in industrial like, the all O_L_M_s, they need the huge key V_ memories. So it's the big part. Will you compress or contentize key V_ in the future maybe? Oh, so I think that is a very closely related work uh by folks at Berkeley I think. Uh they basically do a very similar thing where they
have like I mean for the verification part it's a speculative decoding method for the verification part they use the int eight model and for the b self drafting part for the speculative drafting part they actually use the four bit cache and not the eight bit cache. But even then I don't think the paper scales down to two bit cache. But if you want to do something like that you can probably plug in our mat cont uh mat cont architecture on top of some of those things. Where you actually optimise for the two bit the four bit and the eight bit do some sort of a small
small fine-tuning before you actually do inference and then probably have like you can do like spell speculation with the two bit cache or with the four bit cache.
Thank you very much. Very nice talk. I'm here. So what I hear from you and other presenters, you know, everybody's exploring the number of bits. You know, a lot of people figured out that four bits is good. You know, in some cases you can use three bits. But then it seems that the number of bits is becoming saturated, right? So my question is what is the future for...
Quantization research. Where is it going? Uh I mean I del I do see it's I mean I wouldn't say it is getting saturated uh I mean if you look at Inet for example Inet I think even as Dan even mentioned in his talk Inet usually doesn't lose anything on quality. But the moment you go to In4 or like In4 also is more or less usually quality neutral except for like some tasks I guess and but the moment you go like sub In4 you still have a lot of headroom to improve and then
And as models get better and better, I think at some point you will hit that limit where you it will become very difficult to quantize models, I suppose. But then I think there is still a lot of scope in the training part where you actually train with like F_ eight or F_ eight or F_ four I mean. Uh and then uh I think there is still some headroom there. Thank you.
Thank you Pranav. Uh we will conclude the oral uh talks at the moment and have a thirty minute break uh now and see you in thirty minutes.



Obrigado.

So now we have invited Doug. Uh Johan Dang Dong is a director in meta AI and his work focuses on like planning, R_L_ and efficiency. He's also the product lead of open go pro open go and efficient replicator of alpha zero that beats professional players with single G_P_U_ setting. Before meta he was at Google sell driving car team and received P_H_D_ from C_M_U_
Today he's uh giving a talk on train dynamics of transformers. Take it, Job. Yep.
Uh thanks for the introduction. Uh thanks Helen for coming. Uh so today uh I'm going to talk about um uh work that is wholly like a most theoretical, but it may have a good implication uh for the real-world scenarios, especially for sparsity, low rank and other structure that emerged uh in uh transformers. Um so thanks for coming. Uh my name is Yuan Tong Tian. I'm a research scientist director in Meta AI uh working on um understanding and also
all uh planning and reasoning uh in uh in large models. Okay, so we all know that large models has uh lots of applications and uh people are in very impressed by how good uh it can do in many different scenarios. And we in our group we also work on reasoning and planning as I tried to uh use uh a large models to do this uh kind of complicated task.
So uh I mean behind all this uh scene like uh what happen is like do we have this kind of call called transformers, right? So we all know, and uh this transformer is really something uh that change uh uh many kind of scenarios and make sure that this uh works very well. And uh the attention mechanism actually play an important role here. And uh we actually have seen like many papers that try to leverage like of attention in order to accelerate the training. Right?
and I saw the inference as well. So we all have been fascinated by this uh infrastructures and the framework. And of course people may wonder like how transform works? Uh
I mean we can definitely um regard this as a black box, right? So you have arbi arbi arbitrary input, uh images, uh video and um um text uh and the speech, right? So put them into some nonlinear transformation to give the output. Okay, so we can we can say we that we done with that. Okay, and we sit there and then uh lay down and say I assume transform can do everything giving enough data. Right, so that's one attitude towards this wave of uh large models.

the wave of uh large models. But that could be another attitude is that uh maybe in the future we want to really open some open the box of the transformers or whatever now neural networks uh in order to understand that better so that we can improve the entire pipeline better. Uh so this is actually the attitude I'm taking. And uh hopefully in the future uh deep model is no longer a magic but a science.
So of course like in order to do that, uh usually people from the theoretical side will try to think about what routes we should take, right. So um there are many different way of thinking about the problems. Um I
Uh for example, people who are working on generalisation, uh like P_A_C_ uh just kind of uh uh uh architecture agnostic generalisation will we basically think about like, oh yeah, how about we do a bias and uh uh various trade-offs, right. So um for this kind of directions, usually what happens is like we don't think about architectures, we don't think about train dynamics, we just think okay, we have a very big function classes and want to find uh what is the the class
That will fit the data very well. Right, so this is one I was thinking about that. Uh people also think about expressivity. Uh in that case we we're thinking about what's the architecture, but what kind of archi what kind of weights we can set to the architecture so that um uh it will give you uh the right functionality. And what functionality it cannot be uh done by the current architecture. Right, so this there there's a famous X_O_R_ problem that people often come up with, showing that uh X_O_R_ problem cannot be modelled.
by one layer network. This actually costs the first A_R_ window. And people will say oh one layer network doesn't work. Uh so but again, uh the periodicity does not consider the train dynamics. Uh it basically set up the weights so that uh we get uh the right output. And the third attitude is called optimisations. Alright, so in that case we talk about uh gradient, talk about Hessian, talk about local minima, local minima, this kind of terms. And then we really care about how uh
The dynamics actually move the criminal weights uh towards this uh non-complicate and very complicated dynamics uh landscapes until it get into some uh local optimum. Right? So we really care about dynamics. But on the other hand, uh we just assume that uh we are facing high-dimensional la landscape. And uh we don't know the global structure of it. Right, so um so basically if you think about these three different approaches, then they all are lacking in one of of the other directions.
So what I'm in here what I'm doing here where we are doing here Ah in this talk is that how about we think about both architecture and the training dynamics at the same time and to think about like uh how uh the transformer works and what kind of solu solution you can get uh from the uh transformer dynamics.
Right, so in order to do that, we can start from uh the first principle. Right so we can say we know that oh this is how we compute gradient. Uh very simple, right. So we have a non-linear uh objective function J_ and you can say okay let's compute gradient, very simple. And then the the the weights will go along that way, okay. Of course it's very complicated in term of the technical uh uh details.
Uh first of all, the new network architecture is encoded uh into the a loss functions, right. So and uh we all know that uh it's highly non-linear. So dynamics is also very complicated. And second you have to also consider the time it goes uh to involve the uh the weights. Right, so this is also increased uh another complexity. Yeah. Why is complicated? Um in this talk I'm going to show you that uh it's possible to actually get some interesting insights.
And the summing side is actually very useful in the real world problems.
So here's a summary about the talk. Right, so uh i it it sh it turned out to be that uh the green dynamics not only give you sparsity and low rank as people often know. Alright, so we can leverage that uh to improve um our uh efficiency of the l uh large models uh efficiency our other models. But we can actually see that the green dynamics also will give you more complicated structures. For example, hierarchical representation, uh for example, algebraic structures, for example, spectral structures, et cetera.
Of course, uh this uh is a ongoing research and uh we just uh scratch the surface of it. And in the future, but uh well I'm I'm really optimistic that in the future that this might be uh very interesting in and people might think about that uh in more in the long run. And m maybe in the future we actually know how the transformer uh how the neural network works. Okay. So let's start with this first uh simple structures uh called sparsity and low rank.
So for this I am going to talk about uh uh our work on understanding the sparsity of transformers. Uh so we are of first like we want to start with the simplest case which is a one layer attention. Uh so we have a an one layer transformers uh with all the contextual tokens and then we have a token that is called a query tokens. Right so they de are minions together into a self-attention. They're normalized. And then you want to predict the next tokens um using decoding mechanisms.
Okay if you write down all the equations as complicated, uh and the people will say I'm giving give up, uh because it's so complicated I am in no way to to solve that, alright. But actually uh after if you stay at this equation for a couple of hours, maybe you actually find something interesting. Right. Uh so uh first of all what you can do is uh you can actually reparametrize the problem uh with independent variable y and z_ by grouping all this waste together. Alright, so you'll have y that
that crad characterise uh the top FFN layers, and you also have Z_ that characterise the pair-wise logits of soft attention matrix. And then you compute the gradient of Y_ and Z_ directly. Then it actually become easier to analyse and you actually can see some quantitative uh results. Okay. Uh before that we also assume you uh assume some distribution uh data distribution. Right? So we assume that uh the input uh consists of uh a batch uh as n different uh sequence classes.
And the voice signal classes, uh they are their goal is to have um uh to predict the next token. Right so but within this each signal classes there are t there exist two different kind of tokens. So one token is called distinct token uh which means that it only appears at the one class but not the other. And there's also common tokens that appears across multiple sequence classes. Okay. So then the question is like a given distribution, how the separate tensor layer behaves.
Okay so here I'll give you all a picture of the dynamics. I'm going to stimi uh g skip all the details. Uh because I only have like thirty minutes. Okay so at the initialization we can characterize some of the quantity called the uh C-titer, right. So this quantity is the product of uh the co-occurrence probability between the current token R_ and the next token N_ one.
and multiplies by this uh exponent of the uh logarithm. Uh this is the self-attention logarithm. So M is basically Z_M_R_ means like uh the self-attention logarithm between the token M_ and the token L_ L_ is the contextual token and M_ is the final token you occurring. Alright, so initial condition of obviously Z_M_L_ equals to zero, alright. So that's what And then you can already draw this uh C title. Alright.
So and for distinct tokens because it only appears on one class but but not the other. So you can actually see like non-zero component on one class but not the other. But for common tokens, it appears on both sides.
Okay, so the first conclusion is that when you train models, uh you're going to see that for common tokens, uh the largest of um common tokens respect to the particular uh input uh which is the query is uh is going down. So so basic this mean the time derivative respect to uh time derivative of this thing. So this going down. So basically common tokens' attention shrinks.
On the other hand, distinct distinctive topic attention uh the actual grows. Okay. So this these two already characterize the basic property of self attention layers. So we can think this as a learnable T_F_I_D_F_ uh we all know that T_F_I_D_F_ is some uh some uh some uh approaches that people actually develop before uh the deep learning eras. Right so in the net natural language uh literature. So what they do is that uh we want to emphasize the tokens
Uh that does not really appear that often to other uh the documents, but a very distinct in the particular document we want to classify. And uh to have attention here is basically a learnable version of it, right? So it basically all these weights are tunable over time.
And not only that, but the wheel can also uh characterise the self-attention uh dynamics um uh using this framework uh quantitatively. Right, so we can actually prove that uh this Z_M_L_G_ grows faster with tokens than our that is highly correlated with the final um final token M and also next to be predicted end. So basically if end is highly coupled with the target, then its attention will goes up very quickly.
Or time, alright, so it's very uh it's very intuitive. So we can actually characterise that with a theorem. Alright, so and over time you can imagine that uh the token that has a very high correlation with the final token to be predicted, uh their attention will go super high, and token that is common and token that's not related to the final things to be predicted, uh their attention will go low. Uh so th they will basically go higher f uh slower.
Right, so if you normalize it, then of course things will become sparse.
And this is called this is also contextual sparse, d which means that uh this will be related to the lat the next token M_ uh the last token M_ If you change the query, the attention pattern will be different, alright. So this Z_L_M_ is uh related to both the current token L_ and the the the query token M_ together. So if you change M_ then this pattern pattern will be different. So that's actually called a contextual sparsity. So we're going to use it uh in uh some of our empirical studies.
So we could also have a theorem that can characterise how the attention actually behaves over time. It turned out that there's two different stages. Now the first stage is attention becomes sparser. But there'll be second stage that everything basically frees uh into the patterns, because um of the diminution return of the softmax. Okay. So that's two stages and we have a

So that's two stages. And we have a uh uh we have a study on that. And uh this kind of study uh actually show you that uh there's a statistical sparsity in self-attentions. And we actually leverage that in many of the f uh works uh in the empirical side. Uh so we have work called deja vu uh that is kind of like poor man's um moe, as I try to predict the sparsity patterns given the current current contextual tokens.
Uh so before like uh the transformers for the layer uh reach out to that layer. So we also have H_ two O_ uh that try to uh predict um uh try to basically use simple statistic to predict uh what are the uh uh attention score can be dropped uh when we are predicting next token.
I saw uh we also have uh attention sync paper. Uh I think people probably uh know this paper that uh uh actually show that uh there exist some attention sync uh for like uh sequence generations and the sentence sync usually at the beginning of the uh sequence. And then uh if you keep the attention sync, then all of a sudden uh the production prediction uh of your next tokens um will be very high, very low perplexity and no matter how long uh you keep your uh your your sequences. And we also
We also recently has a, last year we also have a GALO paper.
That try to basically leverage the low-rankness of the uh weights uh which is related to the sparsity of the attentions uh that to uh reduce the over-memory usage when we are training a model from scratch. Uh so here we can train uh seven B_ uh models uh in a single forty ninety uh which only has s uh twenty four gigabytes of memory uh because uh uh we can actually show that uh the uh the the weights are low-rank. So uh so not weights but the gradients of the weights are low-rank.
Okay, uh the weights are not low rank, uh but the gradient of the weights are low rank. Of course um this are basically the papers that uh we can do um in the empirical side. Then uh another question is that um how we can do go forward, right. So and also what kind of more structure can be merged uh from our uh s and uh analysis. So uh here's like one photo paper called drama. The paper basically get rid of some of the assumptions that uh we can make uh for the previous uh paper.
Right, so the paper actually is uh has mental mathematical details, uh but I want to just to want to have a very clear um uh summaries of that and uh tell you the the stories. Alright, so the idea here is very simple, you just uh start from this uh very simple this uh transform basic blocks and then there's some interesting nice properties in the green dynamics that enable us to merge the M_L_P_ layers and the stable tensor layer together into a modified
And it might be like this. And this modification is not an approximate, but an exact uh for some specific kind of attentions like linear attention. So once we have that, then because the entire dynamics become simpler, all of a sudden you can analyse not only the linear case uh which is actually the case that uh we have done in the previous uh scan and snap paper, but also we can analyse not non-linear case in which activation theta uh phi is non-linear.
Okay. So and what happen here is that in the linear case, uh we can get the same conclusions. Uh so there will be sparser and sparser attentions uh when we train our models uh and it's something that we can leverage. And then in the linear case, there's something actually happens uh is that the attention will become sparse and then denser again, especially in the uh top layers.
So that's something that's uh some it's kind of second order effects uh from non-linearity case. Okay. And with this framework we can also basically define the saliences in a much more uh refined manner. Uh so previously I mention about uh common tokens uh distinct tokens. There are basically two uh comparison, right. So you have two techn uh techne uh classification, caia uh classes, ca technologies. But now we can define basically uh can entire con continuum of the tokens uh
uh depend on this uh this good quantity. Okay. And for non-linear case, uh what happen is that you can actually prove uh that uh some uh uh the token that is most latent, uh their corresponding component will uh converge much much much faster than the token uh that has uh not corre quite related uh with the target token you want to predict. Okay. So this we will call this kind of interesting bouncing back properties.
So at the beginning the attention entropy is very high, of course everything is random, but since are uniform. But when things start to change, then all of a sudden like the uh the tokens that are salient uh they will quickly learn so their attention score goes up very quickly.
So that this actually make the attention entropy uh goes down. So you see the sparsity here. But if you train longer, then you what you see is the attention um entropy actually go back up. Because the the the the non-salient uh component actually catch up uh slowly over time. So you just see what you see uh the attention entropy. And this actually being perceived in real experiments. Uh so if you actually train the Wikitext uh data on on train Wikitag-103,
three uh with the our our uh transformers uh with uh the next token prediction. So what you actually see is that you have this kind of like uh bouncing back properties uh in multiple uh layers. One layer, two layers, five layers and also ten layers as well. Um so of course like in ten layers what you see is like the lower layer you go, things got goes down, but network bounds up. But top layer you see these properties. Okay.
Uh so of course like uh the question is like why this is important, right? So I mean sounds like it's only slow down the training, but not useful um in uh in one layers. We only want to learn everything from scratch and everything moves at the same speed. That's the very very best. But actually this is meaningful in the multi multiple uh transmission layers. Okay. So in order to uh study that uh we think one way to think about the data uh is to think about how it generates. Right so if you s uh imagine that you have a hierarchy
I will lead it a generation process, right? So you have starting from the class label Y_0, and then the class label will generate some latent variables that you have no idea what it is. But what we only can see is the the final token that is being observed. Okay. So of course like if you compute a correlation between the tokens, right? So you can c if you compute it's uh correlation probability, then what you can show is that now if you have two tokens that is in the lower hierarchies, then their correlation tend to be very strong.
But if you two coalesce M_ and R_ prime, they are in different hierarchies or they are common ancestor is very high, uh then their correlation is likely to be very weak. Okay, it's was very intuitive right, so if for example if you see the phase then it's likely that you can see the eyes and also you can see the mouth. So eye and the mouth will appear at the same time. But uh a a human being here and also an a a a basic a production screen on the back, the correlation will be very much much weaker.
So given that, uh you can actually sort of understand why the attention mechanism need to uh deliberately slow down the learning of the uh the tokens that has weak correlations. Okay. So what happen is that if your data already have a latent structure, then uh the attention mechanism will try to learn the correlation, the strong correlation between M_F_L_ that is in a lower hierarchy.
And the same thing happens for m' and l' at the same time. And once these two are learned, then gradually it will try to learn uh the raw correlation uh between M_ and M' uh in the later stage, right. So if the data already have the hierarchy, then what happens like once you load once you have learned the strong correlation between this M_ and M_R_ then naturally the the weak correlation between M_ and M_R_ prime can be explained away by the hierarchies.
Already. So then by doing that you are you basically avoid like a learning weak correlations uh between two tokens that are not in the same hierarchy, which the correlation can be spurious and can be harmful for your training.
This also explains that why uh this curve uh this is basically especially like this curve never goes up uh because uh in the lower layer uh this uh loo uh kind of like s w sweet uh sorry this this uh weak relation uh is not being learned because they are so being explained away by the top layer uh hierarchies.
On the other hand, the semantic kernel can also learn if there's actually not much latent structures in the data, right. So if if data is actually very simple, you indeed have very low correlation between m_l_ prime, but you still want to learn it, then eventually it will learn it it will be learned uh doing your training. Right, so that's actually is invitations interesting because the semantic actually enables hierarchy agnostic learning.
Alright, so this is something that uh very important, because this means that the same architecture can do multiple trainings and in uh different domains. Uh which is the uh which is the why, the maybe like the reason why transformer is very useful uh in the long run. And it can ma adapt to different data set. Okay? So take out takeaway message here is that um first of all, the architecture and you can basically do architecture and also train dynamics at the same time, and uh you can also analyse even in the presence of a non-
uh non-linearities, right. So there's properties of self-attention um it will become sparse and it will may have inductive bias uh that favour strong co-co uh tokens. And uh and we also uh give you a key insights that may lead to a broad applications. Okay. So I think I am not sure if I still have some time. Time for question? Uh yeah, So okay. any questions?
Thanks for a fascinating talk. So I'm wondering, does the conclusion also generalize to, say, like linear attention where like the softmax is dropped or to like Mamba where basically it's not just standard softmax attention but with like linearization or like other kind of linear complexity models, does the conclusion regarding like the token correlation still hold? I think that there's two different, so for

Uh I think that there's two different uh so for linear attention uh it's uh yeah, I think uh basically if you check the the details of that uh paper, what you can actually see that this will hold for linear attention uh and but we up to some normalization. So you're going to have uh some kind of normalization constant than it's there in order to make sure that it it it's it's that not blow up. Right so uh and uh actually linear attention you you actually have like a better properties compared to softmax attention.
Um, I...
Um, thanks for great talk. And I'm just wondering the the assumption that you made to analyse the trending dynamics like you assume there is no uh re residual connection or a skip connection. Is that correct? Okay, yeah, so uh I just want to make sure make sure that things are clear in that uh in the first paper I assume there's no residual connections. But in the second paper you can put residual connections there.
Okay, I Okay, see. yeah. I'm just 'cause um And there is another assumption uh basically say that uh the embedding layer has to be fixed and uh orthogonal. I Column see. orthogonal. Thank you. Um I think we have out of time now. Okay. Okay. Thank you for presenting.
Uh next we have oral presentation on context aware training. So good morning everyone. My name is Andrei. I'm a P_H_D_ student at the
Oh good morning everyone. My name is Andrei, I'm a PhD student at the Institute of Science and Technology, Austria, advised by Dan Alistar. And today I'm gonna talk about the most recent paper we did on quantisation aware training. Uh sorry? Oh, it just turned on. Okay. Uh then I'll start from the beginning. My name is Andrei, I'm a PhD student at the Institute of Science and Technology, Austria, and today I'm gonna talk about the latest paper we
did on the quantisation of our training together with a Java Chen, uh Saru Stadish, Roberto Lopez Cosa, Martin Ikden and d Danalestar. And uh to start with this topic I'll first uh say that the main reason why we're doing quantisation in the first place is because modern accelerators such as GPUs they have uh kernel support and hardware support for a variety of data types, some of which are low precision and some of which
of which provide huge speed-up over the standard high -precision floating point data types. And at such we might want to try and d design methods that could utilise those low precision kernels to achieve speed-ups over high precision data types. And the
To do that, the first thing we need to understand is how models are trained in the first place. So deep learning models are usually functions of uh parameteric functions of real numbers. And to optimise those we use the gradient methods, which means that to optimise uh those parameters we need to be able to take gradient with respect to them and apply gradient to them th to perform gradient updates to perform uh gradient steps on those parameters. And the way it's usually done with low precision representation is that
That to apply the gradients we actually have to store a full precision copy of our model parameters on which we can perform updates, uh arbitrarily small updates. And uh to actually perform computations in low precision we need to quantize those high precision parameters, those master of parameters that are on every forward pass of our model to actually use fast the low precision kernels to perform uh operations inside our model.
So
This uh creates uh this discrepancy between the parameters that we're actually updating and the parameters with that we using computations and uh this creates to additional problems that we are addressed with our method. And the first problem is that uh X hat, uh the quantised parameters that we're using in computations and X the master copy of parameters are actually different. And the to uh improve uh the performance of quantisation of our training methods what we need to do is
is to minimise the discrepancy between them. And to do this for a quest, we use findings from previous works such as that first uh language models weights are usually close to Gaussian in their distribution and we can try and use this information to use design a better rounding technique for our weights. And the second thing is that we sort of know from previous work as well that uh quadratic error is what's impor
it's important for l-l-l-l quantization. So w uh it would prob post for a quest uh is that we perform rounding in a way that is optimal in terms of M_S_E_ for weights that are Gaussian distributed. So in practice what that means is that we normalize our weights by their basicly standard deviation and the map onto a lattice in a way that it would be optimal for a normal distribution.
So this is the forward pass of Quest and the novelties that we have there. Another problem is that this quantization operation that we use to b to to map between full precision weights and quantized weights is actually non-differentiable, so we actually need to do something explicitly to address this, so to design uh a gradient, a backward operation, a backward uh computation for this operation, some sort of estimation. And what people u usually use in practice is that straight through estimation that
that approximates the gradient of this step function with just a linear function, which is uh works well for high precision, but might not be as uh useful uh for very low precisions because as you can see here the discrepancy between the real function that is step and the gradient that you're using that is the linear function is actually quite large. But one other thing that we see is that since we use some non-trivial mapping between the grid
rate and the values on our forward pass. Actually some portions of the distribution of the weights uh are located outside of the grid that we're quantizing to, meaning that the details of the distribution get clipped very heavily. And uh as such, uh the straight through estimation that says that the gradient uh is uh just a pass through the separation might make sense for points inside the grid uh
Where is the the weights are actually sensitive to those updates, but doesn't make sense outside of the grid where the values get clipped and that are not as sensitive to those updates and also they change a lot during the forward pass and uh we can try to formalize this idea with the fact that we're actually applying the gradient to the full precision base W_ but calculating them uh
for the weights uh W_ hat uh the quantized weights, and to minimise this discrepancy what we can see is that maybe it might make more sense to instead of applying the gradients for this w clipped weights for which the the discrepancy is the largest, we might uh just it might just be better to zero the mouth completely. And to do that we introduce this uh idea of trust masking where we apply binary mask to our gradients for the points that change the a lot during the forward
four is pi, its meaning four is the weights uh for which the discrepancy is the largest. In practice we do it via some threshold that we choose such that all of the points inside of grid uh get their a gradient uh via a straight through estimation like procedure. But the points that are way outside of the grid get their gradients set to zero, and basically masked out.
So this is the basic core of quest. So on the per forward pass we perform quantization uh with uh an msc optimal fit over normal distribution basically. And on the backward pass we apply masking to the values that glipped were clipped too hard during the forward pass.
One another thing we can do to improve this is we don't actually have to assume the normality of the weights because we can use the run-time processing transforms to guarantee that our weights are actually normal distributed and they get the best match between the weight distribution and our method as we can. And in practice we do it via Hadamard transform which introduces some run-time overhead, but is asymptotically neglectical. Mm.
as I said, totally non-important in terms of runtime.
So, as in general our method can be summarized, we apply this quantization to both weights and activations to be able to then use fast cores for matrix multiplication. And on the forward during training we need uh two Hadamard transforms on the forward pass, one on the weights, one on the activations, then we perform matrix multiplication and low precision in this Hadamard transform space. And on the backward way, uh apply the masks that derived during the forward pass and perform the
In inverse kinematic transform to propagate the gradient back into the normal space and propagate it uh through the model further down. So what we get in the end is that our method allows for stable training for bit widths as low as one bit for both weights and activations, meaning binary weights and activations. And it it is sort of optimal at around four bit and to formalize that we provide further analysis in the form of scaling laws.
So what we do is we fit this scaling loss, that is basically scaling law proposed by Hoffmann and co-authors in their Shinshilla scaling in their Shinshilla paper, but we also introduce the multiplicative effective parameter count that depends on precision that only affects the parameter count term of this scaling law. This idea on itself is not novel, it was present in a few previous work. And what that means is that

And the what that means is that basically we have to train a number of models with different model sizes, different uh number of tokens trained on and different precisions to feel to all of those parameters like A_ B_ alpha beta E_ and also effects of parameter mul multiplier for every precision. And what we see is that this effects of parameter multiplier is basically one for eight bit, meaning that eight bit fully recovers uh the performance.
ones. And then it starts drop off rapidly starting from four bit and the s drops to basically zero for one bit weights and excitations. So to actually analyse this scaling law we analyse a specific regime that is the over training regime where models are saturated with data which we can formalise as taking the limit of for d to n to infinity or basically just by nullifying the second term of the scaling law to arrive to the over training scaling law so where we only have the
the parameter you count and the precision as the parameters for our scaling law. And the while we
want to quantize in the first place is to obtain speedups. And the way we can introduce speedups in this scaling law is that we can introduce some sort of runtime cost on our model that would be proportional to the number of parameters, but also have some sort of cost function with respect to precision that we're using, because as I said we're targeting specific hardware kernels that are faster for a lower precision. And using this scaling law and this limit
given it uh only our runtime cost, we actually can reformulate it uh the simple optimisation problem where we would see that the effective parameter account from the scale law and the cost function from the actual speedups that we get on hardware, uh
I just divided one by the other to introduce these single factors that depends on precision and as such to select an optimal precision all we need to do is select the P for which this factor is the largest and on the plot on this slide you can see that this uh factor peaks for at around four bit per parameter. But also is also better for more complex representations like combinations between quantization and sparsity that is
is actually supported on hardware on modern GPUs, and this is why this allows its to analyse it in the framework of speedups to effectiveness for training large language models. And uh yes uh the sparsity that is used for this specific
Uh representation is quite complex where it's a structure of sparsity where out of every four consecutive pairs of elements two are exactly zero. But what we need to know in practice is that there is kernel support for it. It's practically two times as fast as the dense models of the same precision and we can see that this two time improvement in speed actually overweighs the the quality degradation on this precision and in general allows it
to be the best representation in terms of this over training regime runtime cost trade-off. So this would be all for my presentation and I'll be happy to answer any of your questions. Um uh thank you for the talk. Um
So uh you mentioned that uh you use Hadamard transforms to mix the weights uh right Yes. to make them uh normal distributed. Uh I also saw like in uh in spinquant they use kind of for a similar purpose they use learned orthogonal matrices. Have you considered that? Would it be beneficial if you use the like orthogonal matrices which are learned to minimise the kind of uh but but basically like
learn the transformations instead of say using uh Hadamard or Uh random. thank you for the question. It's an interesting question. Uh for a spin quant uh spin quant is a post-training quantization method that's actually quite computationally heavy. And we could try to add this additional parameters into our training method but that would also mean that it would slow down the training process itself and be more of uh additional over parametrization uh thing for our method instead of uh just quantization of our training where we're only
We only focus on sort of these mapping between grids and the gradient estimation. So this is an interesting possible research direction in the future on how to effectively over-parametrise our trained models to make them more compressible, but uh we haven't explored it in this work, thank you. Time for one last question.
Uh thank you for the great talk. So as I understand those speed up start theoretical speed ups when you go from eight bits to four bits and two bits and so on. So in practice when you actually implement these algorithms what is the speed up that you get when you move towards four So uh bits or lower? uh thanks for the question. I have an extra slide for this. So in practice we implemented kernels for all of these. And first of all we observed that the impact of the Hadamard transform on the runtime and sort of negligible uh where we lose around five percent performance, maybe five to eight.
percent performance on average. And uh you know the speed-ups that we can achieve are up to four X. And in general I would say that the larger your model is, the better it the easier it is to uh saturate your motors to actually saturate those matrix multiplication kernels and get closer to the perfect speed -ups. I think we are uh out of time now. Okay. Thank you. Then thank you.
So now it's time for poster session, followed by lunch and mentoring session. People who registered for the mentoring session, please find your mentors. Yeah, thank you.





Oh















Bye-bye.

So hope you guys had a nice lunch. We're going to get started with the panel discussion. So I'm very excited that we have some excellent panelists here today. I am going to be moderating this discussion, but I'll be talking very little and mostly you'll have a chance to hear from some folks with a lot of experience and a lot of interesting things to say, I hope.
So, first I'll just, you know, give a, you know, sort of brief introduction of everyone. So, starting closest to me is Dr. Yang Yu. He's a presidential young professor at NUS. We have Olivia, who is finishing up at Stanford and is then going to become a professor somewhere. She won't tell us where, but that's okay.
And we have the first Dan of our two Dans, Dan Fu, he'll, you know, he's a
We're going to be starting his lab at UCSD, and if you have used Together AI for any of your inference compute, you may recognize his name on the PRs. And then we have the second Dan, Dan Allistar, who doesn't need an introduction because he already gave a talk today.
We have our more industry side of things where we're going to try and get these guys to divulge some secret information, you know, break their NDAs, you know, write that down, write that down. And we have Amir and Pablo and Amir is going to be giving a talk later. So I'll save, you know, some information for that. And I think.
It's 1.10. Looks like most everyone is sitting down. So let's get started. So I'm going to start off by asking a general question, and we'll just go sort of down the line.
We study sparsity in a lot of different forms, but wherever we study it, we're thinking about how to make something about models more efficient. And our workshop is specifically about LLMs. When we look at efficiency, we're looking at trade-offs, and whether it's in training or inference, I'd like to hear about...
A surprising trade-off that you've encountered when employing, you know, sparsity of some kind to make something more efficient for LLMs. It could be something unexpected happens in generalization or robustness. You get some degradation you weren't expecting somewhere. Yeah. Who should start us off? Start at one end.
Yeah, uh hello everyone. Um so the question is about uh right doing sparsity for LLMs and any surprises there. Um let's see. I mean first of all, obviously LLMs are very big. Uh can you can you hear me? Okay, yeah. No, you cannot? Is it better?
Okay, yes. So LLMs are very big. They are over parameterized and obviously there should be some room for sparsity and there is sparsity there. Sparsity can be different. I will potentially mention about surprises related to attention.
Um so you know in standard architectures we have attention, M_L_P_ uh and we uh kind of cocks this block. Um when we try to compress large models like Lambda 405 B_ we observe that almost half of attention layers are not needed there. You can you can remove them. So I I think this is like extreme sparsity right um
In this scenario. So we should try to challenge current, let's say, architectures and try to find where we can increase the sparsity. Yeah, I think that that's on my end. Sure. Yeah. Hi, everyone. So surprising thing. I think I would say like for the eval.
When you apply a sparse CV, observe that for some reasoning tasks, which I don't, I cannot say which reasoning task, but for some reasoning tasks, there are some degradation of quality, which is particularly significant, especially if there are like a long traces of the answers.
So it's really important that your sparsity technique, whatever you propose, be able to kind of generalize across different benchmarks that, of course, different companies care about. So that's one of the challenges that we have when applying any sparsity techniques.
um yeah so i have an older one uh i think what my sort of most one of the most surprising things i've seen uh has been like for instance if you have like a like a vision model and you're training it over many many classes and you're you can actually apply like a one-shot parsification algorithm like we were using something like sparse gpt and we noticed that you can sparsify the network like a network that was trained on image net
at to 95 percent like just leave 55 percent of the weights and it like basically as long as you kind of your sparsification algorithm takes into account this calibration data let's say just sharks this is actually a real example so basically resonant 50 can do perfectly fine classification of sharks with no degradation with up to like 90 to 95 percent of the weights being removed so if you actually do like my point is like if you do pre-training and then you
you focus on specific subclasses, then you actually only need a very small fraction of the weights to activate for a specific

to activate for specific subclasses. So this was actually something we later leveraged for like some interpretability work that my student Jen did. But I think it kind of says that there's still kind of some surprising thing. I expected maybe 50 % of the weights to be non-necessary, but I didn't expect like only 5% of the weights to be necessary for this. And there's like a lot of sort of tricks that once you see this, it's like, oh yeah, I should be using this more.
Yeah. So and I guess it also sort of connects to MOEs in some in some way
So I've been most recently looking at sparsity in diffusion models actually, so image generation, video generation, and actually so bouncing off that answer, we were really surprised how sparse you can make some of these state -of-the-art image generation models and still maintain quality across a wide variety of things. So like 90, 85, 90% sparse and quality basically didn't change.
It's like to the human eye, you could barely notice any difference in the final generated images and videos. So I think that probably speaks to something maybe fundamental about visual domains, at least so it seems like in resonance and certainly in transformers, the ways that we represent them today, there's a lot of extra compute that we might not necessarily need.
Hello. Okay, so my background is more from the hardware perspective and I started out in sparsity and moved towards machine learning. And I think one surprising thing from the hardware perspective is that a lot of the sparse algorithms that we look at fundamentally
don't work well with the hardware that we have and so one of the big trade-offs with how like we know that sparsity can get you flops efficiency to some extent if you do a back of the envelope calculation but it leads to a lot of complexity trade-offs so there are trade-offs in the optimization space that you can do
There are trade -offs and now your data or like your performance becomes dynamic to the data and so you then lose a lot of the reuse that you have that you get for free in a lot of dense models or a lot of dense kernels that you would run.
And so from that perspective, this is maybe surprising in a worse way than what other people have said, which is like the flops that you envision that you get doing a back of the envelope calculation like, you know, 10x reduction isn't what you actually end up getting when you want to run something sparse. And then so it's led to a lot of interesting ideas, but it also leads to a lot of kind of.
Like projects that I've seen or will be presented at poster sessions, how do you get go from like some theoretical limits of sparsity to actually translating that into real numbers when it comes to wall clock time, speed of performance and also accuracy?
Okay, so I believe sparsity is probably one of the most important things for inference, especially for the product level or the application level. Because for me and my students, we are trying to deploy a video generation AI model. So we found that we can use some tricks of sparsity to make the model run 10 times faster.
You know for the product level we charge the user by the number of tokens or by the number of video generated, right? We make it given the same GPU, same number of GPUs or same hardware. If we can make it 10 times faster, we can make our revenue 10 times larger. That's so important I think, especially for the application level.
However, I have two concerns for sparsity. So the firstly, the first concern is we don't have a good benchmark. Often I claim that my model is 10 times smaller or 10 times faster. But we don't know which benchmark.
Can we show our model is still accurate, still get the same level of intelligence? That's the first concern. The second concern is some sparsity is not a regular, which means it's better to just use SVD, right? You use a singular value decomposition, you basically decompose a big matrix into two smaller matrix.
So this kind of matrices, they are regular. They are very friendly to GPU. If we design some algorithm to achieve a very high level of sparsity, but it's not, maybe not very friendly to GPUs. The algorithm actually may be slower. Even you make the model 100 times smaller, but it may be slower.
Okay, thank you. It's very interesting to see a lot of different perspectives here. Definitely interesting to hear, Dr. Yu, your recent work on OpenSora, where you take advantage of compression for the video autoencoder allows you to represent one token in video space as a tenth of a token in lane space.
I wonder, is this similar idea of token compression something that we could use for language modeling?
Okay, uh thanks for question. Yeah, uh so the background that is we design the open source model. Uh the key trick uh for the open source is to design the better uh encoder, auto encoder. Uh because it can compress uh uh latent space information. Uh in this way we can reduce the number of tokens. We know transformer the computational cost is proportional to the
a square of number of tokens, right? So that is why it's so im so so important. So uh as for the question, I believe it's possible in the future we use the same idea uh actually we can maybe use a deformed algorithm for a language application as possible I think in the future. Yeah. Uh for for for the
For language application, we can also build a latent space, right? Because the same idea, we just want to reduce number of tokens to remove the redundancy in language information. I think that means we need to build a maybe a proper latent space for the language information and then we can use the same idea. Yeah, so the most important thing is first I build a good latent space.
Then we use the same auto-encoder idea to reduce a number of tokens so we can reduce the computation cost. Okay.
Interesting, a very interesting answer. A diffusion L_L_M_s, not the kind of thing you'd expect to see at ICLE. Um because all these papers were submitted a very long time ago. Um I'm gonna bounce a question over to Pavlo. So uh Pavlo I think the the paper of yours that uh I know you know the the most well just because it's been there the entire time that I've you know been in research uh is on printing C_N_N_s for for fast inference. And your most recent paper
that I've taken a look at is pruning hybrid SSMs. And you know, from CNNs to hybrid SSMs there's a massive amount of modeling in between. As you look forward, maybe to some kind of latent diffusion model with like a text VAE or something, what are some of the like
generalizable technical insights on pruning that you think people should be thinking about not just for current cutting edge architectures but also for future architectures that might be created. Yep, thank you for question.
I actually don't know the answer. So because uh diffusional lamps is just something we are starting to explore. Uh it it has a you know very good uh potential for efficiency on GPUs. But these models uh lacking a bit behind, at least on benchmarks. So we need to understand where these models are good for what applications and
and dive deeper there. Uh but yeah, um I will so answer differently about pruning. I think um you know pruning is very important topic and uh I looked at it when I wanted to do a demo of gesture recognition. So I wanted to show the live demo on laptops that my computer vision model works and I found out that I cannot do that. So there was not enough compute. And we started to think that we can remove parts of the model.
to make model faster. Some may uh kind of first call out uh to all of you is that when we work on pruning, we need to uh be careful what do we prune for. Like i i is it just a reduce number of parameters to store the model more efficiently, or I really care about throughput um or latency. And then even in this cases in in terms of L_L_M_ our batch size will matter, our hardware will matter where
we run it. So yeah, my common here is that let's be careful when we talk about pruning and make sure that we consider constraint or at least direction why we are doing pruning. Yeah. Okay, cool. So now, Amir, I guess this is, you know, you know.

Just, you know, I want these questions not just to be directed towards, you know, one of you, but also, you know, a chance for discussion. So I'll cheat a little here and ask a question about a paper that you and Dan have together. So I was, you know, wandering around the poster session and I saw this, you know, paper, you know, the journey matters, you know, on unified scaling laws. I think that it's...
You know, certainly it's uh you so this question could be, you know, for for you or Dan I don't know of whoever, you know, maybe both of you have something to say It would be really spicy if you contradicted each other, but I don't think it's gonna happen So, you know, we It has think not been the same paper. How can we contradict each other? It's how it's been known to happen before
So we think a lot about efficiency. Obviously, we look around the poster session. A lot of papers are looking at efficient inference. Some of them are looking at efficient training. And the paper is making the point that if you look at both of these, you'll have some different conclusions. I want to know if, suppose that we have one kind of model that's optimal for pre-training because it has the best MFU, the best test at loss, whatever. And then I have a different model that's optimal for post-training because maybe...
you know Amir as you said it does the best in you know generating long context traces which is what is important for RL post-training and you know maybe the inference is fastest how do you think about looking at something that is optimal across both of these things or if there isn't the same thing that's optimal for both of them can you make the optimal pre -training model in some mid-training stage be optimal for post-training
Yeah. Okay, so I mean, I think that's a very, it's kind of a very strange question because what you're describing, no, I mean, you're kind of describing a multivariate, like, I don't know, a function of two variables and you're saying, okay, these two variables are somewhat orthogonal because you could put the pre-training cost and the sort of the inference cost on completely different scales. And then you're saying, okay, how do I optimize for both of them at the same time and how can I optimize for both at the same time?
How can I make this be optimal with respect to each one of them at the same time? And unfortunately, I don't think it's entirely possible to do this at the same time. I would say going back actually to your previous question to Pablo, maybe one of the things that I realized having stared at prunings papers for a long time is that everything is a scaling law. So basically depending on where you are...
or like if you're allowed to fine-tune for a long time or you retrain from scratch then technically you can obtain pretty much any sparsity at any accuracy like within within reason or something like that but at the same time this doesn't mean that what i mean we both utku and i have papers where we trained i think i trained uh over like i don't know thousands of epochs and he trained over tens of thousands of epochs to get like the super sparse 99.9 sparse
Resonance 50, 'cause that's what we were very excited by like five years ago. But the point is like uh I don't think we wanted to show that this is something you should do because that's super expensive in the edge area of L_L_M_s. No company was oh like no one gave me money to run the same experiment. So yeah uh for for for actual a larg a larger model, but the the point is like it really depends what you want. Like if if you actually want to get
Like the point is like everything is a scaling law therefore like if you fix one of the parameters and then you ablate over the other or like vary the other you can pretty much obtain whatever whatever you want But I don't think there is such a thing as something that's optimal for pre-training and optimal for inference at the same time unless you're in a very nice sweet spot or something like that and turns out a lot of the time the optimal model is actually the dense one so there's no sparsity so there's not nothing
thing interesting for us to talk about. And maybe Amir Well, I guess I mean
Sure, I can make it spicy. So I think there could be, I mean, the thing is like, if you think about pre-training and post kind of RLHF and other kind of post-training, the computation pattern in let's say the pre -training, very simplistic view is like back forward and forward pass, right? So again, it's all about the trade-off, like how can you during pre-training, maybe you can put more weight on the kind of back forward.
support pass and introduce some form of sparsity that's works really well and reduces the com the the computation overhead during backport pass, but at the same time you should not forget about the forward pass as well because that's what matters at the uh post-training regime, right? Um so let's say um um something that um I think we can talk about it like, maybe maybe during um during pre-training you can put
much much sparser kind of computation during p um uh back warp pass, but for the forward pass you can be kind of be go easy on the on the tensors. And that could kind of benefit you when you are in the post-training uh phase, uh like when let's say you want to do R_L_S_F_ or some other uh techniques, you can kind of apply your um uh kind of a sparsity pattern during forward pass. I think
There is an overlap, I see, because I mean at the end of the day pre-training is a backward and forward and the forward is the part that you use it for inference and the backward is mostly what you use for the pre-training. So yeah, I think it's really important to come up with a computational pattern.
that does not necessarily map to inference but at least goes into that direction so during RLHF and post training you can kind of enforce it to map to your particular hardware
Okay, I mean certainly whenever, you know, we have a discussion where, you know, we've got disagreement, that's what I want to see. And, you know, we've got three mics in the panel, so if you ever want to, you know, speak up and disagree, I encourage it.
Great. Exactly. I can try to make it even more spicy. So, right, we have sparsity. And I think we should also be careful that there is sparsity in weights and sparsity in activations. And I'm really into sparsity in activation because, you know, data can be different, the one we run our LLM in. But sparsity in weights, I was always doubting that...
Can it be that it's a problem of optimizer that some of the weights or some of the you know entire channels are not used? So I would like even question if we have a sparsity, is it good or is it bad? Is it or is it just because of our optimizer or training data or our architecture? So yeah again my point here is that let's try to separate sparsity in activations and weights and there is definitely much more sparsity in activations.
So I can say something in response to Dan, which is I do agree that finding an optimal for pre-training and post -training, maybe you're too...
like what you're looking for is completely different and so being optimal in both may be impossible right but to some extent like yes you have two functions and they have different inputs and then you're trying to find the best like the optimal output for both but it's still a Pareto optimal right so you can still I think it's very hard oftentimes for us to answer what is the Pareto optimal of those two functions even though they look very different and they have very different inputs
puts and some people are trying to find that because maybe they are you know starting uh trying to develop hardware that they want to work on both training and inference for example right and and that's a lot of what we look at which is in the hardware space because everything is scaling and everything is so large these algorithms are huge and it's very hard for us to grasp um
running both training and inference models on the same hardware, right? So we only assume inference or we only assume training and then the hardware ends up looking potentially very different. And I would like to challenge people to think about what does the Pareto optimal look like and are there better ways for us to solve or to answer Ashwini's question of, you know, how do we find something that works for both stages or is there a correct?
directive factor we can insert in the middle where then it makes our lives easier. Yeah.
One thing I'm actually curious about there, so having not read your paper or looked at your poster, I think naively one would think that if you have a better pre-trained model, it's going to be easier to RLF or you're going to have better end performance. So I guess one way to ask this is, is there really a complex Pareto optimal space there or is it just get the best pre -trained model you can?
And then go and R .L.H.F. that is there where actually is that trade off between like if you sparsify your pre-training, I guess if you're if your ultimate metric is cost, pre-training is so expensive, you could save there. But if your ultimate metric is quality, how do you think about that and like where does that land?
I mean, interestingly enough, there is actually a paper, I think, from Meta that tries to address this. It's called Pareto Q, which I'll just mention it because it sort of helps my point because it's actually like a full scaling law type of paper where they essentially, I hope I'm doing justice to their work, but basically what they're saying is like, okay, let's assume that you're going to be...

assume that you're going to be doing quantization aware training I mean the same would work for sparsity after some fixed point in your training so let's say you do pre-training a dense for a long time and then you actually want to prepare your model for deployment and then the question is like at what point do you choose to start doing the compression part and turns out there there actually is a very complex function that gives you like model size versus number of tokens versus
is when you choose versus the precision that you choose and so on and so forth. So yeah, I mean I d I think uh so I think uh they give an example of such a trade-off for at least one form of compression. So they're doing this, I think, for four bit and uh maybe a bit lower. So it's it's interesting that you can get the these types of laws, but they can look arbitrarily complicated Wow. Awesome.
Yeah, really didn't expect that level of discussion. So I think one of the cool things about this panel is that we have such an interesting split between industry and then industry slash academia, academia and then, you know, all of the, you know, sort of like trade offs, if you will, in between that. So I'd like us to ask a question that's not really related to sparsity. But I think, you know, starting from Dr. Yu, like, what do you think is the role of academic research?
particularly for things like element efficiency that are very very close to being like you know useful for industry applications what is the role of academic research there and then you know for the more industry you know oriented folks like what do you see as being the role of academic research when you know like you're going to be the ones you know actually like deploying things and you know seeing these costs and benefits You can start.
Uh okay. Yeah, so uh I believe for today uh for the deep learning is partially uh so the research actually is close to industry application, right? Often we train our model at base.
Very good. Normally we can just deploy the model. It's so, so easy. So I think in the future, because today topic is sparsity, I think there are some research we can do that can benefit the industry, especially as we mentioned. So if we can have a good sparsity in the parameter, in the weights, that should be very important for the future AI agent or the
AI product. I think for me it's already very close to each other today. So I'm going to say something that I might not believe, but I'll say it anyway.
Being from Stanford and near a lot of startups and companies, you often get to ask people what they would want to work on or problems that they would want to see. And they say, oh, this is an interesting problem or this is a problem we've struggled with for LLM efficiency, but most research problems in general. And they say, but like if it if we could solve it, it would help us. But we don't see if we solved it, that we would make a profit.
And then so that's why they then don't go and solve that problem. And so from an academic perspective, like you do want to solve problems that have real world impact and that, you know, you try to scale as much as possible. You have these limitations, but oftentimes it's looking at problems that could, if you proved to some prototype level that it works out, right, then it would be adopted in industry, but there's no like.
pushing factor from maybe the company leadership because they don't see a path forward in it making money it would just make people's lives easier and so from that perspective a lot of the research projects that we've been able to do have been that right like kind of rethinking something or creating different abstractions for things to make people's lives easier and then once you prove to some extent that efficiency you can get some by at 5x 10x or something then industry or you know
open source labs will take it and then implement it into their own product
So I straddle academia and industry, and I'm actually quite bullish about academic research right now. And in particular, I think the barrier to entry to have a lot of impact in academic research has really never been lower. I know a bunch of us, a number of us were doing research four or five years ago where, you know, they, you know, or I used to say my mom didn't know what I did in research.
And now she kind of does. And it's, I think it's the case now that especially for inference, if you can run the model, then you have enough at your disposal to really make an impact. What we're seeing even at the frontier, at the cutting edge of industry is that a good idea in academia will be adopted in weeks if it's something that is, you know, relevant.
and particularly interesting. I think it's true of a lot of inference optimizations, a lot of sparsity. Like if you can get sparsity that results in actual wall clock speed up and if you can evaluate and show that the quality is still good, you know, people will adopt that and just eat it up. And I think it's the case in industry, especially since the...
You know, the industry is becoming so competitive. There's so many things to do. There's so many things to focus on, like a big industry lab today. If you're a systems-minded person, you're going to be working on the training of some people working on inference. You'll have some people working on RL infrastructure and all these things. There's not actually that much. Certainly there's more GPUs or more resources, but.
Industry does not have
more ideas or more people to think about ideas. So it's not like if you did it in academia, oh, someone would have done it in industry and like immediately or they knew it already. It's just there's too many things to try out. There's too many ideas, too many good ideas out there that I think we're at a place right now where, you know, go in any direction and the minute you have some good insight, it's probably novel.
Um and there's a good chance that it can be useful. So that's my very bullish take on academic research. Uh...
So I think that's a very nice point. I want to both reinforce it and slightly push against it, but you'll see it's a good direction. So I think on one hand I think I view my role as a sort of an academic researcher as like I really want to try out or validate or invalidate crazy ideas. So I think it's great to have, I think you have more freedom when you're an academic, you have you're going to fail more hopefully.
hopefully but uh you're probably going to also run into things that are kind of more novel like to give you a very brief example like we we came up with gptq in september 2022 i went to like the people at neural magic who were kind of doing inference and i told them you can do this for opt they just laughed me out of the room because like first opt was a pretty bad model no offense but but and then they were like no one's going to want to run this like
It's like, why do we care? I mean, they started caring a lot more like six months later after ChatGPT and so on. But I think that it was important, actually it was important for the company that the algorithm was there and they were able to sort of pick it up quickly and so on. And the point I want to, so I think academic research is essential and I think you should be always working on one of the top three craziest ideas you have in front of you. Because I think at the same time the industrial...
chill people are actually going to do probably a better job at you of going on the safer path that that's kind of easier to implement the thing i want to sort of push back on is i think compute support is something that academics are suffering maybe not academics from stanford but certainly academics from other people from other places so i think if there were some program i think for instance google collab is amazing like if there were some program where people could get like access to higher
higher tier compute to try out ideas, I think that would be very very impactful. So Um yeah, I think I I agree in
And I'll let you move that mic on. But I think that's true of a lot of training and pre-training. I think it's very hard to do pre-training research right now in academia just because of the resources and the money involved. A lot of the work I do is kernels work or optimizations that requires, you know, innovations there. And for that particular niche you need...
you need one GPU that has the latest instruction set. Yeah, but even that, like if you if you want to get like a 1590 now it's very hard, right? It's it's also very expensive. Yeah. So I i mean I I don't want to belabor the point. I think we are actually in agreement. But yeah. So yeah. So um s I have two points. One since about benchmark and once is about academia and industry. Um so
Actually, so I understand that in the academic kind of environment you need funding, you need kind of gets money and all this stuff you have to pay your students, but actually I don't want academia to work on things that industry is working. I think I agree with Dan too on this part that if you work on something that industry is already started doing or doing it,
Again, I'm seeing it in maybe in a jerk way, but we have much more resources and much more people to do it. And they're going to do it in a faster way. I actually like when academia is working on something that is

is working on something that is not on the radar of industry at all. That's where kind of interesting idea come from. That's where interesting kind of solution comes around. I understand the challenges of compute and everything which
Actually, I think Google, to kind of promote Google a little bit, Google is doing a really good job on this matter. Colab, you mentioned, we have Mac sticks actually, so we have a programme for industry to
to if you use JAX we provide a lot of resources because Everything was going it's well. good because it's good so we have a lot of resources that we can provide to pre-train inference whatever so there are actually a lot of engagement between industry which I've Google and academia that you can use for your resources so yeah I think that's that's one point
Another point is about benchmarking. If you look at the kind of history of AI, it's kind of very simplistic view when we had like an image net and image benchmark. I think there was not that much divergence between the benchmark that Academia was using and the benchmark that industry were using. So once if you have an idea evaluated on image net or some other image benchmark.
We had a certainty that it's gonna work on some kind of industry benchmark as well But these days, I mean I can see the amount of benchmark and evaluation that we have at Google internally and we have to evaluate it Versus the benchmark that's kind of academia is working. It's totally different and it's actually growing the divergence So like we have this zero shot kind of things, which I mean it's great. It's a great signal
But there are tons of other benchmark that industry cares about and they have to evaluate it and they have multiple kind of RLHF post-training and all this stuff which kind of creates this divergence between the ideas that you evaluated in academia and evaluated in industry. I don't know the solution. I don't know how we can kind of create some set of benchmarks that make these two areas closer together. But it's a real problem right now to evaluate things.
Can I say something about that? So I agree with you. So besides computing resources being less in academia, I think having access to real world data is one of the things that people often underlook. And I agree it leads to diverging benchmarks.
This is interesting because, again, from the systems hardware perspective, in the PyTorch 2 paper that came out last year at ASPLOS, Jason made this point about that. When we go and publish in academia, oftentimes we are benchmarking on one or two kernels or using baselines that aren't configured correctly. And this happens a lot in other communities too that are not ML related. But the point is to try to make it...
get as realistic and as fair as possible. But I also want to push back on that and say oftentimes the research that we're doing, we don't have access to the real world data because industry won't release it, right? Because oftentimes
That is the thing that makes them money or that is the thing that they got from private user data that they cannot share. And so I also don't know the solution for this, but it is a big problem. And it's especially, I think.
fundamental in the sparsity space because sparsity adds a lot of complexity and so people tend to I've seen pick and choose how they benchmark because and it's not and it's not because they want to make their numbers look better it's also because like oftentimes we don't know how to benchmark properly and so that's just a thought to leave out to people of how to how to help with this divergence and and and from both sides is a
There's a cooperation. Yeah.
Cool. Yeah, so industry versus academia, you know, I've been thinking about this. I'm on the industry side, right? And if you think why industry right now is working on, let's say, LLM or efficiency is because we expect to make money out of it, right? We want to build products that are going to bring revenue. And the best solution there right now is you just buy more GPU and you're going to kind of save and get.
better outcome out of this one. And uh yeah, we need to just try to scale there. On academia side there is a l limitation of GPUs for example or or T-PUS. We have a lot.
Okay, yes. So uh so there is this uh constraint limitation of resources. And I actually think it's good, because uh in this way, academia challenges the things that are there. Like you know why again, why do we have this transformer?
Oh, Mm-hmm. man. Uh yeah. And basically th this we don't provide resources because we want you to innovate more. So that's Exactly, exactly, this this my point. And uh we can see how uh a lot of amazing work we have like we talked about GPTQ, write spar GPT, you do in one GPU. I will probably never think about it because I can just run fine-tuning with more GPUs, right? Or another example Thank is you. Thank you, Pavel. Thank you.
You have to acknowledge industry. Yeah, one more example is, for example, the speedruns on Twitter. I was like a big fan of them, especially when they started, because people can do a lot of stuff using very limited resources, and then what we can do at industry just scales those things up, right? And I think this actually kind of scenario works in at least the way I see for research of industry versus academia.
I do also want to comment that the solution of buy more GPUs is a very NVIDIA lever to pull. So I think even in industry we can be GPU constrained. Surprisingly so. I think if you intern at some of these companies, at least from what I've heard, the number of doors that say no to computer resources is quite many.
Pablo, I have the economic Okay, resources. yes. Okay. I think one interesting thing that you all commented about is this idea that there's a transition of some kind of idea or technique from academia to industry. So it would be great if you could comment on, you know,
maybe like a time that you saw that or a time that it didn't work out. But I think what I'd like to get in a sense of is like, what is the biggest challenge in translating an idea from academia to industry? What?
like have you seen like break when you scale it up i think we've already heard that you know benchmarks is definitely uh you know one thing and i think uh you know we're all aware of that um but what else you know what what is maybe something surprising that breaks if when you saw you know like scaling up a method from industry or to academia
uh so uh I I think uh as mentioned uh by some friends so it's very uh it's mostly impossible for ac uh for P_D_ students to do pre-training research uh in a university. Uh we assume we can still do the inference uh inference because we often assume you do inference research, you just need a one G_P_U_ or one server. Uh however, recently
Uh we know some model like uh deep seek, uh the best performance you need uh six hundred eight A_G_P_Us, uh that that means uh for this kind of research for the inference, in the future maybe it's also too hard for a academic people to do. Uh I I don't know that's good or bad uh but but it's definitely a future trend. Yeah.
So, I'm not sure I'm supposed to say this, and it's not the biggest obstacle, but we did have a project more on the system side, and it was being implemented. We were collaborating with members in industry after they liked a publication that we had.
The reason why it didn't work out is because in industry, I'm not going to say which company, but maybe you can deduce it. They have multiple systems paths down from multiple different high level, you know, model languages and APIs. And it turns out that.
They internally may compete or a project may be ended and then you no longer have help, you know, implementing that into some open source systems version or another version wins out and there's like nothing you can do, right?
That's probably not the biggest obstacle, but it's something that that does happen. And yeah, I would I would say especially in the sparse space, because it's like oftentimes industry or companies are hedging whether or not this idea will work. Right. Because it's not.
Like they can always fall back to the dense model being somewhat more optimal. Well, maybe it's slightly less efficient, but they can still get it working. And if the framework doesn't support some of these sparsity features, they try to add it in. And if the project isn't seen to completion, like who knows, right? So that's maybe not the biggest obstacle, but it is a tension where sometimes you're like, oh, we think this.

where sometimes you're like, oh, we think it's a really good idea and then ultimately you just have to let it go to some extent. Yeah. I think in terms of the academic to industry transfer, I think one thing, you know.
Ph.D. students often don't anticipate is the amount of work that it takes to actually go from the prototype that works for the paper to something that people can actually trust and use. So one, so for one example from my research for when we did flash attention, the very first version, you know, was relatively simple, like causal, non-causal, QKV.
be um like softmax attention um but then the amount of work to actually go and make it broadly usable to get it you know upstream into pytorch to get all the different formats that people were using um to like support a kv cache and then a paged kv cache and then you know rope fusion and this and that um all that work is work that doesn't appear in the paper
But somebody has to do it. And when it's a new idea that's first proven out often, and if it's your idea often, you know, you're the person that has to do it until you've convinced enough people in industry or otherwise to kind of jump on and help out. So I think that's work that we don't talk about a lot in academia, but is kind of one of those barriers.
Now I have a long list of projects that I didn't do that work and now nobody knows what they are. But yeah.
Yeah, I mean, I totally agree with that. I think basically complexity and broad support are really key features that you don't really expect to see. Like we were doing sparsity research in 2019, and we had this inference engine that we worked with kind of competitive with GPU at a much lower price. And but our solution was very complex because you had to retrain your model like you had to use our fancy algorithm to.
to like sparsify and so on it turns out not a lot of people wanted to do that because they i mean they were just getting started with ml and then it's just like if this adds like you need to sort of hire two more people to sort of handle such a complex pipeline they would just not go into it and i think maybe to compliment that if you look at sort of like impact from this community into like what a lot of people are using i think you i mentioned this briefly in my talk as well like i think it's like llama
Llama CPP, Olama and Bits and Bytes. You get like a ton of downloads and so on. And on the at least on the personal sort of running stuff locally side. And I think these are not the most complex methods, but they're like I think their writers were clever like brilliant in actually implementing them in a way that's like super easy to deploy and so on. So I think doing that is something that's incredibly valuable if you want your work to be.
impactful. Uh yeah, but it's not something that I could as academics we we sort of uh uh value that much. But yes I think there's some ki uh kind of elegance uh extra points we should give to our to sort of the pe the papers we read because if if they're sort of simple then it's actually a huge strength in practice.
I want to follow up on that and say I think the culture is changing though like more people are like with their presentations have access to the code more people are implementing stuff within APIs that you could just download and run or that are used widely by a lot of people so it is changing it and
Maybe I don't know about this community, but in a lot of other ACM communities, you know, they're also doing more like artifact evaluation type, like is this believable? So I think it is slowly changing. Yeah, so I'm not going to talk about academia versus industry. I'm going to talk about even like in the company, when you come up with idea, how long it takes to kind of apply to particular hardware. So I am in the hardware software co-design team in TPU.
Um so I'm gonna I mean I cannot tell you the timeline but like let's say for the next CPU we already started kind of designing it as X years ago, right? Uh so the T_P_U_ for example that comes next year. Um so um when we want to kind of give an idea or propose an idea uh I think actually implemented in hardware if it is a m a small modification it's not challenging at all.
But it's not enough. When we go to the hardware team, we say, okay, let's add this. They say, okay, the area is this. This is reasonable. We can add it. But the challenge actually comes from the software stack. So then you have to go to the compiler team, to the other teams that develop the kernels and all this stuff that says that whether introducing this feature is going to break the software stack in one way or another because there are tons of knobs. There are a huge number of optimization that is happening.
And how does it impact the current workflow? So a lot of ideas are kind of immediately killed because it doesn't align well with the software stack that we are having or it's going to postpone the product release. Let's say, I mean.
If Google cannot release another TPU next year, it's just, it's not possible. You have to release it in a particular timeline. So a lot of ideas, I mean, it's kind of similar analogy to academia. If you have ideas that is gonna kind of very challenging and it does not fit well to the infrastructure that a company has.
It's not that your idea is not good, it's kind of similar to what Sarah Walker said, like hardware lottery, it's kind of software lottery, it's like we don't have enough support in our software stack. So that's something I think that when you develop your ideas you have to think about if you really want the industry to pick it up, you have to think about the whole pipeline and how does it fit into that infrastructure.
Yeah, actually amazing points from panel. I really agree with all of that. So just to add something, I will probably say that one challenge of moving things from academia to industry is the complexity of approaches. So right, we know paper to be accepted at NERIPS, it should be like a system paper, we should have five stages, calibration, improve the stuff, right? But this creates a barrier for me just to quickly try.
tries a method. Uh so at some point I will even wish that every paper will have like two approaches. One approach is I need to do this, you know, to get solder and get paper accepted. But second one is much simpler, something you can try, you don't need to tune hyperparameters, everything work out of the box. So yeah, p um if you're in academia, try to think about simple solutions because those solutions uh much easier to apply.
Okay, interesting. So the idea should be crazy but simple. Some kind of crazy simple um idea. And and beat soda. And some crazy simple idea that beats soda And it's faster. that is that is faster, um And it's generalized to other benchmarks. generalizable to other internal benchmarks that you don't that are unseen We don't give you, yes. that yeah that that that it it's very important that you that you beat these benchmarks That's not true.
that that don't exist as far as you're concerned um and i'm trying to remember and olivia as as you mentioned uh you better hope that the no one else is working on you it too better hope yeah that Well, and the well, so the project being like ending, this is part of the software lottery. It's like you better hope that the software that you are implement that I'd say your collaborators are implementing it in have also won the software lottery, right?
You have to pick a team that won't get reorg'd. Yes, that's exactly. Yeah. Who knows the etymology of Gemini? I think that's an interesting one. So I think one kind of fun question, and maybe we'll get close to the end of the panel. I know crazy time flies, but it's been almost an hour already. One question for you all.
If you were, you know, doing research right now, you know, maybe starting your career or maybe, you know, you're in the middle of your career as a PhD student, what area in sparsity would you want to work on? What do you think is most close to this crazy simple super fast doesn't compete with another team in industry beat soda on the invisible benchmarks? You know, what is that unicorn?
Yeah, so for me, I think it's an inference for the video generation model. So for me, I'm kind of in that stage starting to be a young faculty. I would work on unstructured sparse D in both weights and activations. I know this is a kind of a hot take, but it's because I think it.
is a crazy idea. I don't know that it's easy. I don't know that it'll win the hot software lottery, but I think it is at least a crazy idea that is going against the current status quo. Yeah.
The thing I tell my students is to pick something where you have a unique perspective or unique point of view. That can be like something from your personal life, some weird, you know, application that nobody else has looked at or no, seriously, like if you had a hobby in college, like see like what's the soda on that and probably nobody else is looking at that. And then you want something where, you know, not everybody in this room.
can think of it in five minutes.

room can think of it in five minutes, right? So not just like I asked ChatGPT something this morning and something went wrong and oh, I should go fix that. But yes, something where you have a unique point of view.
I think the ethics of discussing these in front of all of these people who are actually starting their PhDs are questionable, because they might all start working on the same thing. But yeah, I think I think training is very interesting and hasn't it there's a lot of stuff to actually do there. Training and unstructured like sparse sort of semi structured unstructured. I think that those are very interesting. Yeah. Okay. Um
So I think I'm going to talk about it a little bit in my talk, but I think so we have this about a sparse C.
Sparse is not the only thing, right? So we have quantization, we have low rank. So I think the whole space of how these techniques, the compression techniques, the trinity of compression, as I call it, work together, I think is really important. What are the tradeoffs? Should we sparsify more? Should we quantize more? Should we quantize first and then sparsify and then apply low rank? How these three kind of aspects, and it's not only three, I'm sure there are more.
But these are the three that I've worked on. How they work together, what are the challenges among them, both from the hardware perspective and also in terms of quality, I think it's a very, very interesting area.
Yep. Well what I wanted to work exactly on the same problem. So now we need to think of something else. Yeah probably one of the like crazy directions which I will want someone to work will be about yeah trying to make models unprunable um and make sure that we really use all of the weights that up there in the model because if I can remove them probably I didn't do the right job. So this will be interesting if that's even possible.
Okay, yeah, we have to add the unique criterion here. So, you know, bystander effect, maybe nobody will work on any of these ideas, right? Okay, let's thank all of our panelists. And we're just going to go straight into the next talk.
Is this yours?
Okay, thanks. So our next invited speaker in the schedule, it's listed slightly differently because unfortunately there was an emergency change, but we still have people from Cerebus. So thankfully, Shane Bergsmuth.
has kindly offered to step in and we've talked a little bit about GPUs and TPUs and of course Cerebus many of you will know is a company that has sparsely enabled hardware for inference so very exciting to hear about some of the research coming out Cerebus thank you Shane Yeah, thank you. Thank you very much. I was just going to say that I was Vitu and see if anybody noticed, but.
I guess the story's out. I'll have to do the Shane Berg's version of the talk. Can everybody hear me okay? Yeah, so Cerebrus, if you don't know, we're a startup, probably a few hundred people by now that are now developing special hardware. We do both training and inference, and we have specialized kernels that allow us to accelerate unstructured weight sparsity. So I think like my picture of it is that...
You know, in GPU world, you're multiplying matrices together. There's different levels of computation. You can multiply vectors by matrices or vectors by vectors. But Cerebus, we, you know, our model is that we actually can multiply individual vectors by scalars. So the bottom line is that if there's a zero, like if a weight is zero or an activation is zero, we don't have to do that computation, right? So we save that sparsity. And we can...
We can accelerate other forms of sparsity like activation sparsity or mixture of experts and we do work on all those topics, but weight sparsity is in particular very interesting to us because you actually save the memory of storing the weights and the bandwidth of transmitting the weights and you save the computation. So it kind of reduces all the bottlenecks kind of uniformly. You don't just kind of push the bottleneck to another part of the computation or the algorithm.
Uh, so yeah, it's a very important research direction for our company. Like on this picture here as well, they're showing some benchmarks from a few years ago, we can actually accelerate matrix, sparse matrix computations very close to the theoretical speed up. So if you know, if you have 90% sparsity, you would expect to get like a 10x speed up in terms of computation. And we're like, you know, more like 8x or beyond that. And I think we're improving these all the time.
But my own particular work, which I'll talk more about today, is sort of on this idea that good training with sparsity, just like good training in general, requires very good hyperparameters. And I think it's something that's really been missed by the community or neglected that I wanted to sort of bring to your attention, too.
Yeah, so I think if I had to come up with a kind of a title for my version of the talk, it would be sparsity and hyperparameters, annoying as, you know what I mean, like it's not something that we want to worry about, but we have to. So you may have seen our paper at NUREPS last year on sparse maximal update parameterization. So this was like a holistic approach to sparse training dynamics.
And, yeah, the overall idea was that sparse training introduces new hyperparameters. So if you're doing some kind of sparsification at the beginning of training, you sort of randomly are deleting, you know, different weights or you're doing some kind of like iterative approach, you might have like the number of iterations, like that's a hyperparameter. And in your paper, you try different sparsity levels. So for each sparsity level, you have to tune that hyperparameter, you know, for each level.
But then what about all the optimization hyperparameters as well? There's like the learning rate, the weight decay, the batch size. What do you do about all those? Like the whole idea of sparsity was to speed up computation, but it seems like you have so much to tune that you actually create more work for yourself and more computation. And the standard approach that then was developed is...
is to just reuse the hyperparameters for optimization that were used in dense models so I went through like dozens of papers like and it's usually in the appendix somewhere you know you got some people here may have written this you know just like you know we just like following standard practice we just reuse the hyperparameters that were used by the dense model
And, you know, hopefully that's okay. But unfortunately, it's not only it's not just like a fixed bad cost, it's actually a systematically bad thing to do, because the optimal hyperparameters, you know, vary with the sparsity level. So in our paper, we made this plot just showing the standard practice. So on the x axis is the learning rate, and we want to find the optimal learning rate for training. And the y axis is, you know, the training loss.
And each curve is a different sparsity level. So the darkest curve is a dense model and you find that the optimum learning rate is very small. And that's the one maybe that's been used in standard practice. And those are the ones that you tend to reuse, you know, when you're doing your training for your own work. But as we change the sparsity level, so as those colors, you know, get brighter.
the optimal learning rate shift to the, to the right. So if, if you were, you know, evaluating your algorithm using the dense hyper parameters and you tried a very sparse model, you might find it worked really bad because you're, you're using like a very small learning rate and you know that for the, for the sparsest model that gets a very bad loss and you might draw the wrong conclusions, right?
So I think our work like was summarized very well in this tweet by Davis Blaylock like responding to our paper saying you know so it turns out that 30 plus years of neural net sparsity research has been confounded by the optimal hyperparameters varying with the sparsity level. So that's something we should all be aware of you know it's very annoying it's very annoying but it's important to know about.
So in this paper we proposed a solution for this called sparse maximal update parameterization or sparse mu P. So I don't know if you guys are aware or followed the maximal update parameterization, but it's a technique that's been proposed for dense models that lets you reuse the same hyperparameters as you change the width of your model. It prescribes like a scaling factor, say for the learning rate, the initial weight variances.
So we basically extended that to sparsity. So in a way, sparsity is just like a narrower model. Like if you have 90% sparsity, it's kind of similar to just using a model that was, you know, 10 times narrower. And

narrower. And using these corrections prescribed by sparse mewp or super as we call it, we were able to show on the top that the optimal learning rate is stable across the different sparsity levels. And then in the bottom row on the right, we show that the initial weight variance is also stable across different sparsity levels. And people have looked at proposed corrections to the initial weight variance so that it kind of transfers across sparsity level before.
But we're kind of doing if that would sort of break down after multiple steps of training unless you also control the learning rate and the weight updates and the gradients and things like that. So we kind of attacked all those things in this paper.
And the results were good. Like we applied this static sparsity, static unstructured sparsity to a 610 million parameter LLM trained to 20 tokens per parameter. So that's like the, according to the Chinchilla scaling laws, the kind of compute optimal amount of training for a dense model. So 20 times 610 million tokens.
And we found that the, you know, using Super and we got gains across all the different sparsity levels, but they increased as the sparsity got higher. And at the most sparse level, we got an 8.2 % loss improvement over the standard practice and still like a 2.1% loss improvement over MUPE, which is the prior maximal update parameterization.
So this doesn't look like a very large gain, but when you're training to 20 TPP or like this is like billions of tokens, then like a rule of thumb is like a 4% loss improvement saves you about two times your compute costs. So it's still quite significant.
Yeah, and then interestingly, like we were also following the standard practice here of, you know, we warmed up our learning rate and we decayed to 10% of the peak value. And at one point we thought we should ablate this learning rate schedule. We should try maybe 5% or try 2%. And it got better. We tried 1% and it got better. And then eventually we realized the limit is to just decay the learning rate right to zero. And that worked even better. So we're like, that was the best approach.
And later on we went and actually explored how did this change across the sparsity level and we found that for dense models there was only like a little win for using decay to zero over 10 percent decay but at the most sparse level the gains were huge so we could get like a like a very significant loss improvement just by changing the learning rate schedule using the same peak learning rate but just a different decay value.
That actually led to we really wanted to get to the bottom of that because that was turning up in all of our dense models and we tried changing data set sizes, model sizes. We kept seeing the same advantages and that actually led to a paper that I presented the poster for a couple of days ago at ICLEAR called Straight to Zero. Why linearly decaying the learning rate to zero works best for LLMs. But this paper actually arose from our work on sparsity where we first noticed this phenomenon.
So we're trying to just give you a kind of a quick overview of why. Why does decaying the learning rate to zero better than decaying it to 10%? And ultimately it came down to gradient noise.
So the, you know, as training progresses, the gradients start pointing in different directions. Like initially, all the gradients are saying the same thing, like, oh, the next sentence should start with the word the, you know, every example kind of gives you similar feedback. But if you've trained for billions and millions of tokens, now the gradients are saying very specific information and facts about what's going to happen next or what should happen next in each sentence. And if you take too big a step in that case, it can really mess up the optimization process.
So to kind of verify this hypothesis, we looked at, say, for larger batch sizes, we found, you know, there's less noise the larger the batch, and 10x and decay to zero work similarly. But when you made your batches very small, you're very noisy, then decay to zero worked a lot better. And similarly, at low TPP, like low tokens per parameter, small data sets, decay to zero and 10x decay worked similarly, but if we went up to high at TPP, decay to zero was much better.
And then this kind of explained as well our sparsity result, which was that at low sparsity, you know, we found them to be similar. At high sparsity for a fixed same data set size, you're actually doing more tokens per active parameter. And that's where we would have expected decay to zero to be better, which it was. And it's so predictable, like this result was very, you know, it grew and changed in the exact way that you want or would have expected based on this theory across all the different batch sizes and data set sizes and sparsity levels.
Yeah, I think one kind of important result like to take away from this too is that we did some fairly large scale experiments where we're training these 610 million parameter models to different data set sizes or different tokens per parameter and training. So this light blue line is training a decay to zero model to 80 tokens per parameter.
And we found that it could actually get better loss than a model trained with, you know, to 10%, we call 10x decay, to 200 tokens per parameter.
So actually, you can save 60% of your total compute costs just by changing the learning rate schedule, right? So depending on your perspective, that's either a great opportunity or very annoying. I can think maybe from the perspective of Meta, who invested a lot of compute in training, say, the LAMA 2 7B model to 286 tokens per parameter using 10x or 10% decay, you know, they could have probably saved 60% of the compute of that training run by...
by instead using decay to zero and uh you know even since you know we originally started doing this work it's become more of the standard recipe uh in pre-training to like at least have some kind of annealing phase where you take the learning rate right to zero as opposed to just you know stopping at 10 percent decay
Yeah, if you there's more details in our paper too on the theory of this like a kind of view it as initially you want to conceptually move as quick as you can away from the initial weights, reducing kind of the bias of training. And then as training progresses, the variance or noise becomes more of an important concern and then that's where you want to drop the learning rate. And this is this has been well known by like machine learning theory going back like a long time.
Even like here, this equation, the expected loss for a convex optimization problem using SGD, you can actually break it down into like a bias and a variance term and you can show that the bias term will actually go to zero on its own as you progress through the steps, but the variance will kind of then become the dominant term which motivates the schedule where you have a high learning rate initially and you kind of lower it over the course of training.
And this conceptual model, although it's like, again, it's just a conceptual model, it does make predictions that actually hold up for us in test cases. Like we would have expected then if you had a constant learning rate and you increased the data set size that you trained over, you're increasing the proportion of time that you're in this variance reduction phase. And then you'd have to drop the peak learning rate to kind of enter this phase. And we do see much larger kind of changes in the peak learning rate when you're using a constant schedule than if you're using one with decay.
Because on the bottom, like if you actually are using Decay to Zero, you only need to adjust the maximum learning rate a bit to kind of keep it in the sweet spot over the bias reduction and the variance reduction phases. So in some ways, Decay to Zero is a way to make your learning more robust to changes in your hyperparameters and for sure it's part of our recipe for training, including for sparse models.
Yeah, I won't say too much more like the, you know, we did do some experiments or kind of wondering why isn't everybody using decay to zero? Like why were we using 10% decay? I mean, there is a bit of inertia like you kind of like especially at smaller scales, we don't we don't aren't able to reproduce every finding. So we just look at what the standard recipes are in papers by Lama and other people and just kind of copy them. But one thing we tried to experiment as well with this nano GPT open.
code base and we found that we couldn't actually raise the maximum learning rate high enough to where decay to zero would win we would get like lost spikes and like instabilities we then we actually just switched to training in fp32 and found that then we could raise the maximum learning rate and then we would see this big benefit of using decay to zero over 10 decay so i think it's just a lesson that you know training stability is also very important to allow you to to use the right
right, hyperparameters for getting the best loss. And that could be like gradient clipping, decay to zero, using enough warmup or using a batch size warmup or other techniques that people have come up with to kind of stabilize training.
Yeah, I think overall, I'm sort of trying to develop like a unified view of how to set hyperparameters at arbitrary scales because we can't tune them as we increase the model size, data set size and vary the sparsity level. And recently, there's been a number of papers that have proposed these kinds of scaling laws for hyperparameters. And I think this is a good approach, but it's not very flexible because it may just tell you, okay.
What they do basically is at a small scale, they will find the optimal, say, batch size and learning rate, and then they will fit a power law that then projects the optimal batch size and learning rate at larger scales. But then if you follow this, it doesn't give you a lot of flexibility. You basically have to use that batch size at a particular scale, but maybe that's not the right batch size for your particular hardware or your setup. You want to increase the computational intensity. You want to change your batch size. What should you do? How should you adjust the learning rates?
And then we're kind of trying to work on a more flexible way of forecasting hyperparameters that still gives us flexibility. I think the overall view of it is we're actually, I've switched to kind of developing a power law for a ratio of hyperparameters and this actually is.

This actually is sort of unpublished work of ours that we've worked on and we showed that this ratio, which we call the time scale of training, actually does obey a power law over the actual tokens per parameter so that we actually know the optimal ratio of these hyper parameters at any scale. And then you can basically, you know, tune your weight decay so that whatever batch size you use or whatever learning rate you're using, you still have a well-tuned training run.
But yeah, it's still kind of it's hopefully this work will be out quite soon. Yeah. Okay. I think that's a, you know, a short talk. We'll give it to you there. Thank you very much. Thank you very much. So I think we have time for one question. We're a little bit over, but I'd like to allow the question and could the next presenter come up and get ready while we're answering that question.
Hello, thank you for the presentation. It does learning D learning rate to zero hurts continuous training? Like usually you don't drop it to actually zero or close to zero because otherwise continuous training
would have lower results. Yeah, that's a very good question. So the question is like, if you're doing continuous pre -training, if you're going to continue training past the end of training, I guess the kind of the accepted wisdom is that maybe you don't want to take the learning rate right to zero because then you'd have to then re-warm it back up in order to do continuous pre-training. And there's actually a very good paper by Parmar et al. like NVIDIA where they looked at retraining their Neematron model.
in the continuous phase and they looked at uh you know it's fine to do like to rewarm the learning rate a little bit and uh continue and i i my own personal view though i haven't done all the empirical testing is i'm actually working on that now i think that there's no harm in decaying to zero and then warming it back up for the continuous pre -training as long as long as you don't warm it up so much that then you kind of forget parts of the pre-training uh distribution so you can use replay or you can just keep your learning rate low enough that um
you don't wash out your what you've gained from the pre-training distribution and there's a mathematical kind of view of this according to like a exponential moving average view of Adam W that kind of explains how much you should raise your learning rate and kind of details in the paper yeah okay yeah thank you Thank you. Unfortunately, we're a bit short of time, but I'd like to thank the speaker again.
Hello? Can you guys hear me? Oh cool. All right. Um let me start uh first I would like to thank the organisers for choosing our work for oral presentation and I have to apologise the first author wouldn't be here due to certain um visa issues, but I will try to um do it do the job for her. Um so I would like to start by some
Reflecting on some history, this is actually the first Sparse LLM workshop that I attended, but I attended a lot of Sparse Neural Net workshops before. So I want to just reflect what is the difference in the era of LLMs. Actually, I would say the side guys hasn't changed that much. So we always start with trial and error.
And, you know, and nobody is really satisfied with the fact that we have to always trial and error endlessly. We try to do something better, but very, very occasionally we can have some really thorough understanding through theory, but it's really rare. It's out of reach. Back in the days.
10 years ago, there's a debate about whether we should rely on empirical science to advance the field. And a lot of people actually consider this as alchemy, but I think standing today at 2025 with all the successes of large language models, with a lot of training undertakings that, you know, cost like millions of hundreds, sorry, tens of millions of dollars, really we are actually advancing quite a lot on the
the LLM training side about the empirical science. But I would argue that there is a lagging behind in the subfield of LLM compression, which we study a lot. I'm glad to see that, like my group, a lot of people here today are trying to close this gap of predictability due to lack of empirical science. And because, after all,
An efficient deployment for inference is really what we want. And deployment on specialized hardware such as the DMATRIX CORSAR. And if you want to know more about our hardware, go to d-matrix.ai. And I promise this is the only marketing slide in the talk. Okay, so this prediction predictability gap that I've meant, what is it?
s let me give you a very simple example here. Um this is from survey's work as well. So um let's just take the classic skating law and the y axis is the uh uh the pre-training loss, X axis is the model size, you can see
There's a pretty um like classic skating laws that we know. And then let's just take some pretty old models from a few years back and uh just look at the the middle range of this skating law roughly slightly larger than one billion parameters. One model from OpenAI, one from Meta and the other from Hugging Face. And let's subjected them to the same uh post-training quantization procedure and see what happens.
All right. So uh this is the neural net uh diagram. So the simplest thing you can do for weight quantization is just you plug in a uh quantizer for your weight. And this is what we call the round two nearest. And
This is the result that you see. On the X-axis, actually, this is basically the quantization error on the wave tensor. So it's actually quite predictable, but this is the only the numerical analysis can give you. And it looks like the wave distributions are not that, you know, different across different models. So X-axis values are pretty similar, but the Y-axis value is very different. It basically looks like even if
The model fall on the same place in the scaling law. Some are more sensitive to quantization, some are not. And there's a popular thing from Dan Alistar's group like a lot of people are using today is GPT-Q. Basically this is by minimizing the local loss due to quantization and MSC loss. And this is what you get for these. Again, it's a pretty complicated story.
Okay, how do we close this prediction uh predictability gap? Uh so they went ahead because we know weight quantization is sort of a uh perturbation so maybe if we study the loss landscape uh around the con uh convergence would be a good idea. So this is what we did exactly. So here is an illustration. So you can actually map the radio loss landscape from the convergence point
Um let's say you just random example the unit sphere and you you see like what the lost landscape look like actually it's very typical. So we know from work uh like back then uh the second order uh characteristics the the Hessian spectrum of uh um uh neural nets at the convergence has a bulk of uh of you know uh eigenvalues. Um but we also found that the uh lost landscape
cape of the LLMS look pretty much like a crater, so it's uh it it has a lot of high order um um terms, and then it's also very typical, not just for the second order term, but it's very typical for high order as well.
And if you analyze the such a typical loss landscape for a bunch of models of different sizes from different families, it's a very complicated picture. So you can actually see there's some intra-family scaling. So for example, oh, and by the way, you can think of the classic scaling as a zeroth order scaling. So it basically just tell you the loss scaling, but it doesn't tell you the loss landscape shape, how does that scale around that convergence point.
So generally speaking, you will see like deeper attractive faces also wider, also flatter, but it's this lack of, you know, regularity and then it looks like it's very different across model families. So every LLM is unique and this personality is also largely defined by its family gene.
So my reaction at this time was just okay, that's just too bad, it's too complicated. It we are we're trapped into this endless trial and error. Um but they pushed on actually it seems like this is the only piece of bad news and uh good news starts here. So the

here. So the first piece of good news is that, you know, mapping the typical ice landscape is pretty cheap. You only need to go any random direction and do some forward passes and you know the ice landscape. And second, if you just look at the radio ice landscape along these typical directions, like the round to nearest,
And the, you know, locally, MSC minimize GPDQs results, you actually see the loss landscape actually is much flatter in these directions in a very predictable way. And you think of this as like some like ancient riverbeds that's like empty into this typical roundish crater.
And it's so predictable that we can actually fit a very simple regression model taking into consideration all of the above factors with very cheap loss landscape mapping that actually generalizes across model families. So basically we can just predict how much rounding to nearest and how much GPTQ can actually help you.
And here it's basically examples showing that we can actually predict the performance of a PDTQ on some unseen models in different unseen families. Okay, this is what Sveta told you like four months ago at NeurIPS. But what we are trying to tell you today is there's more way this to do the quantization. In addition to a PDTQ.
You can also do QAT, basically, quantizing aware fine tuning. And the difference is basically you're not like minimizing the local MST loss, but you're minimizing the global pre-training loss. It's, of course, more expensive, but we want to just control the data requirement. So actually we limited our QAT also to a very small.
The same basically data set as you use for GBDQ.
Okay, so the intuition we had is since we know how GBTQ would perform, if QFT does exactly the same thing as GBTQ, probably the problem solved. We can just very reliably predict what QFT is going to give you. The intuition is coming from this. It's pretty straightforward. At the limit, if your local loss is zero, global loss is also zero. We know that. And then let's say if you just ever so slightly perturb your way.
wait by a quantizer and then minimize these local loss and global loss maybe the two minimizations are doing exact same thing. So that's the intuition. Well, the reality turned out to be very different. And we find that the minimizing local MSU loss and minimizing the global loss always misalign.
So here is a big plot in the paper. Let me just explain it very quickly. So it's a direct comparison. On the x-axis is the PTQ, on the y-axis is QAT. And if they are doing the same thing, you will see all the points along the...
the diagonal. So first of all, on the top row, that's the global loss. And you can see that uh well of course if you directly minimise global loss, it's always going down. But uh for different uh quantisation precisions, it's it's different magnitude. And sometimes you can see uh the uh uh p_d_q_ actually minimising local loss actually increases the global loss even though that's very rare.
But the main surprising thing is the following. In the bottom row, you can see that every symbol is a layer here. So we are looking at the local loss. Minimizing the global loss almost never decreases the local loss. It goes into a different direction. And sometimes it actually increases it. So we never observe that minimizing global loss actually led to a decreasing local loss.
All right. And if we take a look at the outcome, so here I would point your attention to these thick vertical bars. These are basically showing the difference between the QAT and PTQ. So QAT is always better. That's the lower bar, lower point of the bar. And you can see only QAT sometimes will push to the Pareto front. And a lot of cases where you
You can see the GBTQ actually stays always interior to the possibility zone. Okay, so finally, she asked whether we can say anything about those extreme cases where these two methods diverge a lot, these cases with a huge bar there. So to loss landscape, we again...
resort to, um to to answer this question. So this is actually quite reminiscent of a uh old paper by uh Utpu um uh quite a few years back, uh calling difficulty of training sparse nets. It's uh it's a very similar result that we sh uh we find here. So if you look at those cases where um there's a huge difference between the the two methods, minimizing local versus global loss.
Um, you actually see there is a, uh, non-monotonic linear loss landscape connecting the, uh, uh, the convergence point and the, uh,
And the QAT results. So uh in this is particular case we can see the lowest the precision, three bit and two bit, it seems like the QAT outperformed the PTQ by going into a different attractive basin. Okay. And finally, um the facial data, this is not really just some uh overfitting phenomenon on a small data set, it generalizes par across different data sets. To sum up
We found that QT always misalign with PTQ, minimizing global loss never led to minimize the local loss and vice versa. And QT always leads in terms of the best outcome compared to PTQ under the same small data constraint.
And finally, the magnitude of this difference actually correlates with loss landscape phenomenon. And finally, some practical implications. So basically, you know, if you can afford to do QAT, do it. And if you can afford to do it early, do it early.
Um and finally the limitations. We never study the models uh larger than thirteen billion and uh this is again weight quantisation only. So activation may confound the the story. Thank you. Thank you. So we are short on time, but I'll take one question and allow for the next speaker come on and set up.
Uh maybe you told but I um miss like which part you did the uh Q_A_T_ like during which part of the post training. Like um you said like do Q_A_T_ do it early uh like at what stage your experiments you did um uh apply?
the QAT. Yeah, so so I I think you're you're so we're basically take taking the pre-trained m uh model as the initialization for Shall we QAT. play? So it we call it Q_A_F_T_ that's uh Oh, you're not fine-tuning. finished? I think it was probably. But like you're not doing the Here post training it's fine. like R_L_H_F_ or uh okay. Now I I Slide show. Thank you. Yeah, so to to be fair, we directly minimise the pre-training loss. Perfect. What about this shows this one? Thank you. Great. Yeah. You think this interview
Okay, so let's do X_M_Y_ Yeah. change accent.
Okay, so for our final invited talk, I'm happy to introduce again Amir Aslan. So of course he was on the panel, so I think all of us already had an introduction. I'll let you take it away when you're ready.
Let me start with the thank you stuff before I getting ready. So yeah, thanks everyone for attending. Thanks for the organizer for inviting me. So yeah, today I'm I think I briefly mentioned in the panel. I'm going to talk about a little bit about the trinity of compression, the way that I describe it. I'm sure

Um I'm sure there are a lot of other um compression techniques that people come up with, but today I'm just gonna talk more about the sparsity, uh mostly semi-structured sparsity, quantization a little bit, and uh also uh low rank uh in the in the in transformers. Oh so yeah, um I think I know the format here is just to ask question at the end.
If the organizer are okay, it's okay to raise your hand if something is not clear.
Um, oh, and then one more thing is that everything that I'm going to talk about today, it's because I have a lot of amazing collaborators and students that I've worked with, even though that I'm in the industry, so it's possible to work with industry. And I'm just trying to kind of present their work, promote their work, what they did, and add a little bit of about my own insight and my own vision. I think the older students are here actually, Muhammad, Simlai is here.
You're maybe somewhere here. So if you have detailed question, implementation question, please go grab them and talk to them. And so yeah, fun fact about me.
My day -to-day job is a hardware. I'm a hardware engineer. I'm doing hardware software co-design and basically those tiny magic boxes that you guys use and run your model on it. ICLR is not my home turf actually. So this is my first oral presentation at ICLR. I had like a couple of papers but this is my first oral presentation and it's because I team up with ML researcher and they helped me to
kind of contribute to their research and work with them to do some cool works. So I'm going to actually go fast a little bit on these topics. Yes, LLM is important. It's very good. All these companies are doing it. It's amazing. We should all go and do research around those topics. Actually, this is cool a little bit. Let's see if I can. So this is our.
I think this is last Google I.O. I don't know if you can hear it.
So yeah, that's show how important AI is from the perspective of our CEO. And I think it's the same sentiment across all the companies. This is really important. This is, I think, one of the biggest innovation of our generation. So it's yeah, so it's very important. But the problem is
At the end of the day, we have to run these models on a compute infrastructure, right? So we need hardware, we need to run these models, and we need them to be efficient. So one of the critical aspects that may be a little bit overlooked in the ML community is that how you connect your ideas and your implementation with the hardware, with the compute infrastructure.
Yeah, this curve is also kind of very famous curve talking about the amount of compute that is kind of for each model is used. So we have like at the beginning is like ImageNet, whatever. And then now we are kind of growing to AlphaZero and like ChatGPT, Gemini, which of course we cannot talk about the number of parameters, but it's like growing every year. So it's really important for us to build efficient hardware for these models as well.
So what is the key points for making these models to run efficiently? Code design. So you're going to hear in the theme of this talk mostly is about code design and code design and code design. How we should build, how we should work with the ML engineer, how we should work with the ML practitioner to build a hardware that works efficiently for their particular ideas. So yeah, so code design is a key paradigm.
At the beginning of this talk, actually, yes, I'm going to talk about a kind of three team, three techniques that we use in this work. And then at the end of the talk, I'm going to kind of bring some insight from industry of like why co-design becomes so important, especially in the realm of LLMs. So yeah, at the end of the day, this is about compression. Why compression is important?
Of course, model compression is a critical lever to train and serve large model efficiently and with low cost. So we as a company, we care about reducing the cost, make sure that we can bring all these models to the hands of billions of users. So it is really important for us to reduce the cost. So sparsity, quantization, low rank and any other methods that you develop, it benefits kind of us to reduce the cost.
But while this is not my kind of expertise, but I think compression has a nice other angle to it. And I mean, in this talk, you're not going to hear anything about it, but I just wanted to bring up this to your attention that if you work in the compression kind of domain, I think there is a nice association and I think a lot of people talking about it. There is a nice kind of association between compression and understanding the nature of intelligence. So when you work on the compression.
ML experts. Think about it. It's not only about bringing efficiency. Efficiency is important to us, but it's also help you to understand intelligence, the nature of intelligence. I think that's a kind of a nice and that's why I think compression is really, really important in both aspects. Okay.
Now let's talk a little bit about some of the works that we have been doing in this space. The first one actually I think most of the works that I'm presenting in ICML 2025. So it's called double prone sparse and low rank for pre-training. So what is the idea here? Again like for most of this presentation I'm not going to go into the deep details. It's more about getting the idea what is the gist of the idea and then I'm sure you can read the papers and talk to the students to hear about their work.
So what is the main idea here? What do we want to do? We want to make the pre-training faster. So sure, there are a lot of other techniques. We can use anisotropic sparsity. We can use block sparsity and something like that.
But what we wanted to do is we wanted to use a kind of semi-structured sparsity, the way that I call it, NMS sparsity. And why? Because hardware lottery, because GPU already has this form of sparsity and we can use it to kind of run these techniques faster. As I talked, so in the, do we have a pointer? So we have two kind of...
Okay, it's not working. So we have two kind of computation patterns. So if the first is the forward pass, and also we have the backward pass. So in the forward pass, you have simple kind of activation, multiplied by weights. And in the backward pass, you have two kind of computation pattern. One is to calculate the gradients for the weight and one for the gradient for the activation. So our idea is that we are focusing on the weight sparsity. So we are applying the sparsity on the weight kind of tensors. We're not touching the kind of the middle part.
So we're focusing on the weight sparsity. And what we do is that we're trying to apply semi-structured sparsity, particularly two to four sparsity, on the weight tensor. But the problem is when you do it in the forward pass, so you have kind of the weight matrices, and in the back sparsity you transpose your weight to perform the computation, so the pattern of sparsity that you're trying to apply is different.
So it becomes really, really kind of important to think about how you apply your semi -structured sparsity in both of these tensors in a kind of effective way. So we did that. So the quality was not great. How we solve this problem, we solve this problem by introducing low rank matrices.
So we apply this kind of forward and backward pass for the semi -structured sparsity during forward and backward pass for the majority of the steps. At the very latest stage of the pre -training, we apply these low-rank matrices. And why we apply these low-rank matrices?
Of course, because we want to kind of regain some of the quality loss that we introduce in the kind of the forward and backward pass. And we only use it around for the 1% of iteration. Multiple reason. First of all, this is costly. We don't want to kind of introduce a huge compute overhead for it. Again, like all about hardware.
And also there is another reason that why we don't need to kind of go further than that because these low-ranked matrices are very small and you don't need kind of a lot of kind of training to dedicate to these low -ranked matrices to learn anything. So it's just the main purpose of this low rank is to kind of regain some of the quality loss because now we introduce a lot of sparsity in the weight matrices. I'm going to skip this. You all are familiar with this.
Okay, so now let's have a kind of review of our technique in a kind of smaller, actually let me do, yes, let's me do this, okay. So yeah, so as I mentioned, so we apply sparsity both in the forward pass in the weight tensor and also in the backward pass.
So for the four word pass, we apply this two to four. We can use a sparse sensor core. But when you transpose it, you cannot kind of apply because you don't have this two to four pattern anymore, as you can see here.

to four pattern anymore, as you can see here. So what we kind of observe is when you kind of, if you want to apply this kind of sparsity in every iteration of the pre-training, it introduced a huge, huge kind of overhead here in this kind of
Graph, you can see for different matrix dimension and then the time, you can see the setup time because you have to calculate this location of these zeros and amount of compute, the kind of orange bar. You can see as the size of matrix increases, the amount of time that you devote to kind of identifying the location of zeros is going to kind of grow significantly and you cannot use it.
Our solution is actually very simple. We are kind of arguing that you don't need to change your mask very frequently. So you're going to reduce the number of times that you kind of apply this sparsity. You don't do it every iteration. You do it like, for example, hundred iteration or thousand iteration. And then after this number of iterations, you reapply and readjust your mask to kind of learn the new patterns.
turns basically. Because calculating this mask is going to be costly. This doesn't matter. I think we can kind of skip it. Okay, so let's talk about a little bit about Lorentz. So I told you that for the 99 % of the pre-training, we're going to use this kind of a structure, semi-structure sparsity. But at the very end, we're going to introduce these low-rank matrices. Okay.
So what is the benefit of lower rank matrices? So I mean, of course we could kind of do some large matrices added to large matrix.
But we always like, we need to think about the overhead that this low-rank matrices bring during inference as well. Right? Because at the end of the day, when you kind of finalize, finally pre -train your model, you have to serve that model on the particular hardware. So if you're kind of, let's call it low-rank adaptors are really large or introduce a huge memory overhead, what's the benefit of it? So we have to be very careful to set, to size these low-rank matrices.
in a way that does not introduce a significant overhead during inference I'm talking about right so after you finalize your model I just want to highlight something else so this is this is a little bit different from Laura aspect that you think about it because we're not at the end of the day we're not going to merge this low rank adapter into the original matrix because we want to keep our original matrix in the semi-structured manner so we can utilize the accelerator while we're computing this low rank as well so that's why the trade-off is really really important for us
Yeah, I think I mentioned this as well because the number of parameters in the low rank matrices is very, very small. We don't need to allocate a lot of the pre -training time to these matrices. Only one person or two person is enough for these low rank matrices to learn and compensate for the error. Oh, so this is actually very important. So yeah, we designed this low rank matrices. It's fantastic and the quality is great, but now we have to go and run it on the hardware during inference.
So one of the problem that we have is low rank matrices are very small, and they have low arithmetic intensity. Low arithmetic intensity means that if you run it on the accelerator, you might not get a lot of gain and a lot of benefits. So let's see how we can implement a kind of an efficient CUDA kernel. Again, our target is GPU, an efficient CUDA kernel for this low rank adapters.
So what we do is we're going to kind of detach this kind of low rank matrices a little bit from the computation and we do kind of playing with these matrices in an interesting way. We call it kind of fused multiplication and add. So
We have an L matrix and we have an R matrix, right? So instead of kind of multiplying weight to the L matrix and then multiply it to the R matrix, what we do, we are going to kind of fuse the computation between the weight and the left-hand side of the low rank into together at the same time. And then for the R part, we're going to kind of compute it in parallel. So to kind of introduce this efficient kernel for computing these low rank matrices during inference time.
So there are a lot of results in the paper, but this is kind of a summary of the results. During training or pre-training, we get up to kind of 1.25x speed up. Again, our techniques benefit inference as well, so we gain 1.53x inference speed up.
The other benefits of our techniques is about memory reduction. Both through training you get point six three X reduction in the training, you memory reduction during training, and also during uh inference around half of the memory you d you don't need to kind of use it.
So these are pretty cool. So I think if I want to give you a main takeaway message from this work is that while you're thinking about quality and make sure that your technique does not kind of affect quality, you should always keep an eye of like the target hardware and how you can how your sparsity or compression technique map to a particular hardware and how you can make sure that it runs efficiently and smoothly.
So these are like again quality results, I'm not going to talk about it actually. So they are almost very close to the dense matrix in some cases, but in some benchmarks we are not better than dense matrix. Okay, so we talked about semi -structured sparsity for weight and a low-rank adaptor to do the quality. So this is kind of, now let's take it one step further.
And now let's see how we can use low-rank adaptors to not only apply a sparsity. So now this is kind of a real Trinity compression Trinity. To do it for both quantization, sparsity, and also you use low-rank to kind of regain some of the quality. Again, this is for weight compression.
So a lot of people talked about a sparsity quantization, both great. You are familiar with it. So in the sparsity, we set non-important weight to zero. In the quantization, we reduce the precision of the number. So these are great. But the most important part is that when you apply your sparsity beyond a certain thresholds, it's kind of break. So I think this is kind of some sensitivity analysis that we did for the sparsity and Vanda.
Iran's kind of 50% semi -structural sparsity, beyond that the perplexity suddenly kind of skyrockets and it's kind of break. Quantization has a similar story as well. So quantization is great, kind of two sub four bits quantization is great, but if you go further, I know there are a lot of other techniques, but if you go further, generally it's kind of break as well.
So what is the idea? The idea is that, in this work, is that to better understand the trade-off between quantization and sparsity and being able to combine both methods, bring the best of both worlds, and offer a better trade -off for the compression.
So far a lot of techniques kind of talk about this kind of combined compression, but it seems the quality gap is still not there. So still the compressed model are not close enough to the dense quality. So in this work we are trying to address that challenge as well.
So I think again, now you're familiar with our kind of trend of our work. We are trying to use low rank adapters to kind of regain some of the quality that we lose because of the compressing of the base.
But again, you might say that for low rank adapter you still require to do fine tuning and it might takes time. So the idea that we want and we have in this work is that is there any way that we can completely remove any training requirement for the lower rank? Can we identify the value of the lower rank matrices in a kind of a zero shot manner?
The I think dance is the kind of expert in that thing in that space so we kind of extend it for the low rank as well being able to kind of identify the value of the low rank without any training or fine-tuning so let's see how we are going to do it
So this is kind of the workflow of this work. First, we are going to do pruning, again, semi-structure pruning. That introduces some error, of course, right? So you're losing some of your accuracy, so you're losing some of the values, definitely is going to introduce some error. Yes. After that, we're going to apply quantization. That introduces additional error, EQ.
And then we are hoping that by introducing these low-rank adaptors, we can kind of eliminate or reduce this compounded error E_S and eq, and kind of get a matrix that is not only a sparse but also quantized. So we can run it very efficiently on hardware. So for a sparse view is a kind of sawtooth techniques. For a sparse view is wandar. We do one shot pruning and we apply it on the on the weight matrices.
For the quantization, we have a little bit kind of tricks to apply quantization in a better way. Another highlight that I want to kind of talk about it is about the quantization is that compared to other

Transition is that compared to other work that usually they do kind of block-wise quantization or kind of row-wise quantization, we are trying to, what we are trying to do is that we are trying to do single scale kind of quantization across the entire weight tensor.
And why we can do it, actually, I want to kind of connect it to the low rank, because it allows us to kind of do more and extreme quantization. We don't need to kind of care too much about the error that we are introducing during these stages, because we have this low rank that's hopefully kind of regained some of the quality loss. So this allows us to kind of do a more extreme form of quantization for the base matrices as well.
Okay. So what is the idea for the quantization? So we have our matrix. We have a threshold for the matrix. Whatever is below this threshold in the weight matrix, we're going to do it quantized. We are going to quantize it. And whatever is beyond that threshold, we're going to just clip it. So that's the main idea. I think a lot of quantization work also do that, the same thing. But you might ask, how do you identify this alpha?
This is kind of challenging. For every weight sensor, you might have a different alpha. You have to do a lot of fine-tuning or hyperparameter tuning to identify this alpha. So let's see how we kind of identify this alpha in a kind of a unique way. So as I mentioned, we have two error. One is quantization error and one is the clipping error, right? I think this figure kind of show it clearly. So that's our alpha.
Below that alpha, whatever you do, you introduce a quantization error. And after that alpha, whatever you do, you introduce a clipping error. So can we solve this problem in a kind of a closed-form solution without kind of searching for alpha star at all? So if you formulate it properly, you can kind of look at your weight tensor and the distribution of weight tensor and trying to minimize this kind of equation.
kind of minimizing this equation which depends on the alpha value can give you kind of the optimum alpha for each weight tensor. So you don't need to kind of do a kind of crazy search, amount of search to identify this alpha. And that's exactly what we want to do. We want to minimize the combined error that you introduce by quantization and clipping factor. So yeah so
We introduce sparsity, we introduce quantization, and now we are kind of screwed because there are a lot of errors introduced. Now we are trying to use this low rank to compensate in this error. But again, remember, I want to do it in a zero shot manner. I don't want to do any fine tuning, anything else. So let's see what is the goal of this low rank, how we can identify this low rank. So the goal of this low rank adapter.
is to minimize the error that is introduced by the sparsity and quantization.
minus the kind of the compensation error, the L_R, we would like to minimize this, right? We won't we won't we don't want to kind of we won't we want to kind of eliminate or reduce the amount of error uh during a sparsity and quantization and um using this L_R to um compensate for that. If you solve this formula, it's basically kind of S_V_D_ So if you S_V_D_ um kind of um E_S_ plus E_Q_
You're hoping that you can calculate your L_star and R_star. But this is not as easy as I described. One of the problem with looking only at the E_S and E_Q is that kind of you're kind of eliminating the
the contribution of activation into this error. Because sometimes your weight might be very, very small and you might completely eliminate it because this weight is not important. But then your activation might have a really, really high value and that actually weight becomes important for your model.
So we are going to introduce a kind of saliency factor into this equation to make sure that we are kind of using kind of we are taking into account the activation contribution to the overall error as well So this is kind of the formulation that we come up with actually let me go one more
So this is kind of the formula that we came up with. So we have a saliency function. Again, the saliency function is not our contribution, main contribution. This is kind of many, many other works also use this saliency factor. But the way that we are using it to identify the LR is kind of the unique contribution of this work.
So this is the formula. We have the saliency factor which is a diagonal kind of after calibration set multiplied by the weight and if you put this into the formula you can kind of solve this low rank computation in a closed form solution. So you don't need any fine tuning, you don't need anything else. You just kind of apply this and you can calculate the L and R that minimize the error from sparsity and quantization and just that's done.
So you just need a kind of a set of calibration data set. So if I want to kind of give you an analogy, kind of the very high level analogy is that we introduce this error in the weighted space. I'm just trying to kind of show it in bottom. So we introduce this error in the weighted space.
We map this kind of weight space to a saliency kind of a space. We identify the importance of this weight and once we identify those things, we kind of map it back to the weight space again, L_R, and kind of that's the whole kind of idea of this kind of this workflow basically. Okay, this is actually very interesting. So
At the end of the day, what we want to do, once we compress our model, whatever fancy things that you do, you want to run it on the hardware, right? Whether it's a dense model, whether it's a sparse model, whatever it is, you want to run it on the hardware. Actually, we did a very kind of interesting study to understand what is the kind of relationship between the accuracy of the model.
And the parameter size. I'm talking about parameter size, not the kind of original parameter size. At the end of the day, when you remove some of the...
some of the weights and when you reduce the precision, what is the total parameter size that your model has compared to the accuracy? So if you draw these kind of lines across different sizes and across different techniques, you can see is actually for a given parameter size budget, our technique outperforms other model and even dense model. If you look at this kind of
kind of vertical red dot, red line, you can see that our techniques, this one with a star, is actually better than dense model in terms of accuracy.
So, again, this is corroborates with a lot of other works that people are doing. But the point that I want to make here is that this kind of sparse techniques, when you want to compare your model between dense model and a sparse model, it's really important to compare it with the proper parameter sizes and see that in some cases you're kind of
compressed model after the compression is actually better in terms of accuracy compared to dense model that you start from dense and you kind of train it from dense. We get some speed up, 3.78 across different benchmark, different model sizes and actually I want to kind of
promote what Dan and his startup is doing, they actually released a new kernel that now we can kind of improve our speed-up number from 3.78 to now 4. So it's really, really important that you do your kernel optimization properly. And it's actually after submission, now we have like a better result in terms of thanks to them actually.
Yes, quality, I think it just doesn't important. It's perfect. It's better than SOTA across a lot of different use cases. So you can actually go further a little bit. I talked about it as low rank. You don't need to do any fine tuning. You just need a calibration data set.
If you really have resources and you feel to do it, you can actually do some optional additional fine-tuning on these lower-rank matrices. And you can kind of regain even bit more and you can kind of get better quality if you can do more fine-tuning, a little bit more fine-tuning on the lower-rank matrices as well. How much more time I have? Five? Okay. So
I have two more work, but of course I don't have time to talk about it. So this is actually one of the work that we did in ICLR. It was a spotlight this year. The idea is that we wanted to basically understand. So I'm not going to talk about anything about it. So maybe I can just show one slide. Yes, this slide.
So in this work the main idea was that the common belief is that when you apply quantization and sparsity, the final error that you are gonna introduce is the addition of sparsity error base of plus the quantization error. But actually this work theoretically gonna explore this kind of the error that you're gonna introduce during these phases, and actually kind of contradict and say that this is not the case. When you apply quantization and sparsity

Apply quantization and sparsity. There are some nuances kind of interaction between these two factors, these two compression techniques that kind of introduce additional error compared to kind of only applying sparsity or only applying quantization. So again, I'm going to skip. There was another works that I think they mentioned in the panel as well, which kind of we talked about a little bit about scaling law.
So I want to kind of allocate some time about this compression techniques as well. So this compression eternity. So here, I'm just going to talk about a little bit of questions. There is no answer. I don't know the answer. I'm hoping that you guys come up with answers and kind of share it with the community. So when you are thinking about compression now, always think about sparcity, quantization, low rank, and other techniques that you're thinking about.
And think about it as we have now multiple phases of training, like we have this pre-training, fine-tuning, doing, oh, it's actually vice versa, doing inference, oh, actually it's doing inference, doing kind of reasoning and doing RLHF and so on and so forth.
I think that the value of the tensor and distribution of tensor across all these stages are very different. And I think it's really important for you when you come up with your compression technique to look at these stages and see what compression techniques fits well for different stages. So it's not like sparsity is going to work across all the workflow or quantization is going to work across all the workflow.
The other thing that you have to think about it is about how you want to apply your compression, whether you want to apply it on the weights, whether you want to apply it on the activation, or whether you want to apply it on the gradient. So weights has its own particular kind of behavior, gradient is like different because it changes all the time you might need to have some dynamic techniques. So these are really important for you to look at what is your target tensor that you want to apply compression techniques.
I'm going to end with this slide. So it's about like I think we in the panel also we discuss about it. I think I should add another kind of factor. It's not only hardware lottery, it's also software lottery as well. So how we should think about it when you want to kind of propose a technique. So you have two ways to kind of make your technique win this hardware lottery. There is no other way in my opinion. I think maybe it's controversial, but this is how I think.
So either you have to kind of customize your technique for the current hardware. You have to go, Nvidia has two to four, TPU has particular quantization and sparsity. You have to go and develop your kernel, optimize your kernel for that particular hardware. So then your technique is going to win. The other thing that I think the ML community doing it less.
Make friends with hardware people a little bit. Get closer to the hardware people. They're not scary.
And work with them and talk to them. When you develop a new pattern of sparsity, when you develop a new quantization technique, talk to them and evaluate the overhead that your technique may expose to their hardware. I think this is not secret. GPU has systolic array. GPU has a different form of architecture. Go talk to them and see how much overhead your technique may impose on the hardware.
And through this co-design, you might be able to actually win this hardware lottery as well. So working closely with the hardware people and make sure that jointly optimize your method with the hardware, and that could kind of translate to bigger win for your technique as well. So I hope that I can kind of with this slide, I can give some intuition about how you can apply your technique in the future hardware as well. Thank you so much.
Thank you so much. That was great. And one of the particular aims of this workshop was to bring hardware people together with software people and hopefully make friends. So great. So just before we go on to questions, I just want to know if you're a mentor or mentee, hang around and we'll explain how the mentoring sessions go work after this. So don't go anywhere. In the meantime, I'd like to take at least a couple of questions on the talk.
yeah so thank you for the fascinating talk. So actually I have a hardware related question. So um when talking about the sort of granularity of the sparsity, Hmm. so because the experime experiment here is done with the Nvidia GPUs, so here we talk about the tensile call granularity of like like four by four by four metal model. So like it's biggest is like sixteen by eight by eight, something at that level. So I'm wondering
You'd say you'd adapt this algorithm to like Google TPUs for example. Is this granularity like too small to be like TPU friendly and does this give a pressure to the hardware design people? So I think the question that I understand is like you're talking about the hardware between GPU and TPU and whether this technique can apply to the TPU as well, right? So
The current TPU does not have support, the current TPUs in the kind of market do not have the support for semi -structured sparsity, right? So we, so the techniques that I mentioned, while its benefits for the computation in the memory bounded regime,
We do not provide any compute benefits for that particular sparsity. But again, this sparsity technique that I mentioned, it could benefit when your computation is in the memory bound regime, right? You still can gain benefit, even on the TPU. But for the compute bounded kind of computation, so you know, you don't get any benefits on the current hardware yet.
Hello, hi. Hi. Thanks for the talk. Um it's great to see the hardware people here. So my question is a little bit to high level. So basically I love high level. Okay. uh basically now such uh the whole community is more uh moving more less to the um test time computing. So inference time, reasoning, et cetera, et cetera. So from hardware perspective or a more large scale from a I infrastructure perspec perspective
Do you see there any impact for the computing? So you're saying there's compression techniques on the test time scaling? Right. Oh, actually, I don't think I don't think I would associate this to a particular technique that you're doing. So actually, let me connect it this way. So when you do this test time scaling, you do a lot of inference, right?
So I think the overhead of inference becomes a kind of major bottleneck, if you would say, right? So you still with this compression technique, you can kind of gain benefits during the inference time. And actually, it can have a multiple kind of factor. If you can reduce the overhead of inference scaling with this compression techniques.
It may enable you to do more inference during that time, right? And it might bring some additional benefits in terms of kind of your evaluation metrics, right? So let's say you have, you're doing some, you can do 100 inference because of your budget, right? If this compression technique can allow you to do 180 kind of inference, that might kind of enable you to do more inference in that time. So, and that kind of translates to better quality, right? So I think you can think of it as a compression.
Another angle, I don't want to say a scaling, but another angle of benefiting this test time inference as well. Does it make sense? Okay. Yeah, Thank you very much. yep.
Hi, great talk. And my question is also about hardware. Sorry, Okay. I see. That's what I'm here for. Here is the question is like the who is the first, who is the first because the hardware or the software. I mean, is transformer become the first or the GPU become the first or is we adapt to the hardware or the hardware adapt to the transformers?
So I think it's a very, very tricky question. I don't think I can give you a concrete answer. I think it's hardware. I think without doubt it's hardware. So I think Sarah in her article actually mentioned it. When you have a particular hardware...
um more people are going to kind of utilize it and develop different algorithm i think i would say again i have not worked on nvidia i'm just guessing these things um and nvidia introduced this two to four i think at the time there was no software stack i think it Yes. was it's getting better yeah Yeah, yes. and um also i think at that time the quality was not there yet
But imagine when they introduced this two to four, it created a huge line of research on Yes. that line because there was a hard border, right? So I think it's definitely on hard border. Hard border has a big factor in making a particular technique succeed.
But also I think the second point that I'm having here is Mm about-hmm. that, right? It's about that how you can work with the hardware people in a much more closer form to do hardware software co-design and see kind of can we come up with a better way of in a new algorithm that has a small overall hardware and we can introduce it in the hardware as well. I think you mentioned about the transformer as well. I think transformer is not necessarily that.
The people who invented transformer, they went ahead, they invented their algorithm and then said like, oh, now let's map it to the hardware. They had this idea and they've worked closely during the particular hardware to make sure that they can run their algorithm very efficiently on the hardware as well. So I think to summarize, it's not only about hardware, Mm it's -hmm. both about the current hardware and how you can effectively and productively do hardware software co-design. I think it's both. Yes, thank you. I agree with it. But one more is like the ecosystems.
So all the ecosystem is conquered by the

system is conquered by the Nvidia so No, not true. GPUs also has a factor. yes Okay. I Sure. agree with you because I'm from Huawei so we have us we cheap we build chips also so but little percent of the ecosystems we take so it's hard for us to argue the like argue with Nvidia or we talk with our customers like hey can you like
like work together to build our own chips better than Nvidia, they will know because the ecosystem is all from Nvidia. So it's hard for the chips, other so i chips. i think i okay i mean i cannot comment on nvidia because i don't have any relation with them but i think in at least in the google the way that like our team i am part of the bigger team that we're working is that
These days hardware software co-design becomes much more important right because like we have to make things efficient and kind of I mean
Quantization is like two bits talking about one bit and stuff. What else we can do, right? So it becomes really, really important for us to do hardware software coders. And if we want to sustain this performance, right? And I think it's, at least again from my personal experience at Google, I think we have a really productive hardware software coders design team that's worked with the ML people, Gemini team and worked with the hardware people to make sure that we can translate some of the algorithmic innovation that they have.
into the hardware platform as well. I agree with you, like external maybe it's harder, but I think this is something that we're doing really well at at Google right now. Of course. Um hi, sorry. Um Aaron from Imperial, great chat, uh great talk, I really enjoyed it. Uh I just want to have question, have some question on this last slide. I guess my first question is, well, we all know we're pretty overfitting to the hardware, right? Our optimisations are overfitting to what what we have.
I don't really think that's a good thing, but what's your comment on how we should deal with that? Um, I agree. I told you that this is not a good thing. This is just the first part, right? So I think I'm just going to repeat the same answer. It's like a co-design, right? Yeah, a question on that is, well, we have hardware friends, but hardware friends move slowly. And how do you deal with that? That's a good question. I think something that I wanted to actually talk to the panel at least.
Maybe I can answer it this way. So when we move to this kind of realm of transformer and everyone talks about the generative AI, right? I think building a nice simulator, it's easy. It's very reasonable to do it, right? And I think unfortunately when I see some paper talking about flops, it's very frustrating for me because...
I don't know if I should use this strong word. It doesn't make sense. Flop has nothing. I mean, it's good for early kind of exploration of your idea, but flops has nothing to do with that, right? So what I would argue is that, sure, hardware people go very slowly. It takes x years, more than two years, to kind of develop an idea. But what you can do is like you can actually show your end-to-end performance on a particular simulation.
Right? And convince the hardware people that, hey, this is a valuable idea. We tried it end-to-end. We tried it on the simulator. We modeled all this memory kind of overhead. We explored this bandwidth. And it actually shows a huge, huge overhead. And then they listen. I mean, they have to listen. They cannot do anything else.
right i get that a claim of the simulator is a good thing but i think what in a stage of like it's really hard to persuade people to converge on a single thing even on the ir level right we see different irs like appearing and even on the simulator like
If you're talking about a cycle accurate level simulator, it doesn't really exist or do you see that's like appearing later? It exists. It exists. Talk to me. I mean, after this, Okay. I will give you like two, three examples of the LLM. I mean, not cycle accurate, but semi-cycle accurate. And it gives you a very reasonable kind of metrics for your performance and memory bandwidth and all this stuff. Again, I want to have kind of.
Different answer. So building hardware is a separate story. It takes time. But evaluating your idea is also really important, and you have to accurately evaluate it. Giving me flops, I'm not going to kind of invest the whole industry to validate your idea at all. It just doesn't make sense. Great. Yeah. Thank you. Okay, thank you. Let's thank the speaker again.
Thank you. Okay, so next we'll explain the mentoring session. If you're not part of the mentoring session, the next poster session will start at 2 .30. Sorry, not 2.30, 4.30. Good, I'm very confused. 4.30. Sorry about that. Okay, I'll just hand over to Alexandra. Yeah, so first, could we please put up the slide with the mentors?
That would be great. Uh so the way how uh this works, so basically like every mentor has uh has two mentees and you were assigned group uh uh letters. So like please uh go to the designed group letter uh as the mentor.
Uh and then like for the mentees please find your assignment on the sides and also move to the uh uh to the to the wall with the curr with the uh uh well uh the assigned letter. Uh and like one thing please uh do not uh uh do not go outside this area. So like if you want to move around this room that's fine. Uh but then please bring your letter with you. So if uh if uh some mentee is late then I can find you, okay?
Oh and important part like if you cannot find your mentee or you can or you cannot find your mentor then yeah find me and I will try to help you.













You
