Optimal LLM Archicture

  • xPOS+BCA Encoding
  • SwiGLU Activation
  • MQA
  • Sophia Optimizer
  • Flash Attention
  • Early Dropout
  • Blockwise Parallel Transformer (8K)

Someone else’s optimal: https://refact.ai/blog/2023/applying-recent-innovations-to-train-model/

Positional Encoding: xPOS+BCA

Multi-Query Attention

Activation Function: SwiGLU

FlashAttention

PagedAttention

Sophia Optimizer

Tokenizer

Training

DeepSpeed ZeRO https://www.deepspeed.ai/tutorials/zero/ https://deepspeed.readthedocs.io/en/latest/zero3.html https://www.deepspeed.ai/2021/03/07/zero3-offload.html https://lightning.ai/docs/pytorch/stable/advanced/model_parallel.html

https://github.com/EleutherAI/gpt-neox/

Early Dropout

Blockwise Parallel Transformer

MOE

Sparsity https://arxiv.org/pdf/2111.12763.pdf https://arxiv.org/pdf/2301.00774.pdf https://neuralmagic.com/blog/sparsegpt-remove-100-billion-parameters-for-free/

Efficiency https://scale.com/blog/pytorch-improvements https://github.com/lucidrains/x-transformers/issues/29

Future

MegaByte https://arxiv.org/pdf/2305.07185.pdf

Hyena https://arxiv.org/pdf/2302.10866.pdf https://hazyresearch.stanford.edu/blog/2023-03-07-hyena

Fine Tuning

DPO https://arxiv.org/abs/2305.18290

Other Models

https://huggingface.co/blog/starcoder https://www.mosaicml.com/blog/mpt-30b https://huggingface.co/replit/replit-code-v1-3b

Inference Tricks

https://threadreaderapp.com/thread/1675023699802456066.html