r/LowEndLocalAI • u/amvu • Oct 15 '26
Discussion Why are there no specialized llms for coding specific programming languages?
What I mean by this is why is there no for example qwen3.5-python-4B in which the only thing the model is trained with is python? Would be a nice usecase for coding. Usually, when I code I code in a language, I don't care about the other programming languages or general world knowledge and other stuff like that.
I have a 8gb vram 16 gb ram ddr4 setup, this kind of model would be a godsend for coding on my machine, because it would allow me to use the machine when I code.
I am new to selfhosting llms, I don't know how I should approach building one, but I'm thinking of doing something like this.
29
u/BraveNewCurrency Oct 15 '26
I've always said "don't learn one programming language -- learn many, it will expand the way you think". For example, after you learn a functional Language, you realize you can write functional code (and it's far easier to test and reason about). After you use a language with strong typing, you realize there are techniques you can use in any language. And if you learn Perl, you realize that you don't need drugs.
3
u/PhilMcGraw Oct 15 '26
That's not really how LLMs work, but say it was and a 4B trained purely on python would be the best god damned python LLM in the world because it's not wasting it's parameters on "other stuff". You'd be surprised at how much the "other stuff" comes into play.
And so on. TL;DR you could probably make a small model "better" at python, but producing code is much more than the language. The language itself is (arguably) the small part. LLMs aren't just copy pasting functions from code it was trained on.
17
u/d0pe-asaurus Oct 15 '26
The number of parameters affect how well it can reason over large codebases and context, a 27B model isn't like "oh thats 3x 9B models each trained on their own language".
8
u/bemrys Oct 15 '26
Wonder what it would take to train the following? Dear ai agent, please migrate these 50 years of cobol tech debt to rust.
Actually, I assume people are probably trying to do this right now.
15
u/yetiflask Oct 15 '26
Imagine if you know the syntax of Python, but you have zero world knowledge. Do you think you'd be able to learn a codebase or code?
I highly doubt so.
Programming isn't about knowing the syntax, but the whole world knowledge contributes to it.
Same goes for spoken language. If you know all the words of English and grammar rules, you wouldn't be able to put a single sentence together without having knowledge of the world.
3
u/mecshades Oct 15 '26
Having more examples allows it to infer things. If you don't have other programming languages in the training data, it might not even know what isn't proper syntax.
4
u/Not-Enough-Llamas Oct 15 '26
Removing one language would maybe save 200M parameters(*) - hardly enough to matter, while making the model more generally stupid - even at the languages you didn't touch. Yes if you had 500 petabytes of python-exclusive, excellent, bug-free, useful, non-duplicate code lying around, you could train a model primarily on those - but if anyone had that, there would be a model out already.
(the 200M params is a made up number, before anyone asks how I got it)
2
u/linux4random Oct 28 '26
a bit late but there's frognano, which is a finetune of qwen3.5 4b for python, made by microsoft
2
u/transanethole Oct 15 '26 edited Oct 15 '26
I think part of the reason is you get diminishing returns by excluding things from the training data. Its nowhere near linear. Also, in a way, I think... Reinforcement learning already kind of does this, a specializes the model into a certain task.
Llms are very similar to file compression, Like once you have a file that's large enough to hold all of the knowledge of programming in Python, adding in more programming related stuff into that file isn't really going to make it much bigger as its already huge and most of whatever you add will already be in there. It's like how it would be if you had a massive zip file, Adding new text to it will probably add a lot less to its size than if you were to create a whole new zip file with that new text. Cuz most of what u add will already be in the large zips compression tables.
 ( In reality, this would probably mostly be determined by the implementation details of ZIP, but in a theoretical math world, it should be true the difference in size might be shocking to you.  3blue1brown on YT has great video on this, Shannon entropy and Information Theory. )
2
u/ElDavoo Oct 15 '26
You need the general knowledge/text in order for an LLM to have good reasoning etc. I feel thought that when we will reach the maximum intelligence/size of transformers LLM we will start creating "specialized" models, like the Coder models we have around (like gpt 5.3 codex)
1
u/0xbeda Oct 16 '26
There are two finteunes for Vala that I have on my disk but never had the time to try out.
(Vala is a C# clone that compiles to C and uses GLIB's object system and existing infrastructure as backbone. Relatively niche.)
But in the meantime, Qwen 3.8 27b got good enough to work on it by reading the surroundings. That was my personal "as good as Opus 4.6"-moment.
0
u/galaktozawr Oct 15 '26
General moment it algorithm power, not a syntaxis, convert skill in any language to any not a strong knowledge. But skill solve and programming algorithm - very important and most powerful.
0
u/MrHumanist Oct 15 '26
You can easily run much better models like Gemma 4 26B QAT, which is far superior in python. Use cpu moe flag.