5 ms·
Expanding Transformer size without losing function or starting from scratch
- valine 3y agoI’m surprised we weren’t doing this already. I’d like to see what happens if you train a small language model on preschool level reading material, and ramp up both the model size and training data complexity as you go. My hope would be you’d need less data to train a model in this fashion than you would with our current approach of throwing the entire internet at the model.
- two_in_one 3y ago> I’m surprised we weren’t doing this already. Because they don't work very well in real life. Article doesn't have any experimental proof it works, saves training time, or size, or anything.. And it doesn't mention another promising approach: mix of experts. There are many ways of implementing it. I mean the general idea of specialized fragments of the NN which are selectively called. They don't have to be trained all at once.
- tempusalaria 3y agoIt’s weird a DeepMind author is on this as they experimentally studies these methods in Gopher and found it was useless. Even the layer duplication trick they were using doesn’t work. I tried a refinement of that where you fine tuned the activations of the added layers to match the original activations which helped a bit relative to what DeepMind found but it still wasn’t material enough to be worth bothering with
- two_in_one 3y agoI tried adding layer. The conclusion is, it's useful if you cannot train the whole model at once. Then you can split it in 2 and train the first half, with embedding/deembedding layers. After it stops improving add the second half of the layers, and train only it, freezing everything else. This worked in my case, when model params number < 10% of the number of training tokens. Splitting model in 3 is significantly less effective. Don't know why, but the third part adds almost nothing in accuracy and a lot in training time. One thing where additive training works is fine tuning, like LoRA. But that's different. It's like poor man's way. For those who cannot train the whole model. Most likely uptrainig it whole is more efficient, just my guess.
- jncraton 3y agoYou might be interested in TinyStories: https://arxiv.org/abs/2305.07759 https://arxiv.org/abs/2305.07759 > In this work, we introduce TinyStories, a synthetic dataset of short stories that only contain words that a typical 3 to 4-year-olds usually understand, generated by GPT-3.5 and GPT-4. We show that TinyStories can be used to train and evaluate LMs that are much smaller than the state-of-the-art models (below 10 million total parameters), or have much simpler architectures (with only one transformer block), yet still produce fluent and consistent stories with several paragraphs that are diverse and have almost perfect grammar, and demonstrate reasoning capabilities.
- SomewhatLikely 3y agoThe general term for this idea is curriculum learning.
- galaxytachyon 3y agoHilarious. Eventually we will create a real sentient AGI that is highly efficient and can do everything a normal human can, but it turns out it needs 20 years of training and too much entertainment needs and it often goes mad when we force it to work on repetitive work too long, i.e. a normal human. Would be so funny if by the end of all the AI research, we found out the human brain is already the best you can ever get.
- Ifkaluva 3y agoI would be delighted by this. Sounds like something Douglas Adams would dream up.
- bilsbie 3y agoIs that kind of the Star Trek universe?
- sva_ 3y ago> Would be so funny if by the end of all the AI research, we found out the human brain is already the best you can ever get. Seems rather unlikely. It's just whatever worked so far, evolutionary. The belief of humans being the pinnacle of possible intelligences seems as naive as the belief that the earth is the center of the universe.
- tomohelix 3y agoI understand what you meant. But here is the thing, nature did create some of the most efficient and marvelous engineering feats we have ever seen and still struggle to match. Take the knee for example. You would be really hard pressed to make something that has ALL the flexibility and functionality of the knee while being as durable and reliable even using some of the most advanced technology right now. Another example is the bacteria. Some bacteria is so efficient it is literally approaching the limit of thermodynamics. You would need some of the most overengineered heat engine to match that kind of efficiency. And I guarantee you that we are far from able to make such a system as small and reliable as a bacterium. In fact if such a system were to appear right now, we would immediately call it incomprehensible alien technology.
- drdeca 3y agoDo I understand correctly that they are showing, "if we increase the size of these tensors along these directions, by padding them with zeros, it does not change the inference behavior of the network."? If so, I'm.. kind of surprised that this wasn't found earlier? Ah, well, they also show that they can also insert a new layer in the middle, but, because the layers output changes to be added on to the vector that was received, it does not seem terribly surprising to me that they can initialize a layer such that it produces 0 as the vector it should add onto it. Ah, wait, no, they also show that other parts of tensors that are added when increasing the size of some parameters, can be initialized arbitrarily, provided that the appropriate other parts are 0 (or, either 0 or identity matrices? not sure.) And, also some of the tensors have to be re-scaled. Ok. edit: Though... seeing as a new layer can be inserted at any point, this does make me wonder about, could we do some pre-training of a network, and then freeze those weights, add in a layer and train that layer on some fine-tuning task, and then, separately, do the same thing with a number of other fine-tuning tasks (each one with the extra layer being trained without the others being present), and then like, take the network where each of those extra layers are present at the same position in parallel (so, they get the same input, and each of their outputs are added to the sum being created, before going on to the next step. Maybe with each of them being weighted.) This seems like it could allow for some kind of like, mixture of experts thing? idk what I'm talking about though
- tempusalaria 3y agoThis was discussed in Gopher paper. The added zero weights don’t integrate well into LLMs during training unfortunately. They actually found that if you duplicated layers when adding it worked better than zero weights. Which matches some of the commutating layer studies that have been done
- drdeca 3y agoI notice that in this paper, some of the new weights can be initialized arbitrarily, and only some of them have to be zero. In the Gopher paper, were all the new weights zero, or only the ones that this paper calls for being zero? I would guess the latter? (I don't expect you to either have or fetch an answer to this question. If you happen to already have the answer, or simply a more educated guess than I have, I'd like to hear it, but I mean this more as "this question comes to mind" than anything where I expect an answer.)
- anyoneamous 3y agoExpanding and contracting Transformers' sizes is referred to as "morphing" and was much more commonly observed in the cartoon than the Michael Bay movies - but the cartoons are still better. What are you guys talking about?
- deleted 3y ago[deleted]
- shwaj 3y agoTry reading the abstract of the linked paper. TL;DR: neural networks
- keskival 3y agoI actually authored a patent for something related to this in 2020: https://scholar.google.com/citations?view_op=view_citation&hl=ca&user=l7qMBpkAAAAJ&citation_for_view=l7qMBpkAAAAJ:YsMSGLbcyi4C https://scholar.google.com/citations?view_op=view_citation&h... Not specifically for Transformers but for all kinds of neural networks. It's about training long-lived neural networks where the training spans longer time scales than the neural network architecture remains valid. For example in self-driving cars, it's important to be able to train a model with collected live data over the years so that we can upgrade the model architecture as we go without throwing out the training already done. The patent describes operations where the model architecture can be mutated step by step from old architecture to a new one without forgetting too much of the training which was applied to the old model. This includes but isn't limited to: Increasing/decreasing the width of neuronal layers, adding/removing layers, adding/removing inputs, adding/removing outputs, changing activation functions, changing loss functions. It also describes planning the steps of how to migrate from the old architecture to the new one.
- two_in_one 3y agoCool patent, looks like it covers everything.