(Local) AI, Please Reason about Code

“Reasoning” models have become popular as a way to expand the capabilities of large language models (LLMs). Such models take more time “considering” a prompt and iterating it through the model several times, with the goal of mimicking how a human might go about solving a problem by breaking it down into steps. I tried the reasoning QwQ model on the coding problems from my previous blog posts (1,2). Quite funny and elucidating; I will quote the replies in full as they are worth reading.

Continue reading “(Local) AI, Please Reason about Code”

(Local) AI, Please Write some Code

My previous blog post in this series tested the ability of a range of large language models to analyze a piece of C code and determine what a mystery function did. That was interesting and entertaining, but possibly not a particularly “fair” test of the models’ capabilities. Most of time, I think people use “AI” to help write code, not to understand some tricky piece of algorithmic code. Thus, I turn the problem around and ask the models to write code for the algorithm I previously asked them to analyze.

Continue reading “(Local) AI, Please Write some Code”

(Local) AI, Please Explain This Code

Continuing my exploration of what a local AI model can do, I decided to test them on the task of code analysis. It would be so nice to have an AI model that is tuned and trained on a particular tool or programming system, and that can be distributed for users to run on their own on their local machine, server, or cloud VM. Avoiding the need to run and charge for a custom cloud service and ensuring confidentiality and availability.

Updated 2024-12-12 with Llama-3.3-70B

Continue reading “(Local) AI, Please Explain This Code”

Getting the Least of our your C Compiler – The Best Article I have ever written?

Back in 2001, while a PhD student at Uppsala University and IAR Systems, I wrote what has to be the most popular and long-lived article I ever did: “Getting the Least out of Your C Compiler“. It was an Embedded Systems Conference class that I also presented in 2002 (after that, I changed jobs to Virtutech and therefore C programming was no longer my official topic). However, the text has lived on. It was featured as a chapter in  the “Firmware Handbook” edited by Jack Ganssle, translated into German by IAR Germany, and has popped up in various places from time to time.

Last week, it resurfaced at Embedded.com, with an attribution that was initially wrong.

Continue reading “Getting the Least of our your C Compiler – The Best Article I have ever written?”