That’s absolutely true and a good point. I remember multiquery attention struggles when trying to port LoRA from LLaMA to Falcon.
@rasbt
-

TransformerEncoderLayer Abstraction Compared to Conv2D and RNN
By
–
Ok, fair. But if you look at the TransformerEncoderLayer class, for example, I don't think it's more abstract than nn.Conv2D or nn.RNN, for example. For some reason people just like implementing Transformer layers from scratch way more than convolutional or recurrent layers .
-
Everyone’s Using nn.Linear and Similar Neural Network Layers
By
–
But everyone's using nn.Linear etc.
-
PyTorch Transformer Classes Predate Most Online Tutorials
By
–
Interesting! I'd say the nn.TransformerEncoderLayer and nn.TransformerDecoderLayer classes etc. actually precede most tutorials out there. Chicken-egg problem maybe
-
Using nn.Linear and nanoGPT for Educational Implementation
By
–
Given that you are using nn.Linear, also looking at nanoGPT . (Although here, I guess the reimplementation serves educational purposes)
-
Why Do Developers Avoid PyTorch’s Built-in Transformer Layers?
By
–
Yeah, I always wonder what's up with that. The various Transformer layers in PyTorch have been around since ~2020, but everyone seems to be (still) rolling their own, https://
pytorch.org/docs/stable/nn
.html#transformer-layers
… Are the implementations somehow bad or inefficient? Genuine question. -
Jensen-Shannon Divergence: DNN Training Reproducibility Issues on Nvidia GPUs
By
–
Haha good one . Jensen-Shannon divergence: Training DNNs on Nvidia GPUs is not reproducible due to randomly selected code
-
Question about TPU and Nvidia GPU compatibility for suggestion
By
–
Thanks for the suggestion! That's only for TPUs, or would it also work on Nvidia GPUs?
-
Considering accuracy trade-offs and LoRA alternatives
By
–
Thanks for suggesting! Yeah, I was thinking about that as well, but it may affect accuracy, and then once going this route, one might as well also think about LoRA etc.
-
Helpful PR from Adrian Waelchli on Lightning Repository
By
–
You might find @adrianwaelchli 's PR helpful: https://
github.com/Lightning-AI/l
ightning/pull/17462
…