view the rest of the comments
LocalLLaMA
Welcome to LocalLLaMA! Here we discuss running and developing machine learning models at home. Lets explore cutting edge open source neural network technology together.
Get support from the community! Ask questions, share prompts, discuss benchmarks, get hyped at the latest and greatest model releases! Enjoy talking about our awesome hobby.
As ambassadors of the self-hosting machine learning community, we strive to support each other and share our enthusiasm in a positive constructive way.
Rules:
Rule 1 - No harassment or personal character attacks of community members. I.E no namecalling, no generalizing entire groups of people that make up our community, no baseless personal insults.
Rule 2 - No comparing artificial intelligence/machine learning models to cryptocurrency. I.E no comparing the usefulness of models to that of NFTs, no comparing the resource usage required to train a model is anything close to maintaining a blockchain/ mining for crypto, no implying its just a fad/bubble that will leave people with nothing of value when it burst.
Rule 3 - No comparing artificial intelligence/machine learning to simple text prediction algorithms. I.E statements such as "llms are basically just simple text predictions like what your phone keyboard autocorrect uses, and they're still using the same algorithms since <over 10 years ago>.
Rule 4 - No implying that models are devoid of purpose or potential for enriching peoples lives.
Does the architect construct their home out of artisanal beams they carefully carved themselves, selected from trees they personally chose and felled?
They could, but there's degrees to everything.
In programming, it's fun and educational to reinvent the wheel sometimes but after you've been doing it for decades, sometimes you just need a beam and you don't give AF what it looks like as long as it holds up the wall.
Example: If I ever write another terminal emulator, I'm going to let the machine fill out all those escape sequence functions once I get the framework in place. It's so damned tedious! It uses zero brainpower and requires hours and hours of careful typing. For things like that, AI is a boon that frees up your time so you can focus on the fun parts.
Isn't this why we create libraries?
There's a reason why there's always a dozen different libraries/modules that all do the same thing: They specialize in different areas or fail to meet your use case.
I'll give you a great example: Everyone uses the
requestsmodule in Python for making HTTP requests. Except it has a great big problem: It doesn't support async/await....but what if you have a lot of code that works with requests that you need to get working with your new async backend (let's say it uses aiohttp)? You can refactor everything or you could write a little wrapper around aiohttp's web client so that it uses the same API (well, similar) and make it work just like requests.
Is that "reinventing the wheel"? Sort of? Doesn't matter, since the "one true, popular library" didn't meet your use case.
Having said all that to make my point, I'd also like to point out that AI would make short work of that refactor, haha. And in fact, it did: We had a relatively large script (that should've been a microservice, sigh; I didn't write it!) that used requests. It was causing unnecessary delays in our app because the back end it was hitting would occasionally get slow AF. Since that script isn't async, that meant our whole app process would get stuck until that back end responded.
There's a lot of ways to work around that by making async wrappers around imported stuff, or we could've turned it into an external call or any number of solutions. All those things would require messing with our own internal code and how it works though! It's been running great for a long ass time now and there's a lot of bureaucratic bullshit that is necessary if we wanted to change it (because it wouldn't be a "fix" but an "improvement", sigh).
So instead I pointed AI at the troublesome script and told it to refactor it to use aiohttp's web client instead of requests. BAM! About five minutes later it had passed all our tests and it hasn't slowed anything down since.
That sort of thing is exactly the kind of work AI is good at. Also, I don't really care about that old script—the backend it calls is going away in about a year anyway. It's literally "throw away code" that only needs to work OK-ish for about a year.
...but if you think about it—I mean really think about it—almost all the code we write these days is like that: Throwaway. Everything is always in a constant state of change and replacement. It's a rare system that acts as permanent infrastructure and just stays the same for a long time.
This touches on something important: programmers seriously overestimate the value of their own code. This was true long before AI.
I've been in the industry the better part of 40 years, and been through many mergers and acquisitions of tech companies (hell, I lived through the dotcom boom and bust for a start); I can count on the fingers of one foot the number of times the code that arrived as part of an acquisition had any value - nine times out of ten, it's easier to just ditch it and rewrite than integrate someone else's code; what you are buying in those deals isn't the code, it's the domain knowledge of what it should do and how that you are acquiring (which is why looking after the key people who understand the domain/business is the no.1 goal to make tech acquisitions successful.)
All AI is going now is making everyone realise what was already true - code isn't an asset, it's a liability. Design, architecture, translation of needs/business rules into an overall solution that meets them - they are an asset. The actual code is a dead weight and if you are ever afraid of rewriting it, it's just technical debt that you're hiding behind a wall of copium. So who cares if the output of an LLM is ugly or unmaintainable? All code is ugly and unmaintainable, and you should have been treating it that way anyway.
You're damned right! Every company treats their code like it's a precious trade secret when in reality it is just what the intern got working four years ago in a few, confused days.
There's been many leaks of internal code over the years. What have we learned from that? It's useless for any purpose outside the organization. It could be a way for an attacker to find a vulnerability, but what it really reveals is that not a line of it is worth anything at all to competitors. Hence, it's not precious and not really a trade secret.