Live data from Hacker News

Exponentially faster language modelling

arxiv.org

11–20 of 150 posts

Re: Exponentially faster language modelling

#11

What are the potential consequences? Does this open doors to faster edge inference or improved capabilities?

Both. Cheaper CPU-based inference, GPUs are not as competitive for sparse linear algebra. This could lead to much larger models, as you only touch a small portion of the matrix during inference. However, the training here is still dense-LA on a GPU, so you still blow up the compute cost when increasing model size.

Re: Exponentially faster language modelling

#12
post #5

Cool. Important note: """ One may ask whether the conditionality introduced by the use of CMM does not make FFFs incompatible with the processes and hardware already in place for dense matrix multiplication and deep learning more broadly. In short, the answer is “No, it does not, save for some increased caching complexity." """ It's hard to beat the hardware lottery!

Infact, as stated in the paper, this is bad news > We therefore leave the attention layers untouched Meaning, presumably, that the GPU memory remains the bottleneck Flops really are quite cheap by now, e.g. vision inference chip ~$2/teraflop/s !!

[deleted]

Re: Exponentially faster language modelling

#13

What are the potential consequences? Does this open doors to faster edge inference or improved capabilities?

Both. Cheaper CPU-based inference, GPUs are not as competitive for sparse linear algebra. This could lead to much larger models, as you only touch a small portion of the matrix during inference. However, the training here is still dense-LA on a GPU, so you still blow up the compute cost when increasing model size.

Note this doesn't speed up training

Re: Exponentially faster language modelling

#14
Link to previous paper:

https://arxiv.org/abs/2308.14711

An attempt at a summary: They use a sigmoid function to make differentiable "soft" branches, and stack them to construct a binary tree, with the goal of only taking one branch at inference time (but training the whole tree) leading to log(W) instead of W inference cost. They gradually harden the branches so they become hard branches at the end of training.

A branch is computed as branch(input, N), with a neural network N computing a scalar c=N(input), then using a sigmoid to do a soft branch by returning the weighted sum of the recursive call s(c)*branch(input, N_left) + (1-s(c)) * branch(input, N_right) (the two weights s(c) and 1-s(c) sum to 1). They only do "proper processing" using the leaf nodes.

Then they add a new loss term that encourages hard decisions by minimising the entropy of the Bernoulli distribution, making the 2 weights converge to 0 and 1, at which point only one branch needs to be taken at inference. They also state that this hardening often happens automatically though.

It's a simple idea but the loss formulation is nice, you usually want your loss terms to be a measure of information.

Re: Exponentially faster language modelling

#15

Could this be applied to other models like Llama2 or Mistral?

Just from the abstract I don't see why not, it's just replacing the feed forward network that's part of all of these models with a very sparse one. The bigger problem is you seemingly have to retrain the model, so you couldn't just drop in llama2 weights from meta and have it work. Which makes it much more limiting. Something that used existing weights would be a lot more practical (like quantization for example). For BERT, I can see this being useful if you had to make a really fast embedding model. There was a discussion about a fast embedding use case not long ago https://news.ycombinator.com/item?id=37898001

Re: Exponentially faster language modelling

#17

What are the potential consequences? Does this open doors to faster edge inference or improved capabilities?

I think with that magnitude of a speed improvement it should become feasible to do just-in-time embedding creation for semantic search for much larger documents.

Re: Exponentially faster language modelling

#18
post #5

Cool. Important note: """ One may ask whether the conditionality introduced by the use of CMM does not make FFFs incompatible with the processes and hardware already in place for dense matrix multiplication and deep learning more broadly. In short, the answer is “No, it does not, save for some increased caching complexity." """ It's hard to beat the hardware lottery!

Infact, as stated in the paper, this is bad news > We therefore leave the attention layers untouched Meaning, presumably, that the GPU memory remains the bottleneck Flops really are quite cheap by now, e.g. vision inference chip ~$2/teraflop/s !!

Bottleneck for larger models however this would presumably allow for cheaper models at scale or on compute constrained devices (like phones).

Re: Exponentially faster language modelling

#20
This is rather scary. I feel we are witnessing the evolution of language models and artificial intelligence, which seems intellectually laudable until you realize that the underlying evolutionary framework for this evolution is the global capitalistic system whose only criteria for selection in short-term monetary gain.

We are creating a monster.

Post reply on HN