← Back to context

Comment by Zenst

13 hours ago

Whilst these coding models improve, they seem to cater for multiple languages, and for many, a trimmed-down LLM that supports just one language would be fantastic. This would be smaller, more able to run on the hardware people have at home, realistically (even on the CPU). Having one LLM that knows assembler, java, bain, C etc is neat, but when you only work and use one language at a time, it would be kinda neat to have those broken out into dedicated, smaller LLMs. After all Qwen3.8-Max handles over 90 programming languages - ask any programmer to name a list of computer languages and if they get over 20, they are doing well.

I believe the knowledge of multiple languages brings something onto the table that having narrow language knowledge does not. The LLM will be able to better generalize a problem, apply universal concepts and avoid mistakes that would otherwise be too "echo chambery". Even as a human, knowing multiple languages has made me better at my primary language.

That's not how LLMs work. If you're talking about number of parameters, you wouldn't be able to reduce the size much by "removing" support for other languages.

  • Yeah, I'd assume it's possible to extract all languages as steering vectors from a model and then substract the ones you don't need from its weights.

    However, that would just change the weights values and not their dimensions.

  • Can you please explain why?

    • Only a tiny, tiny fraction of the parameters are encoding information that's specific to a particular programming language. Even if you could remove those without degrading performance, it would have a negligible effect on the model size.

    • Not who you responded to, but I’ll give it a try.

      Imagine our LLM as this one-dimensional matrix (instead of unfathomably many, many more dimensions):

      0.728201017

      -1.9293839303

      2.93020202929

      5.82290101728

      -0.2844920917

      And then, all of these values are multiplied by some scaling factor, essentially vectors pointing in some direction (in our case, only on a one-dimensional line instead of in some higher-dimensional space).

      Now imagine it’s possible to “remove” the portion of the weights’ directions that’s responsible for some undesired property like history knowledge, or another programming language:

      0.428201017

      -1.6293839303

      2.63020202929

      5.52290101728

      -0.5844920917

      (For demonstration and faster-to-type-out purposes, I’ve changed each vector by deducting a constant amount of 0.3, which doesn’t make much sense. In reality, it’d modify probably all digits in some direction.)

      Now we can see: the number of rows has stayed the same, but the value has changed. This means the required storage (or computational) space remains the same.

      Please do correct me if this simplified too much or I had a mistake in my understanding.

      3 replies →

    • For a set parameter size, if you benchmark an LLM on a single language, you'd get better results by training it on multiple languages rather than just the one. Scaling quality training data almost always increases performance as the neural network picks up general rules and an understanding of code that are language agnostic.

I think you'd want to remove e.g. knowledge of harry potter universe and ancient egypt. Training on a bunch of high quality java code bases is still likely to improve your python model.

  • Actually, it's shown that even general knowledge helps coding models because their input is natural language itself so they need to understand it well enough to even turn into code.

Teaching model to code in say python does indeed increase its effectiveness in other seemingly unrelated areas. On the other hand I remember that early models of ChatGPT were great in chess notation and later models aren’t as good as OpenAI doesn’t prioritize this now