Dev.to AI 🤖 Ai 👁 0 📖 3 min read

Sometimes the unexpected is incredible.

So lately I've been experimenting with a new system, I've been trying to reinvent the proverbial wheel of AI. LLMs are just too flaky and computationally expensive, I wanted to explore what I can do, to make it cheaper,

So lately I've been experimenting with a new system, I've been trying to reinvent the proverbial wheel of AI. LLMs are just too flaky and computationally expensive, I wanted to explore what I can do, to make it cheaper, not hallucinate and just work faster, offline.

So without going to deep into details, I started off with abstractions and rules, to try and build a translator, it kinda worked, it could take an english sentence and translate to german (tricky, cuz of how it assigns genders to words).

But I'm not a linguist, so I phased off to coding, something truly deterministic (that part's important). So I decided to go a bit outside of my norm and targeted python as my first trial. Essentially what I wanted to do, is feed it codebases and have it analyze and optimize it. So alot of tinkering later, it works... I fed it 5 codebases, it analyzes them in seconds, suggests parity functions from the other codebases that do the exact same thing, but better (a scale, still gunna make it preference adjustable, but needs way more data for that).

So what I'm currently at, isnt a LLM, it cant come up with a single thought of it's own... But what it can do, is optimize code faster than any LLM and with 100% certainty. No hallucinations (physically impossible), full auditability (it can citate the exact function that's more optimal), fully tested (verifies parity) and completely deterministic (you heard me, no matmul, no funky inference... Pure deterministic). And best part, no need to retrain it everytime you want to add to it, just add it.

Obviously all of those are pretty big claims and while the proof is there, it's at such a small scale, it cant even be trusted on it's own merit, I still need ALOT more data before I can claim anything with certainty. But it goes to show, you never know what you find down a rabbit hole... My next goal after I get python nailed down, is cross-language translation (imagine being able to convert any python codebase to rust in seconds?). Then feed it ALOT more data and then the final test... Chromium. Something about Chromium has always bugged me, I wanna crack it. 30m lines of code, hundreds of thousands of files, quite frankly, impossible for any LLM to handle, let alone effectively, or on a non google scale budget. Though I'm not getting my hopes up anytime soon... That behemoth wont be easy to even fit on my system, let alone compile. But what if.

What if it works... Chromium, the single thing guaranteed that every single person in the world makes use of, suddenly overnight 10% faster? It's a pipe dream, but we all need a challenge to get the best out of us. My first approach was the foundry (too expensive), then my IDE (too computationally heavy... and expensive). But this... No matmul, no inference, hell I dont even need a GPU for it! I dont even need a ton of ram for it either!!! It probably wont work, but hey, I'm excited to try and who knows, maybe this time it's just feasible enough to do.

So I've got some questions for all of you out there who've gone though open source codebases. Which is in your opinion, 'good'. I dont mean functionality wise, I mean when you read the code, it's like a savant wrote it, elegant, efficient, secure, durable, all the things we wish we wrote daily, but rarely achieve. Doesnt need to be massive, doesnt need to be python, it just needs to be good (atleast in your opinion). So I can feed it in and use it as training data. Currently, of the ones I analyzed, flask is the leader.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.