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?

  • Dry-Vermicelli-682@alien.topOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    That’s an interesting response. I responded elsewhere that I am just missing how all this comes together. I assumed the runtime (e.g. python glue in this case) handles the NLP query you type in, turns it in to some meaningful structure that is then applied to the model to find responses. I am unclear if the model is the binary code/logic/brain of the AI… or is it just a ton of data in a compressed format that the model runner uses to find stuff? I assume the former, since python is glue code apparently.

    But also… the training stuff… I am unclear if that is gobs and gobs of python code… if so, converted to Go or Rust… wouldn’t it train MUCH faster given the exponential runtime increase of something like Go or Rust? Or does that ALSO not matter since most of the training is done on GPUs/ASICs and again python is just glue code using those GPU/Asic libraries (which are likely in C/C++)? E.g. TensorFlow and the likes by nvidia I assume is used for training.

    But the code that actually does training… that is what I am really trying to understand. Code somehow results in an AI that can “think” (though not AGI or sentient… but seems like it can think) like a human… and respond with often much better details and data than any human. ALL of the data it is trained on… is basically rows and rows of structures that are like key/values (or something like that) I assume, and somehow that results in a single file (gguf or whatever format it is) that a very little bit of python code can then execute…

    I am just baffled how all the different parts work… and the code behind those. I always assumed python was used in the early days due to “ease to learn” and that somehow the slow runtime speed nobody gave a shit about because back then it was just starting, but now that its big, its too late to “rewrite” in Go or Rust or what not. But it sounds like a lot of the training stuff uses native nvidia/asic/etc binary libraries (likely done in c/c++) and that the majority of the python code doesn’t need speed of Go/Rust/C to run. it is again glue code that just uses the underlying c/c++ libraries provided by the hardware that is used for training?