Cross-Family Speculative Decoding for Polish Language Models on AppleSilicon: An Empirical Evaluation of Bielik11B with UAG-Extended MLX-LM
Organizations: Wrocław University of Science and Technology, Poland
Abstract
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.
Figures & tables
| Model | Role | Base Arch. | Tokenizer |
|---|---|---|---|
| Bielik 11B v3 Instruct | Target | Mistral | Mistral ( 32K) |
| Bielik 1.5B v3 Instruct | Draft | Qwen2.5 | APT4 (Polish) |
| Qwen2.5 1.5B Instruct | Draft | Qwen2.5 | Qwen ( 152K) |
| Llama 3.2 1B Instruct | Draft | Llama 3.2 | Llama ( 128K) |
| Drafter | Condition | Wikipedia | pl_alpaca | Synthetic |
|---|---|---|---|---|
| Bielik-1.5B | No translation | 28.5 | 12.5 | 11.8 |
| Naive translation | 19.1 | 11.9 | 16.7 | |
| Context-aware | 31.1 | 23.9 | 22.2 | |
| Llama-3.2-1B | No translation | 26.7 | 12.1 | 10.6 |
| Naive translation | 8.9 | 4.2 | 3.1 | |
| Context-aware | 42.0 | 36.0 | 36.5 |
| Wikipedia | pl_alpaca | Synthetic | |||||
|---|---|---|---|---|---|---|---|
| Drafter | Condition | TPS | Speedup | TPS | Speedup | TPS | Speedup |
| — | Baseline | 14.83 | 1.00 | 14.70 | 1.00 | 14.72 | 1.00 |
| Bielik-1.5B | No translation | 13.72 | 0.93 | 10.80 | 0.74 | 10.68 | 0.73 |
| Naive | 10.32 | 0.70 | 9.69 | 0.66 | 9.72 | 0.66 | |
| Context-aware | 12.85 | 0.87 | 11.92 | 0.81 | 11.02 | 0.75 | |
| Llama-3.2-1B | No translation | 14.03 | 0.95 | 11.24 | 0.77 | 11.02 | 0.75 |
| Wikipedia | pl_alpaca | Synthetic | |||||
|---|---|---|---|---|---|---|---|
| Drafter | (%) | Speedup | (%) | Speedup | (%) | Speedup | |
| Bielik-1.5B | 2 | 31.1 | 0.87 | 23.9 | 0.81 | 22.2 | 0.75 |
| 4 | 38.5 | 0.59 | 29.5 | 0.51 | 29.1 | 0.46 | |
| Llama-3.2-1B | 2 | 42.0 | 1.06 | 36.0 | 0.97 | 36.5 | 0.98 |
| 4 | 49.7 | 0.66 | 43.7 | 0.59 | 44.5 | 0.61 | |
| Qwen2.5-1.5B | 2 | 44.6 | 1.06 | 41.0 | 0.98 | 42.7 | 1.00 |
| Dataset | Drafter | ||
|---|---|---|---|
| Wikipedia | Bielik-1.5B | 44.0 7.1% | 90.1 19.8% |
| Llama-3.2-1B | 38.3 5.5% | 81.2 13.3% | |
| Qwen2.5-1.5B | 40.8 5.3% | 77.7 13.1% | |
| pl_alpaca | Bielik-1.5B | 40.2 6.8% | 89.9 18.5% |
| Llama-3.2-1B | 38.1 4.8% | 82.0 14.4% | |
| Qwen2.5-1.5B | 42.2 6.4% | 81.3 14.1% |
| bucket | Bielik-1.5B | Llama-3.2-1B | Qwen2.5-1.5B |
|---|---|---|---|
| 0.78 | 0.79 | 0.73 | |
| 30–40% | 0.88 | 0.92 | 0.89 |
| 40–50% | 1.03 | 1.04 | 1.03 |
| 50–60% | 1.12 | 1.23 | 1.20 |
| 60–70% | — | 1.59 | 1.43 |
| — | — | — |
| Hardware | BW (GB/s) | ||||
|---|---|---|---|---|---|
| M2 Pro (empirical) | 200 | 40% | 77% | — | — |
| M2 Pro (formula) | 200 | 44% | 81% | 100% | 100% |
| bucket | Bielik | Llama | Qwen | Bielik | Llama | Qwen |
|---|---|---|---|---|---|---|
| 0.78 | 0.79 | 0.73 | 0.48 | 0.43 | 0.34 | |
| 30–40% | 0.88 | 0.92 | 0.89 | 0.54 | 0.50 | 0.48 |
| 40–50% | 1.03 | 1.04 | 1.03 | 0.61 | 0.57 | 0.59 |
| 50–60% | 1.12 | 1.23 | 1.20 | 0.71 | 0.67 | 0.66 |
| 60–70% | — | 1.59 | 1.43 | 0.93 | 0.82 | 0.81 |
| bucket | Bielik | Llama | Qwen | Bielik | Llama | Qwen |
|---|---|---|---|---|---|---|
| 0.74 | 0.83 | 0.80 | 0.43 | 0.46 | 0.46 | |
| 30–40% | 0.85 | 0.94 | 0.90 | 0.47 | 0.51 | 0.51 |
| 40–50% | — | 1.08 | 1.01 | 0.51 | 0.61 | 0.54 |
| 50–60% | 1.21 | 1.32 | 1.18 | — | 0.69 | 0.64 |
| 60–70% | — | — | — | 0.81 | 0.82 | 0.72 |
| bucket | Bielik | Llama | Qwen | Bielik | Llama | Qwen |
|---|---|---|---|---|---|---|
| 0.77 | 0.83 | 0.79 | 0.47 | 0.44 | 0.43 | |
| 30–40% | 0.88 | 0.93 | 0.91 | 0.51 | 0.51 | 0.45 |
| 40–50% | 1.01 | 1.04 | 1.01 | 0.57 | 0.58 | 0.51 |
| 50–60% | 1.29 | 1.34 | 1.11 | 0.73 | 0.66 | 0.59 |
| 60–70% | — | — | 1.46 | 1.10 | 0.92 | 0.81 |
| Drafter | Hit rate (%) | TPS | Speedup | Break-even |
|---|---|---|---|---|
| Bielik-1.5B | 20.6 | 3.98 | 0.28 | 100% (297%, ) |
| Llama-3.2-1B | 41.7 | 5.01 | 0.35 | 100% (147%, ) |
| Qwen2.5-1.5B | 45.0 | 5.81 | 0.40 | 100% (120%, ) |
| Baseline (no drafter) | 14.38 | 1.00 | — | |
| Hardware | Class | TDP (W) | BW (GB/s) | TPS | J/token |
|---|---|---|---|---|---|
| Apple M2 Pro (chip) | Consumer | 30 | 200 | 15 0 (meas.) | 2.0 |
| Apple M2 Pro (system) | Consumer | 40 | 200 | 15 0 (meas.) | 2.7 |
| NVIDIA L4 | Datacenter | 72 | 300 | 22 (est.) | 3.3 |
| NVIDIA A100 PCIe 40GB | Datacenter | 250 | 1555 | 110 (est.) | 2.3 |
| NVIDIA RTX 4090 | Consumer | 450 | 1008 | 80 (est.) | 5.6 |
| NVIDIA RTX 4090 (sys.) | Consumer | 600 | 1008 | 80 (est.) | 7.5 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 309 papers