arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.16368cs.CL
收藏

跨家族推测解码用于波兰语言模型在苹果Silicon:对Bielik~11B与扩展MLX-LM的实证评估

Cross-Family Speculative Decoding for Polish Language Models on Apple~Silicon: An Empirical Evaluation of Bielik~11B with UAG-Extended MLX-LM

Wrocław University of Science and Technology(沃拉夫大学科学与技术学院)

Krzysztof Fonal

AI总结:

本文评估了在苹果Silicon上使用扩展MLX-LM框架实现跨 tokenizer 推测解码的有效性,探讨了波兰语言模型的性能差异及统一内存架构下的实证结果。

摘要:

推测解码通过使用小型草案模型提出k个候选token供目标模型验证,以加速LLM推理。尽管在高带宽GPU上对同tokenizer配对有效,但其在跨家族配对、tokenizer不匹配和消费级统一内存中的适用性仍不明确。我们扩展MLX-LM框架,加入通用辅助生成(UAG),以在苹果Silicon上实现跨tokenizer推测解码。我们评估Bielik 11B-Instruct(基于Mistral)作为目标模型,搭配三个草案模型:Bielik 1.5B(基于Qwen的定制tokenizer)、Qwen2.5-1.5B和Llama 3.2-1B。在三个波兰语言数据集(Wikipedia、pl_alpaca、合成)上进行实验,使用k={2,4,6}的草案长度比较朴素和上下文感知的token翻译。结果表明:(1)上下文感知翻译在所有配置中均提高接受率;(2)波兰专用的Bielik 1.5B接受率低于通用的Qwen2.5和Llama 3.2草案;(3)在苹果Silicon上的吞吐量依赖内容,结构化文本达到1.7倍加速,但变指令失败;(4)统一内存验证成本不抵消,因为两个模型均为内存带宽受限,使顺序草案比批量验证更昂贵。我们提出一个硬件感知的加速公式,并表征苹果Silicon上跨家族推测解码的条件。这是首次系统评估波兰LLM的跨家族推测解码,也是首次对基于UAG的解码在统一内存架构上的实证研究。

英文摘要:

Speculative decoding accelerates LLM inference by using a small draft model to propose k candidate tokens for a target model to verify. While effective for same-tokenizer pairs on high-bandwidth GPUs, its applicability to cross-family pairs with mismatched tokenizers and consumer-grade unified memory remains underexplored. We extend the MLX-LM framework with Universal Assisted Generation (UAG) to enable cross-tokenizer speculative decoding on Apple Silicon. We evaluate Bielik 11B-Instruct (Mistral-based) as the target model, paired with three draft models: Bielik 1.5B (Qwen-based with custom tokenizer), Qwen2.5-1.5B, and Llama 3.2-1B. Experiments on three Polish-language datasets (Wikipedia, pl_alpaca, synthetic) use draft lengths k in {2, 4, 6} to compare naive and context-aware token translation. Results show: (1) context-aware translation consistently improves acceptance rates across all configurations; (2) the Polish-specialized Bielik 1.5B achieves lower acceptance than general-purpose Qwen2.5 and Llama 3.2 drafters; (3) throughput on Apple Silicon is content-dependent, reaching 1.7x speedup for structured text but failing for varied instructions; and (4) verification cost on unified memory does not amortize as theory predicts because both models are memory-bandwidth bound, making sequential drafting expensive relative to batched verification. We propose a hardware-aware speedup formula and characterize conditions for cross-family speculative decoding on Apple Silicon. This is the first systematic evaluation of cross-family speculative decoding for Polish LLMs and the first empirical study of UAG-based decoding on unified memory architectures.

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

↑