r/golang • u/Tobias-Gleiter • Jun 20 '25
discussion Replace Python with Go for LLMs?
Hey,
I really wonder why we are using Python for LLM tasks because there is no crazy benefit vs using Go. At the end it is just calling some LLM and parsing strings. And Go is pretty good in both. Although parsing strings might need more attention.
Why not replacing Python with Go? I can imagine this will happen with big companies in future. Especially to reduce cost.
What are your thoughts here?
113
Upvotes
View all comments
1
u/Revolutionary_Ad7262 Jun 20 '25
Python is used for AI, so AI tasks that don't fall into the
we need this particular AI library because it's good and only Python supports itcategory aren't necessarily going to be written in a language that's better suited for that, like Rust/Go/Java/C#/whatever, which are arguably better as a API glue/consume code due to static typing, better tooling and better performance/latency/hardware utilisationIt doesn't have to make any sense, it's just a cultural phenomenon and virtuous cycle. In the same way PC games UIs and stuff like SpaceX dashboard as often written nowadays in JS. Not because JS in isolation is the best technology for this, but because: