3 ms·
Pretty interesting, and rare to see projects in the space written in Fortran. Would be interested to hear what the advantages are, and appreciate if it's simply
by louiskw 3y ago
Pretty interesting, and rare to see projects in the space written in Fortran. Would be interested to hear what the advantages are, and appreciate if it's simply a case of personal preference too!
- andy99 3y agoI'm mostly a python programmer, but I find a lot of the ML frameworks are overkill for what they actually do, especially for inference. Fortran is pretty close to numpy - it handles arrays natively including slicing and matmul instinsics, you don't have to worry about memory etc. But it compiles into something fast and lightweight much more easily than python. It's nothing you couldn't do in C but I think Fortran is better suited for linear algebra. See also https://github.com/rbitr/llama2.f90 https://github.com/rbitr/llama2.f90 which is basically the same thing but for running llama models and has 16-bit and 4-bit options and a lot more optimization.