f is for Fortran. Here I'm implementing language models from scratch in Fortran. Inspired by llm.c
I contribute general purpose layers to neural-fortran deep learning library. Therefore, it is among this project deps (but it's still tiny).
fpm build
Layer | Status | Forward | Backward | Llama | Qwen |
---|---|---|---|---|---|
Llama Attention | ✅ | ✅ | ✅ | ✅ | ✅ |
Silu MLP | ✅ | ✅ | ✅ | ✅ | ✅ |
RMSNorm | ✅ | ✅ | ✅ | ✅ | ✅ |
Decoder Layer | ✅ | ✅ | ✅ | ✅ | ✅ |
Llama Model | ⌛ | ✅ | ⌛ | ||
KV Caching | ❌ | ❌ | - | ||
Text Generation | ❌ | ❌ | - | ||
Training | ❌ | ❌ | ❌ |
- Code fo loading safetensors. Will need to make Rust and Fortran friends
- BPE Tokenizer. In progress
- Graphics cards. Need to choose between C CUDA, Fortran CUDA and OpenACC
- CMakeList