Views
No views yet
input_layernorm.weight, post_attention_layernorm.weight, model.norm.weight) are folded into the following linear layers and then removed from the state dict entirely.Framework support note. Stock vLLM currently does not load this checkpoint because the norm weight tensors are absent. The upstream patch to accept missing tensors is tracked at: TBD (vLLM issue link). Until the patch lands, use HuggingFace Transformers; it loads this with a warning that norm weights were not initialized and defaults them to ones, which is the correct behavior for FlashNorm.
RMSNorm -> Linear:g into the following linear layer: W_star = W @ diag(g), computed once at checkpoint conversion.rms(x).transformer_tricks1import transformer_tricks as tt
2tt.flashify_repo('meta-llama/Llama-3.1-8B', strict=True)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained('open-machine/Llama-3.1-8B-FlashNorm')
4model = AutoModelForCausalLM.from_pretrained('open-machine/Llama-3.1-8B-FlashNorm')
5
6ids = tok('Once upon a time', return_tensors='pt').input_ids
7out = model.generate(ids, max_new_tokens=50, do_sample=False)
8print(tok.decode(out[0], skip_special_tokens=True))1@misc{graef2024flashnormfastnormalizationtransformers,
2 title={FlashNorm: Fast Normalization for Transformers},
3 author={Nils Graef and Matthew Clapp and Andrew Wasielewski},
4 year={2024},
5 eprint={2407.09577},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2407.09577},
9}