$ stat ./projects/llamatran.md
Title: LLamaTran
Date: 12/2/2025
Description: A minimal Fortran interface to llama.cpp using ISO_C_BINDING. If the Fortran Renaissance is real, it deserves its own 🦙 bindings.
A minimal Fortran interface to llama.cpp using ISO_C_BINDING. If the Fortran Renaissance is real, it deserves its own 🦙 bindings.
Allows any modern Fortran program to load and run GGUF models (Llama-3, Mistral, Gemma, etc.) directly via the llama.cpp C API with no Python dependency.
# 1. Build the shared library
cd llama.cpp
make clean
make -j libllama.so LLAMA_C_EXPORTS=1
# 2. Copy the library to the project root
cp libllama.so ..
# 3. Compile the Fortran program
gfortran -O3 -march=native main.f90 -L. -llama -o llamatran
./llamatran
The example main.f90 loads a GGUF model (default: models/llama-3.1-8b-instruct-q5_k_m.gguf) and runs a simple prompt.
MIT
Finding related projects...
$ cd .. && ./projects.sh
← Back to all projects