用 SFT 与 QLoRA 在笔记本 iGPU 上微调 Gemma 4 边缘模型生成 MATLAB 信号处理代码
Fine-Tuning Gemma 4 Edge Models for MATLAB Signal-Processing Code with SFT and QLoRA on a Laptop iGPU
66条手工示例就能把Gemma 4的MATLAB信号处理代码通过率从18/66拉到37/66,全程只用笔记本iGPU加QLoRA。论文还把159个失败案例逐个读了一遍,告诉你SFT能修什么、修不了什么,做离线小模型微调的人值得照着抄流程。
一篇 arXiv 论文对 Gemma 4 边缘模型 E2B 和 E4B 做监督微调(SFT),训练数据只有 66 条经过人工校验的示例,覆盖 11 类 MATLAB 信号处理子任务,全程在笔记本集成显卡(iGPU)上用 LoRA 和 QLoRA 完成。微调后的 8-bit int8 模型通过 OpenVINO 部署,配合适配器运行。在留出测试集的确定性检查器评分下,E2B 的通过率从 18/66 提升到 37/66(LoRA 和 QLoRA 均如此),E4B 用 QLoRA 则从 32/66 提升到 47/66。
作者逐一分析了全部 159 个失败程序,发现适配器主要消除的是约定类错误,比如滞后项的符号、单位、数组形状等 DSP 惯例问题,但对构建信号和噪声这类深层错误几乎没有改善。代价方面,适配器在推理时会拖慢生成速度 17-19%。这说明小模型在特定领域的惯例层面很容易被少量数据纠正,但真正的推理型错误仍难以用 SFT 解决。
对需要在离线环境写 DSP 代码的工程师来说,这项工作给出了一条可行的低成本路径:数据量不需要大,66 条示例就够,且硬件门槛仅为笔记本 iGPU。相比云端方案,这套流程牺牲不到两成的速度换取离线可用和约定正确率的翻倍提升。
Fine-Tuning Gemma 4 Edge Models for MATLAB Signal-Processing Code with SFT and QLoRA on a Laptop iGPU
Small language models that run on a laptop are attractive for writing signal-processing code offline, but they make systematic errors on digital signal processing (DSP) conventions. We apply supervised fine-tuning (SFT) to the Gemma 4 edge models E2B and E4B with 66 checked examples covering 11 signal-processing MATLAB subtasks, using low-rank adaptation (LoRA) and quantized LoRA (QLoRA) on the integrated GPU (iGPU) of a laptop, and deploy the 8-bit integer (int8) models with the adapters through OpenVINO. On held-out variants scored by deterministic checkers, the pass rate rises from 18/66 to 37/66 (LoRA) and 37/66 (QLoRA) for E2B and from 32/66 to 47/66 for E4B (QLoRA). Reading all 159 failing programs shows that the adapters remove most errors of convention, such as the sign of a lag, units and array shapes, but few errors in building signals and noise. Applied at run time, the adapter costs 17-19% of the generation speed.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Gemma 4, QLoRA, MATLAB, signal processing.
Source attribution: curated from arXiv cs.AI (@Mehmet Altan Toksöz).