Fine‑tuned Gemma 4 Edge models boost MATLAB DSP code generation on laptop
Researchers fine‑tuned Gemma 4 Edge LLMs on a laptop iGPU, raising correct MATLAB signal‑processing code outputs from 18 of 66 to a much higher rate.
Source: Grafy Research LabFine‑tuned Gemma 4 Edge models now generate MATLAB signal‑processing code with markedly higher accuracy on a standard laptop iGPU. The improvement matters because it demonstrates that small, on‑device language models can handle the strict conventions of digital signal processing without relying on cloud services.
What was achieved?
According to the authors of the arXiv pre‑print, the team applied supervised fine‑tuning (SFT) to the Gemma 4 Edge variants E2B and E4B. They started from a baseline where only 18 out of 66 checked examples passed deterministic DSP checkers. After fine‑tuning with adapters, the pass rate rose substantially, surpassing the original baseline and showing that the models learned the correct MATLAB conventions for a range of signal‑processing subtasks.
How were the models fine‑tuned?
The researchers used two low‑rank adaptation techniques: standard LoRA and its quantized counterpart, QLoRA. Both methods add lightweight trainable matrices (adapters) to the frozen base model, allowing rapid adaptation with modest compute. The fine‑tuning data consisted of 66 verified MATLAB snippets covering eleven distinct signal‑processing tasks, such as filter design, Fourier transforms, and convolution operations. By keeping the core model unchanged and only updating the adapters, the team preserved the original model size while tailoring its behaviour to the DSP domain.
What hardware and software stack enabled this on a laptop?
All training and inference took place on the integrated GPU (iGPU) of a consumer laptop, avoiding the need for a discrete graphics card. The adapters were stored in 8‑bit integer (int8) format, and the final models were deployed through OpenVINO, Intel’s inference engine optimized for edge devices. This combination—iGPU compute, low‑precision adapters, and OpenVINO—allowed the researchers to complete the fine‑tuning within the limited memory and power envelope of a typical notebook.
What does this mean for developers of signal‑processing code?
For engineers and researchers who need to prototype or automate MATLAB scripts offline, the result is a practical tool that can suggest correct code snippets without internet latency or data‑privacy concerns. The study shows that even modest edge LLMs can internalise domain‑specific conventions when guided by carefully curated examples. This could accelerate development cycles in fields like audio engineering, communications, and control systems, where rapid iteration of DSP code is valuable.
How can Grafy users explore or replicate this workflow?
Grafy provides several apps that align with the steps described in the paper. Using Grafy Code, you can run Python scripts that invoke OpenVINO to load the int8‑quantized adapters and test generated MATLAB snippets against your own checkers. The Grafy Reader app lets you import the arXiv PDF, ask the model to summarise each of the eleven subtasks, and extract the example prompts used for fine‑tuning. If you want to experiment with different adapters or compare LoRA versus QLoRA, the multi‑model interface in Grafy Chat makes it easy to switch between the base Gemma models and the fine‑tuned versions side by side. While Grafy does not currently host a one‑click deployment of OpenVINO‑based models, the platform’s extensible coding environment lets you script the same pipeline on your own hardware.
Frequently asked questions
How many examples were used to fine‑tune the Gemma models?
The authors fine‑tuned the models on 66 checked MATLAB examples that spanned eleven different signal‑processing subtasks.
What adaptation techniques were compared in the study?
Both standard LoRA and quantized LoRA (QLoRA) were applied, allowing the researchers to evaluate the trade‑off between precision and memory footprint on a laptop iGPU.
Can the fine‑tuned models run without an internet connection?
Yes. After conversion to int8 and deployment with OpenVINO, the models execute entirely on the local iGPU, enabling offline code generation.
Source: https://arxiv.org/abs/2611.23205


