# Performance portable LLM inference in Fortran (beating llama.cpp/vllm on H200)

**URL:** <https://fortran-lang.discourse.group/t/performance-portable-llm-inference-in-fortran-beating-llama-cpp-vllm-on-h200/11309>\
**Category:** LFortran\
**Created:** [November 16, 2026, 5:06am UTC](https://fortran-lang.discourse.group/t/performance-portable-llm-inference-in-fortran-beating-llama-cpp-vllm-on-h200/11309 "2026-11-16T05:06:51Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![FortranFan](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Post date:** [November 24, 2026, 7:42pm UTC](https://fortran-lang.discourse.group/t/performance-portable-llm-inference-in-fortran-beating-llama-cpp-vllm-on-h200/11309/21 "2026-11-24T19:42:25Z")

</div>

> [@suwesh081](#):
>
> although a direct comparision between his and mine will not be fair, as the LLM and GPU used by me differ by a great margin (i dont have a H200​ 🥀).
> 
> | Code | tok/s |
> | --- | --- |
> | C + CUDA | the full-attention kernel cannot compile because it depends on Hopper thread-block clusters (which my MX450 doesnot have). |
> | LFortran | 24.6 tok/s |

@suwesh081 ,

Please note there was NO question whatsoever of comparison between your environment and that of @certik , the interest is only in relative performance differences on a given environment. For example, the performance using a straight, standard (and potentially portable) Fortran codebase on a **given** environment compared to other (effectively, non-standard and usually non-portable) options on the same.

So the curiosity here is the relative difference on **your** environment with LFortran vs ‘C + CUDA’.

And what you are indicating is LFortran is presently INFINITELY superior in your environment because your “X” is basically zero tok/s!

Goes to prove what @szaghi stated recently, @certik and the LFortran team rock!!

---

<div class="post-metadata">

**Author:** ![suwesh081](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/suwesh081/32/7986_2.png) [@suwesh081](https://fortran-lang.discourse.group/u/suwesh081)\
**Post date:** [November 25, 2026, 3:34am UTC](https://fortran-lang.discourse.group/t/performance-portable-llm-inference-in-fortran-beating-llama-cpp-vllm-on-h200/11309/22 "2026-11-25T03:34:32Z")

</div>

> [@certik](#):
>
> When we focus on it, I am sure we can get it up quite easily.

Yes, I guess Batched prefill and decode using GEMM can provide a substantial speedup.

Memory bandwidth is still undefeated. 🔥

[Previous page](https://fortran-lang.discourse.group/t/performance-portable-llm-inference-in-fortran-beating-llama-cpp-vllm-on-h200/11309.md?page=1)
