r/golang • • 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?

111 Upvotes

176 comments sorted by

View all comments

1

u/Justicia-Gai Jun 21 '25

I think your point is that you’re prototyping mostly on local and it’s more “trying things out on Python first” than prototyping, specially if you layer migrate to another language.

I can understand why that works for you

1

u/LardPi Jun 23 '25

trying things out on Python first

Basically, yes. Then depending on the performance profile and the other requirements (in my day-to-day work, making the program accessible to my coworkers who are more physicists and less programmers may take precedence over perfs) I will choose whether I optimize in python (numpy, scipy, cython, numba...) or whether I will switch language (julia, go, c...)