this post was submitted on 28 Nov 2023
1 points (100.0% liked)

LocalLLaMA

3 readers
1 users here now

Community to discuss about Llama, the family of large language models created by Meta AI.

founded 1 year ago
MODERATORS
 

I know the typical answer is "no because all the libs are in python".. but I am kind of baffled why more porting isn't going on especially to Go given how Go like Python is stupid easy to learn and yet much faster to run. Truly not trying to start a flame war or anything. I am just a bigger fan of Go than Python and was thinking coming in to 2024 especially with all the huge money in AI now, we'd see a LOT more movement in the much faster runtime of Go while largely as easy if not easier to write/maintain code with. Not sure about Rust.. it may run a little faster than Go, but the language is much more difficult to learn/use but it has been growing in popularity so was curious if that is a potential option.

There are some Go libs I've found but the few I have seem to be 3, 4 or more years old. I was hoping there would be things like PyTorch and the likes converted to Go.

I was even curious with the power of the GPT4 or DeepSeek Coder or similar, how hard would it be to run conversions between python libraries to go and/or is anyone working on that or is it pretty impossible to do so?

you are viewing a single comment's thread
view the rest of the comments
[–] _Lee_B_@alien.top 1 points 11 months ago (3 children)

Different trade-offs. Go is not python, and Rust is not Python, nor Go.

If you want raw CPU performance or very solid, reliable, production code that's maintainable and known-good, AND/OR you want code that is native, systems-level, and can be deployed on many devices and operating systems or even without an operating system, then some of the rust-based libraries might be the way to go.

If you're purely obsessed with CPU performance, assembly is the way to go, but using assembly optimally for machine learning on a modern CPU is a whole heap of study and work in its own right.

Arguably, but very importantly, any time you spend obsessing over such high-performance code for months could be obsolete by the time you're done coding it.

If you want easy, rapid development where you can focus on what the code DOES at a high level, with very cool meta-programming rather than being down in the weeds of how to move bytes around or who owns what piece of memory, python makes a lot more sense.

Honestly, I don't see much practical reason to go with a language like Go, though. It's a half way house that is neither one nor the other.

[–] LocoMod@alien.top 1 points 11 months ago

I am not a Python hater, but Go is what Python should have been if it actually stuck to the Zen of Python.

You do know that what is arguably the most successful open-source project of the past decade that powers most of the modern internet is written in Go right?

https://github.com/kubernetes/kubernetes

load more comments (2 replies)