For background, I am a programmer, but have largely ignored everything having to do with AI (re: LLMs) for the past few years.

I just got to wondering, though. Why are these LLMs generating high level programming language code instead skipping the middle man and spitting out raw 1s and 0s for x86 to execute?

Is it that they aren’t trained on this sort of thing? Is it for the human code reviewers to be able to make their own edits on top of the AI-generated code? Are there AIs doing this that I’m just not aware of?

I just feel like there might be some level of optimization that could be made by something that understands the code and the machine at this level.

  • aubeynarf@lemmynsfw.com
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    not necessarily, just as interpreting assembly to understand intent is harder than interpreting “resultRows.map(r -> r.firstName)”, additional structure/grammar/semantics are footholds that allow the model to form patterns at a higher level of abstraction

    • TauZero@mander.xyz
      link
      fedilink
      arrow-up
      1
      ·
      20 hours ago

      Only because it’s English and the model is already trained on a large corpus of English text, so it has some idea of what a “table row” is for example. It could learn the concept from reading assembly code from scratch, it would just take longer. Hell, even Lego bricks can be trained on! https://avalovelace1.github.io/LegoGPT/

      Our system tokenizes a LEGO design into a sequence of text tokens, ordered in a raster-scan manner from bottom to top. … At inference time, LegoGPT generates LEGO designs incrementally by predicting one brick at a time given a text prompt.