News for hackers. Stuff that matters.
Re:DeepMind’s New Language Model, Chinchilla by ShamelessC on Monday April 11, 2022 @09:22AM (#30988286)
Seems the link is down. Found a decent synopsis/discussion on lesswrong.

https://www.lesswrong.com/posts/midXmMb2Xg37F2Kgn/new-scalin...

> On March 29th, DeepMind published a paper, "Training Compute-Optimal Large Language Models", that shows that essentially everyone -- OpenAI, DeepMind, Microsoft, etc. -- has been training large language models with a deeply suboptimal use of compute.

> Following the new scaling laws that they propose for the optimal use of compute, DeepMind trains a new, 70-billion parameter model that outperforms much larger language models, including the 175-billion parameter GPT-3 and DeepMind's own 270-billion parameter "Gopher".

Re:DeepMind’s New Language Model, Chinchilla by gyang on Monday April 11, 2022 @11:57AM (#30990593)
I think there remains an immense amount of such suboptimality still hanging from the tree, so to speak.

For example, our recent paper "Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer"[1] shows that even learning rate and initialization used by existing models are deeply wrong. By just picking them correctly (which involves some really beautiful mathematics), we can effectively double the model size of the GPT-3 6.7B model (to be comparable in quality to the 13B model across the suite of benchmark tasks).

Large neural networks behave in a way we are only beginning to understand well just because each empirical probe of any such model is so much more expensive and time consuming than typical models. But principled theory here can have a lot of leverage by pointing out the right direction to look, as it did in our work.

[1] http://arxiv.org/abs/2203.03466

Re:DeepMind’s New Language Model, Chinchilla by p1esk on Monday April 11, 2022 @12:14PM (#30990877)
What do you think about the concept of "critical batch size"? https://openai.com/blog/science-of-ai/
Re:DeepMind’s New Language Model, Chinchilla by gyang on Monday April 11, 2022 @12:31PM (#30991159)
I think the concept makes sense. The basic insight, that the right batch size depends on the difficulty and noisiness of a task, is already used by teams. For example, the PaLM paper from last week increased its batch size throughout training.

But as far as I know, the more precise predictions of optimal batch size aren't used much, probably because it's expensive to measure accurately, or because the predictive equation isn't accurate enough to begin with. I wonder if we can "transfer" the optimal batch size from a smaller setting (smaller model or data) to the full setting, like in our paper. This would make it much more practical.

Re:DeepMind’s New Language Model, Chinchilla by eigenvalue on Monday April 11, 2022 @10:18AM (#30989063)
According to the LessWrong post, the smaller model trained on more data performs better on most of the tasks, but it’s worse on “college level math” questions. I wonder why that is. Is it because the extra capacity of the larger model was used to basically memorize theorems? Or is it because the extra “brain power” let it model the math better? Oddly, one of the tasks that the smaller most outperformed the larger model on is “high school level math”! Very counterintuitive, and I am curious if there are any big takeaways lurking in that disparity.
Re:DeepMind’s New Language Model, Chinchilla by ShamelessC on Monday April 11, 2022 @10:49AM (#30989573)
Gwern responded to a similar question in the comments section.

(parent)

> the fact that data and compute need to scale proportionally seems… like a big point in favor of NNs as memorizers/interpolators.

(gwern)

> Surely it's the opposite? The more bang you get out of each parameter, the less it looks like 'just' (whatever that means) memorization/interpolation. When you needed to increase parameters a lot, disproportionately, to cope with some more data, that does not speak well of abstractions or understanding. (If I can train a 1t model to get the same loss as what I thought was going to take a 100t model, why would I think that that 100t model must be memorizing/interpolating less?) Let's take your claim to its logical extreme: suppose we discovered tomorrow a scaling law that made parameters near-constant (log, let's say); would that not suggest that those parameters are super useful and it's doing an amazing job of learning the underlying algorithm and is not memorizing/interpolating?

Re:DeepMind’s New Language Model, Chinchilla by sillysaurusx on Monday April 11, 2022 @11:18AM (#30990017)
This isn’t addressing their question. And Gwern’s goal here is to (incorrectly) try to get rid of the idea that models are just memorizing and interpolating, when in fact memorization and interpolation is what we all do, including models. He’s just bothered by the idea that people think of models as less than magic.

On the other hand, https://twitter.com/model_mechanic/status/151297688118364569... is admittedly pretty magical, even if the basis of that magic is memorization and interpolation.

Re:DeepMind’s New Language Model, Chinchilla by rictic on Monday April 11, 2022 @12:40PM (#30991320)
To rebut someone's argument you must address the argument and not just talk about them and their motivations

From your comment a reader will understand that you think they're just memorizing and interpolating and that you disagree with gwern on this point, but you've given your reader nothing that argues in favor of your position

Why should someone believe that models are just memorizing and interpolating?

Re:DeepMind’s New Language Model, Chinchilla by yldedly on Monday April 11, 2022 @01:16PM (#30991898)
It's impossible for a piecewise linear function to be anything other than linear outside the training sample. They are by their definition unable to do anything but interpolate.
Re:DeepMind’s New Language Model, Chinchilla by drdeca on Monday April 11, 2022 @09:06PM (#30997329)
(Side note: Transformers aren’t piecewise linear. The dot products are bilinear, and feeding in the same input twice (under different linear maps) into a bilinear map, produces a quadratic map, not a linear one.)

People arguing about this are basically all speaking ambiguously, in ways that tend to either make an apparent disagreement when there is none, or hide the location of the actual disagreement.

It is true that a piecewise-linear function, within any linear component, will have any convex combination of some points be sent to the corresponding convex combination of where it sends those points.

It is not true that a piecewise-linear model trained on a set of data points will produce only outputs which are a convex combination of outputs that appear in the training set.

These are both obvious.

If one person takes the former to be what “it just interpolates between points” means, and another takes the latter to be what “it doesn’t just interpolate between points” means, and then they argue about which of them is right, then both are being silly.

I’m not saying that this is literally what is happening. This is meant as a metaphor for somewhat more sophisticated/reasonable interpretations of “(doesn’t) just interpolate(s) between points in the data set”.

_____________

A model trained on images which produced only convex combinations of images in its training set, would clearly be producing what could be called “interpolations between images in its training set”, and taking convex combinations of images is unimpressive.

This is obviously not what today’s image ML models do.

And, of course, you aren’t claiming that they do.

______

I should speak plainly.

Much of where the disagreement is, or is hidden behind, is disagreement as to the meaning of “just interpolation”.

At one end, “just interpolation” could refer to “take the Voronoi cells of the inputs in the training set (or maybe the dual of it, whatever), and at runtime, find the nearest neighbors of the point and take the linear combination of their assigned outputs, weighted according to the distances to the point.” This would certainly be “interpolation”, and is not impressive, calling it “just interpolation” seems quite fitting. However, it is obviously not what ML models do.

On the other end of the scale, “interpolation” could be interpreted as meaning “any process whatsoever, except that the process is required to be based primarily on the training data, with the process being generated mechanically from the training data, of computing an output for a given input.” And, certainly today’s ML models satisfy this description, but with this description the moniker “just” seems, inappropriate. It is like saying “just a process”. Well, yeah, everything is a process.

__________

It seems to me like much of what the disagreement ought to be about (which might not be what it is about) is along the lines of, how many conceptual layers of something are captured? Like, say something modeled images of faces as “linear combinations of images from this list of images of faces”. That’s an extremely basic thing. Then, very slightly more, would be something that determines positions of facial features, and then does stretching etc. of images to make them line up with the image to reproduce, and then does linear combinations. Then, suppose something takes like, the parts of the images of the face which are just skin and not like lip skin or eyes, and takes local averages of this in a number of general locations of the face (relative to locations of facial features), and takes principal components of this across the training set (with principle components perhaps corresponding to perhaps, 1 or 2 for skin tone, and then directionality for the lighting in the image, and maybe a component for how shiny the skin is).

A model which represents a face in terms of variables which we can interpret as things like “position of eyes”, “skin tone”, “lighting”, seems notably less in the direction which one might call “interpolating” than one which just lists a coefficient for each image in the training set (or each principal component of images (taken as plain vectors) in the dataset). And, of course, one can go farther than this in this direction. And the further one goes in this direction, (so, like, the more that what the individual images in the training set tell the model is “here is more data about an overarching pattern”), the less it seems like what one might be inclined to call “just interpolation”.

Re:DeepMind’s New Language Model, Chinchilla by yldedly on Tuesday April 12, 2022 @03:59AM (#30999828)
>It is not true that a piecewise-linear model trained on a set of data points will produce only outputs which are a convex combination of outputs that appear in the training set.

No, and I didn't claim that. I said that, outside the training sample, the model is linear (or quadratic in the case of transformers, thanks for pointing that out) Whether linear or quadratic, a model that has a fixed structure outside the training sample, will obviously not fit data which lies far away from the training sample - i.e. it will not extrapolate. This isn't controversial - it's just something people like to forget about.

>A model trained on images which produced only convex combinations of images in its training set, would clearly be producing what could be called “interpolations between images in its training set”, and taking convex combinations of images is unimpressive.

True! I should have clarified that it's not linear interpolation in pixel space (or input space generally), but interpolation on the latent manifold. This is where the power, as well as limitations of deep learning come from. It's definitely non-trivial to identify the latent manifold of data - different dimensions of the manifold may sometimes even correspond to independent components, as you mention (position of eyes, skin tone,...) (though empirically, finding disentangled latent codes is mostly a function of the random seed).

How does an NN process a new input? It maps the input to the latent manifold.

In the input space, it will be some highly non-linear, non-trivial combination of points, which in terms of Euclidean distance in the input space, could be arbitrarily close or far away.

In the latent space, the output will be some convex combination of nearby points.

Here's the kicker - even if your problem happens to be well-modeled as a continuous, low-dimensional manifold embedded in a high-dimensional space (and many, many problems aren't), and even if you manage to obtain a super dense sampling of input space, so that the manifold can be well-approximated (which is impractical or impossible for most problems),

you will never be able to generalize beyond the data distribution.

Our brains don't stop working as soon as conditions are slightly different from what we've seen before. If there's a slight fog on a Stop sign, we can still see a stop sign. If the Go board is 9x9 rather than 19x19, we can still play Go. If we can play Starcraft on one map, we're pretty much as good on a different map, we don't need to relearn the game over the next several thousand years.

How come? Because we aren't just latent space interpolators. We can extrapolate.

Re:DeepMind’s New Language Model, Chinchilla by VirusNewbie on Monday April 11, 2022 @11:45AM (#30990376)
Why do you say they just memorize and interpret? I can teach GPT-2 new things, including new objects and their physical properties and it does a good job with that. That also means it has definitely not just regurgitated a matching sentence back to me.
Re:DeepMind’s New Language Model, Chinchilla by replygirl on Monday April 11, 2022 @02:04PM (#30992539)
when i see a new object for the first time, i MEMORIZE what i INTERPRET as its identifying traits, and ask someone who has already MEMORIZED what that object is to INTERPRET a concept with which i can associate those traits. the next time i encounter an object with those traits i can then recall the associations, then compose those trait-level interpretations into an interpretation of an object.

at a fundamental level that's all this is, compositions of associated memorizations and interpretations, which map to compositions of sentence parts the machine can regurgitate back to you

Re:DeepMind’s New Language Model, Chinchilla by VirusNewbie on Monday April 11, 2022 @07:06PM (#30996317)
That's a bit of a reductionist way of looking at any sort of learning; I'm not sure how it's helpful to use memorize/interpret in terms of distinguishing what language models do compared to other types of learning.

I might be missing the point though?

Re:DeepMind’s New Language Model, Chinchilla by adamsmith143 on Monday April 11, 2022 @10:46AM (#30989519)
Probably right. Most people dump on these language models for this reason but it would be absurd for a HS student to have to re-derive the quadratic equation every time they worked on an Algebra problem so naturally you memorize it. Why should it be any different for a language model?
Re:DeepMind’s New Language Model, Chinchilla by eutectic on Monday April 11, 2022 @11:15AM (#30989971)
I never memorized the quadratic formula, and I did OK.
Re:DeepMind’s New Language Model, Chinchilla by whimsicalism on Monday April 11, 2022 @12:55PM (#30991587)
Did you go to school in the US in the last 2-3 decades?
Re:DeepMind’s New Language Model, Chinchilla by eutectic on Tuesday April 19, 2022 @05:12AM (#31081036)
No, the UK. But completing the square only takes a minute.
Re:DeepMind’s New Language Model, Chinchilla by whimsicalism on Tuesday April 19, 2022 @10:31AM (#31083663)
Try completing the square when the coefficients are variables :)
Re:DeepMind’s New Language Model, Chinchilla by replygirl on Monday April 11, 2022 @02:21PM (#30992647)
Once you start calculus they let you use a real calculator
Re:DeepMind’s New Language Model, Chinchilla by whimsicalism on Monday April 11, 2022 @02:25PM (#30992687)
That may be true, but in the US there are typically math courses before calculus.
Re:DeepMind’s New Language Model, Chinchilla by replygirl on Monday April 11, 2022 @03:46PM (#30993826)
But then we get a calculator.
Re:DeepMind’s New Language Model, Chinchilla by whimsicalism on Monday April 11, 2022 @04:27PM (#30994452)
Even then, it is typically not a symbolic calculator so if your answer is a closed form function of variables, you're SOL with a TI-84.
Re:DeepMind’s New Language Model, Chinchilla by adamsmith143 on Monday April 11, 2022 @04:17PM (#30994285)
Maybe we went to radically different schools but I certainly had to calculate by hand using the quadratic formula countless times where calculators were not allowed to be used.

Anyway it distracts from the point so it's not relevant.

Re:DeepMind’s New Language Model, Chinchilla by danuker on Monday April 11, 2022 @11:09AM (#30989872)
It might just be by chance: the initial weights of one model could have been lucky in some areas, and unlucky in others. There's no way to tell other than training again, which is a costly proposition.
Re:DeepMind’s New Language Model, Chinchilla by eigenvalue on Monday April 11, 2022 @05:33PM (#30995393)
That seems pretty unlikely to me actually. As the models and training data get much bigger, I think the initial weights become less important (at least assuming your random weights have certain desirable statistical properties, which they do by construction usually).
Re:DeepMind’s New Language Model, Chinchilla by VikingCoder on Monday April 11, 2022 @10:37AM (#30989366)
70 billion parameters... Is each of those a 4-byte float?

So, is that 280 billion bytes of just parameters?

Re:DeepMind’s New Language Model, Chinchilla by sudosysgen on Monday April 11, 2022 @10:49AM (#30989578)
I'm fairly confident each of those is a 2-byte float, but yes that's over 100 GB of parameters.
Re:DeepMind’s New Language Model, Chinchilla by sillysaurusx on Monday April 11, 2022 @11:13AM (#30989942)
Welcome to the party! I joined ML because I realized I could help. You can too. I bet you’re both already thinking of clever ways to deal with massive models from an infrastructure standpoint. That’s just one of hundreds of interesting problems.
Re:DeepMind’s New Language Model, Chinchilla by native_samples on Monday April 11, 2022 @01:57PM (#30992418)
Is 100GB of parameters really that large? 128GB of RAM on a server class machine is not unusual. Seems such a model could fit entirely in RAM.
Re:DeepMind’s New Language Model, Chinchilla by kristjansson on Monday April 11, 2022 @06:27PM (#30995916)
To elaborate on the sibling comment: main memory is much bigger, but CPUs are much, much slower. It would be a challenge to merely run a model like this on CPU, and totally infeasible to train one. So the challenge is to fit into the memory of a single GPU you can afford, coordinate multiple GPUs, or efficiently page from main memory into GPU.
Re:DeepMind’s New Language Model, Chinchilla by andbberger on Monday April 11, 2022 @02:01PM (#30992475)
GPU memory is generally much smaller and more expensive
Re:DeepMind’s New Language Model, Chinchilla by Delitio on Monday April 11, 2022 @11:15AM (#30989974)
Is there any source which explains what billion of parameters actually are?

In my mind a parameter is: language, dialect, perhaps context parameters (food, dinner, lunch, travel) and if we than talk about language and audio perhaps sound waves, gender.

Or are context parameters which gives you insight? Like a billion of parameters are literally something like travel=false, travel-europe=true people speaking=e, age, height,

Re:DeepMind’s New Language Model, Chinchilla by dotnet00 on Monday April 11, 2022 @11:22AM (#30990063)
Parameters are just floating point numbers, at most they can be seen as degrees of freedom or kind of like the order of a polynomial used in curve fitting.

They're too abstract to assign much meaning to individual parameters, as our understanding of why their values are exactly the way they are is extremely limited.

Re:DeepMind’s New Language Model, Chinchilla by brrrrrm on Monday April 11, 2022 @11:56AM (#30990568)
A good visual introduction to neural networks can be found here: https://playground.tensorflow.org

A parameter is a "weight" in this case (the lines drawn from neuron to neuron). The neurons are effectively runtime values or "activations." Parameters (weights) are updated during training and then set as constant during "inference" (also called "prediction").

There's unfortunately a ton of jargon and different groups use different words almost exclusively.

Re:DeepMind’s New Language Model, Chinchilla by matt123456789 on Monday April 11, 2022 @11:18AM (#30990018)
A parameter is a scalar value, most of which are in the attention matrices and feedforward matrices, you also hear these called “weights”. Any intro to DL course will cover these in detail. I recommend started with Andrew Ng’s Coursera class on Intro to Machine Learning, although there may be better ones out there now.
Re:DeepMind’s New Language Model, Chinchilla by Delitio on Monday April 11, 2022 @12:48PM (#30991469)
Input parameter vs. weights then?

I see tx

Re:DeepMind’s New Language Model, Chinchilla by lostmsu on Monday April 11, 2022 @01:27PM (#30992046)
These networks (text models) usually have around a few thousand inputs.
Re:DeepMind’s New Language Model, Chinchilla by jefft255 on Monday April 11, 2022 @11:18AM (#30990013)
The parameters are the number of weights in a neural network, in this case.
Re:DeepMind’s New Language Model, Chinchilla by nl on Monday April 11, 2022 @05:41PM (#30995463)
It's rare a single parameter maps to a human understandable concept. Occasionally someone finds one that does map fairly well, for example this case back in 2017: https://openai.com/blog/unsupervised-sentiment-neuron/#senti...
Re:DeepMind’s New Language Model, Chinchilla by Inufu on Tuesday April 12, 2022 @09:40AM (#31002565)
Yes, parameters are usually stored as float32, activations as bfloat16 or float16.