arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.38739eess.AScs.ARcs.LG
收藏

微控制器上的流式语音识别:在ESP32-P4上采用2位和4位的6570万参数换能器

Streaming Speech Recognition on a Microcontroller: a 65.7M-Parameter Transducer in 2 and 4 Bits on the ESP32-P4

Faculty of Computer Science, University of Science and Technology Houari Boumediene (USTHB)(哈瓦里·布麦丁科技大学计算机学院)

Billal Boumedine

AI总结:

该研究在无神经加速器的ESP32-P4微控制器上实现6570万参数的Kroko流式语音识别模型,采用2/4位量化,在LibriSpeech等数据集上取得接近原始模型的准确率,且推理速度满足实时要求。

摘要:

我们在ESP32-P4微控制器上运行了Kroko——一个针对英语的6570万参数流式Zipformer2换能器,该微控制器配备两个400 MHz RISC-V内核、128位SIMD扩展(PIE)和32 MB PSRAM,但无神经加速器。无需额外训练,编码器的290个矩阵以每个权重2位或4位存储在Hadamard旋转组中:每个矩阵的位宽由其测量的灵敏度决定,每个矩阵先向原始模型的输出进行校正,再通过GPTQ算法结合组范数搜索进行量化。原本71 MB的int8权重文件压缩为26.65 MB。矩阵乘积间的激活值为int16,输入矩阵时为int8。采用手写PIE内核的C引擎在两个内核上处理每1.28秒的音频块耗时0.90秒,包含束搜索,其PC版本与芯片采用相同的位宽设置,因此可在完整测试集上测量准确率。LibriSpeech测试集的词错误率(WER)在test-clean上为4.34%,test-other上为10.26%,而原始发布模型的对应值为3.94%和9.17%;在FLEURS和Common Voice数据集上,差距分别扩大至2.3和1.1个百分点。GPU模拟器显示整数运算无额外开销,全部差距源于权重量化,对test-clean的消融实验表明GPTQ算法贡献了主要性能提升。我们还报告了该移植版本的速度演进历程:编码器处理每块音频的时间从51.3秒降至0.62秒,每个设计步骤均在同一构建中测量,尝试将权重压缩至16 MB但最终停留在19.63 MB,以及哪些优化未取得效果。我们未测量能耗。推理引擎、固件和2位/4位权重可在指定URL获取。

英文摘要:

We run Kroko, a 65.7M-parameter streaming Zipformer2 transducer for English, on the ESP32-P4, a microcontroller with two 400 MHz RISC-V cores, a 128-bit SIMD extension (PIE) and 32 MB of PSRAM, but no neural accelerator. Without any training, the encoder's 290 matrices are stored with 2 or 4 bits per weight in Hadamard-rotated groups: the width of each matrix comes from its measured sensitivity, and each matrix is first corrected toward the original model's output, then rounded with GPTQ and a search over the group norms. The released 71 MB of int8 weights become a 26.65 MB file. Activations are int16 between the matrix products and int8 into them. A C engine with hand-written PIE kernels processes each 1.28 s chunk of audio in 0.90 s on both cores, beam search included, and its PC build computes the same bits as the chip, so accuracy is measured on whole test sets. LibriSpeech WER is 4.34% on test-clean and 10.26% on test-other, against 3.94% and 9.17% for the released model; on FLEURS and Common Voice the gap grows to 2.3 and 1.1 points. A GPU simulator shows that the integer arithmetic costs nothing and that the whole gap comes from the weights, and an ablation on all of test-clean shows that GPTQ does most of the work. We also report the port's speed history, from 51.3 s to 0.62 s of encoder time per chunk, each design step measured again in one build, an attempt to reach 16 MB that stopped at 19.63 MB, and what did not work. We did not measure energy. The inference engine, the firmware and the 2/4-bit weights are available at https://github.com/BoumedineBillal/esp32-pie-asr.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

相关深度报道

↑