CPU-Based Systems
Low-Bit Quantization and Memory-Efficient Neural Text-to-Speech for CPU-Based Systems
1Department of Information Technology, Siddhant College of Engineering, Pune, Maharashtra, India
2Professor, Department of Information Technology, Siddhant College of Engineering, Pune, Maharashtra, India
Published December 2026
Abstract
Non-autoregressive neural text-to-speech models are now small enough to run offline, but their acoustic models are still sized for GPUs. A model with 30 to 90 million weights occupies 120 to 360 MB in FP32, far beyond the last-level cache of a laptop or a single-board computer. Ternary quantization changes the arithmetic: with weights restricted to −1, 0, and +1, a matrix–vector product becomes a sequence of masked additions, and five weights fit into one byte. BitTTS recently combined this idea with weight indexing and reported an 83% reduction in end-to-end model size. This paper asks a narrower question. Once the recipe is ported to ordinary CPUs, how much of the speedup comes from cheaper arithmetic, and how much comes from keeping the weights in cache? We describe an independent implementation with module-wise distillation from a 16-layer Conformer teacher, a six-block depthwise-separable student, and multiplier-free AVX2 and NEON kernels. The acoustic model falls from 48.2 MB to 8.9 MB, an 81.5% reduction. On one core of an Intel i7-11700K it reaches a real-time factor (RTF) of 0.07; on a Raspberry Pi 4 it reaches 0.18, 6.9 times faster than the FP32 teacher. Mean opinion score (MOS) is 4.02 against 4.18 for the teacher. Hardware counters explain the x86 result: last-level cache misses drop by 99.5% and off-chip traffic by 96%. The Pi has only 1 MB of L2, so its gain comes from reduced traffic rather than full residency. Ablations separate the contributions of packing, hidden-feature distillation, and quantization-aware training. Packing changes size and speed; training changes quality. We close with deployment guidance for low-bit speech synthesis on client hardware.
Keywords: Acoustic modeling; cache-aware inference; CPU inference; energy efficiency; knowledge distillation; low-bit quantization; neural text-to-speech; SIMD vectorization; ternary weights; weight indexing
Non-autoregressive neural text-to-speech models are now small enough to run offline, but their acoustic models are still sized for GPUs. A model with 30 to 90 million weights occupies 120 to 360 MB in FP32, far beyond the last-level cache of a laptop or a single-board computer. Ternary quantization changes the arithmetic: with weights restricted to −1, 0, and +1, a matrix–vector product becomes a sequence of masked additions, and five weights fit into one byte. BitTTS recently combined this idea with weight indexing and reported an 83% reduction in end-to-end model size. This paper asks a narrower question. Once the recipe is ported to ordinary CPUs, how much of the speedup comes from cheaper arithmetic, and how much comes from keeping the weights in cache? We describe an independent implementation with module-wise distillation from a 16-layer Conformer teacher, a six-block depthwise-separable student, and multiplier-free AVX2 and NEON kernels. The acoustic model falls from 48.2 MB to 8.9 MB, an 81.5% reduction. On one core of an Intel i7-11700K it reaches a real-time factor (RTF) of 0.07; on a Raspberry Pi 4 it reaches 0.18, 6.9 times faster than the FP32 teacher. Mean opinion score (MOS) is 4.02 against 4.18 for the teacher. Hardware counters explain the x86 result: last-level cache misses drop by 99.5% and off-chip traffic by 96%. The Pi has only 1 MB of L2, so its gain comes from reduced traffic rather than full residency. Ablations separate the contributions of packing, hidden-feature distillation, and quantization-aware training. Packing changes size and speed; training changes quality. We close with deployment guidance for low-bit speech synthesis on client hardware.
1Introduction
Speech output has quietly become part of interfaces that cannot rely on a network. A car navigator, a screen reader, a language tutor on a cheap laptop, and a talking instrument all need to produce audio within a few hundred milliseconds, often with no connection at all. Non-autoregressive neural TTS made this practical. FastSpeech 2 and its descendants predict an entire mel spectrogram in one pass, so latency depends on the length of the input rather than on a decoding loop [1]. The obstacle that remains is memory.
An acoustic model of 30 to 90 million weights occupies 120 to 360 MB in FP32. Desktop processors carry 8 to 32 MB of L3, and embedded boards often have 1 to 2 MB of L2. At batch size one, a weight is fetched and used for a single multiply–add per frame, which makes the kernel memory-bound rather than compute-bound. Moving a parameter from DRAM also costs far more energy than the arithmetic it enables [16]. A smaller model therefore saves storage, time, and battery at the same time.
INT8 quantization is the standard first response. It reduces traffic by 4×, but the inner loop still needs integer multipliers, and on small cores it also needs widening and saturation instructions. Four-bit formats cut traffic further, yet nibble unpacking adds shifts and masks that consume much of the gain. The returns diminish quickly once arithmetic is no longer the bottleneck.
Ternary weights offer a cleaner trade. BitNet b1.58 showed that language models with weights restricted to {−1, 0, +1} can remain competitive [2]. With three weight values, a dot product becomes a sequence of additions and subtractions: add the inputs whose weight is +1, subtract those whose weight is −1, and skip the zeros. BitTTS applied the idea to speech synthesis and added weight indexing, a storage scheme that packs five ternary weights into one byte. It reported an 83% reduction in end-to-end model size while keeping naturalness close to a 4-bit baseline [3].
The result is encouraging, but it leaves an engineering question unanswered. A ternary model is smaller, and it also executes a different instruction mix. On a CPU those effects are entangled. Does the speedup come from replacing multiplies with adds, or from the model fitting into cache? Does the balance change on ARM, where the cache hierarchy is much smaller? Which part of the training recipe protects quality: the quantizer, the distillation loss, or the packing format? Without answers, it is hard to predict whether the method will transfer to another device, language, or model size.
We built an independent CPU implementation of the BitTTS recipe and measured it on two machines: a desktop x86 processor and a Raspberry Pi 4. The implementation uses module-wise distillation from a 16-layer Conformer, a six-block depthwise-separable student, radix-3 packing, and multiplier-free AVX2 and NEON kernels. Our goal is not to propose a new quantization scheme. It is to separate the arithmetic from the memory effects, and to identify which training choices carry the quality.
On our testbed the acoustic model falls from 48.2 MB to 8.9 MB, an 81.5% reduction. Single-thread RTF is 0.07 on an Intel i7-11700K and 0.18 on a Raspberry Pi 4, against 0.28 and 1.24 for the FP32 teacher. MOS is 4.02, compared with 4.18 for the teacher and 4.22 for FastSpeech 2. Counters show that the x86 gain coincides with a 99.5% drop in last-level cache misses, while the Pi, which cannot hold the model in L2, gains mainly from a 5.4× reduction in bytes fetched. In the ablation, post-training quantization alone costs 0.61 MOS, removing the hidden-feature loss costs 0.18, and changing the packing format changes size and speed but not quality.
The contributions are as follows.
- An implementation of radix-3 packing with an arithmetic decoder that avoids a 243-entry lookup table, together with AVX2 and NEON kernels that perform the inner product without floating-point multiplies.
- A module-wise distillation setup for a six-block depthwise-separable student, with layer adapters, and an ablation that isolates hidden-feature matching and QAT.
- A cache and energy study on two physical CPUs, including board-level power and thermal behavior, which shows why the same model gains 4.0× on x86 and 6.9× on ARM.
- Deployment rules that say which layers to quantize, which to leave in FP32, how to pack, and when unpacking overhead cancels the benefit.
Section II reviews compact TTS, quantization, and cache-aware inference. Section III describes the quantizer, the packing format, and the kernels. Section IV covers distillation and QAT. Sections V to VII report the setup, results, and hardware profiling. Section VIII discusses when the approach is worth using, and Section IX concludes.
2Background and related work
2.1Compact acoustic models
FastSpeech 2 is a useful reference point because its cost is easy to account for. The model pairs transformer blocks [10] with duration, pitch, and energy predictors, and most of its weights sit in the feed-forward and attention projections [1]. LightSpeech replaced attention with depthwise separable convolutions found by neural architecture search, which cuts both parameters and arithmetic [4]. Nix-TTS distilled VITS module by module and arrived at a 5.23-million-parameter student, an 89.34% reduction, with reported speedups of 3.04× on an Intel i7 and 8.36× on a Raspberry Pi 3B [5]. Henriksson et al. distilled classifier-free guidance into a student that predicts the guided distribution directly, which removes a second forward pass at synthesis time [6]. SpeedySpeech showed that a convolutional student can be trained without matching the teacher's full output distribution [7], and JETS trains an acoustic model together with HiFi-GAN [9], which shortens the pipeline but puts the vocoder inside the training loop [8].
These architectures reduce the number of weights. Quantization reduces the number of bits per weight. The two are complementary, and the student in this paper uses both: depthwise separable blocks from the LightSpeech family, and ternary projections.
2.2Quantization for speech
Quantization research in speech has concentrated on recognition, where INT8, 4-bit, and even 2-bit Conformer models are well studied [11], [12], [13]. Synthesis is less forgiving. A vocoder works close to the waveform, so small errors become audible artifacts. BitTTS found that quantizing the vocoder cost more quality than quantizing the acoustic model, and that leaving the vocoder in FP32 retained most of the size benefit [3]. That finding shapes the scope of our experiments.
At the extreme end, BitNet b1.58 constrains weights to ternary values and scales them by a single factor per tensor [2]. The information content is log2(3) ≈ 1.585 bits per weight. Storing each ternary value as INT8 would waste five bits, which is why BitTTS introduced weight indexing: five ternary weights form a base-3 number below 243, and that number fits in a byte [3]. Our packing follows the same principle. The decoder and the CPU kernels are different, and they are the part we evaluate most closely.
Quantization surveys separate post-training quantization (PTQ), which rounds a fixed network, from quantization-aware training (QAT), which lets the weights adapt to the grid [14], [15]. Section VI shows that this distinction matters more than any other choice in the pipeline.
2.3Cache-aware inference
The roofline model expresses attainable performance as the smaller of peak compute and bandwidth times arithmetic intensity [16]. Batch-one TTS has low intensity: a weight is fetched and used for one multiply–add per frame. Raising the batch improves reuse, but interactive synthesis runs at batch one, one utterance at a time. Under those conditions the durable fixes are to reduce bytes per weight or to keep the weights on chip.
Packing matters because CPUs move data in cache lines, not bits. A format that stores four 2-bit weights per byte uses 25% more bytes than the information content requires. At the scale of our model that difference is 2.3 MB, enough to push an artifact out of an 8 MB L3. Byte-aligned radix-3 packing avoids the waste and lets one 64-bit load deliver 40 weights.
2.4Positioning
Ternary TTS with weight indexing was introduced by BitTTS [3], and we do not claim it as new. What the literature lacks is an independent, hardware-level evaluation on x86 and ARM CPUs, with cache counters and board power, plus an ablation that separates the training components. That is the gap this paper fills. Our decoder also differs from the table-based scheme in the original work: it uses integer arithmetic instead of a 243-entry table, which matters on cores where the table would compete with activations for L1.
3Ternary quantization and packing
3.1System overview
The acoustic model maps a phoneme sequence to an 80-bin log-mel spectrogram. It starts with an embedding table and continues through six blocks. Each block contains self-attention and a depthwise separable convolution; the convolution supplies local context that a pure transformer would learn more slowly. A variance adaptor predicts duration, pitch, and energy, and a mel decoder projects the hidden state to 80 bins. LayerNorm [18], softmax, embeddings, the depthwise taps, and the final projection stay in FP32. The query, key, value, and output projections, together with the pointwise convolutions in each block, are ternary. Those layers hold most of the weights.
The split is deliberate. LayerNorm and softmax are cheap in parameters but sensitive to quantization, and the depthwise taps are so few that a per-channel scale would cost more than the weights it describes. Quantizing the large projections captures almost all of the storage benefit while leaving the numerically fragile operations alone.
Note: (a) The six-block acoustic pipeline; ternary projections are marked. (b) Module-wise distillation from a frozen 16-layer teacher with a straight-through estimator. (c) Radix-3 packing and the multiplier-free inner product used on AVX2 and NEON.
3.2Weight quantization
Let W be an m × n weight matrix. We compute a scale from the mean absolute value,
β = (1 / mn) ∑i,j |Wij| (1)
and quantize each entry to a ternary value:
Wt = Clip(Round(W / (β + ε)), −1, 1). (2)
The reconstruction is W ≈ βWt. The scale is the mean absolute value, not the maximum, and the choice has a simple justification. Trained weights are concentrated near zero with a small tail; a max-based scale would make most of them round to zero. The mean absolute value sets the step so that a typical weight lands near ±1, while the tail is clipped.
For a weight with |W| ≤ β, the rounding error is at most β/2. Weights beyond β carry a clipping error that grows with |W|. The tail is small, but it is the reason a ternary network trained from scratch struggles: the quantizer removes precisely the large weights that carry strong evidence. Distillation gives the student a chance to redistribute that evidence across many small weights.
One scale per tensor keeps the inner loop simple and the metadata negligible. Per-channel scales would improve fidelity, but they add a multiply per output channel and a scale fetch per row. We use them only where the channel count is small and the accuracy benefit is measurable, which in practice means nowhere in the ternary layers.
3.3Activation quantization
Activations are quantized symmetrically to INT8. For a tensor x, the scale is γx = max|x| and
xq = Clip(Round(127x / γx), −127, 127). (3)
Here xq is the quantized activation tensor. The layer output is
y = (βγx / 127) ∑k wt,k xq,k. (4)
Only the final scale is floating point. The accumulation is integer, and the multiply by βγx/127 happens once per output element rather than once per term.
Overflow is the practical constraint. With |xq| ≤ 127 and K terms, the worst-case sum is 127K. For K = 256 this is 32,512, which fits in INT16. Wider layers are split into chunks of 256 and accumulated in INT32. Chunking is cheaper than widening every term, and it keeps the hot loop in 16-bit lanes, where AVX2 and NEON both have twice the throughput of 32-bit lanes.
3.4Radix-3 packing
Each ternary weight maps to a digit d in {0, 1, 2}: −1 becomes 2, 0 stays 0, and +1 becomes 1. Five digits form an index
I = d0 + 3d1 + 9d2 + 27d3 + 81d4 (5)
Since 35 = 243 < 256, the index fits in one byte. The mapping is a bijection between the 243 valid patterns and a subset of byte values. The other 13 codes are unused, so 94.9% of byte values are valid. In information terms the byte carries 7.92 of its 8 bits, or 99.1%. The distinction between code utilization and bit utilization is easy to blur; both numbers appear in the tables for that reason.
Packing runs along the reduction dimension, so the five weights in an index are consumed by the same output row. The last block of a row is padded with zeros when its length is not a multiple of five, and the kernel stops at the true length. We store one FP32 scale per tensor, so scale overhead stays below 0.1% even for the smallest ternary layer.
Table I compares the format with the obvious alternatives. A 2-bit format stores four weights per byte and wastes 20.7% of the bit budget. INT8 stores one weight per byte and wastes 80%. The difference is not academic. At the scale of our model, 2-bit packing produces an 11.2 MB artifact, which no longer fits in an 8 MB L3; radix-3 keeps it at 8.9 MB, inside the 16 MB L3 of the test machine and inside the 8 MB L3 of older laptops.
| Format | Bits per weight | Bytes per 106 weights | Relative size |
|---|---|---|---|
| Ternary, radix-3 | 1.585 | 198 kB | 1.00 |
| 2-bit slots | 2.000 | 250 kB | 1.26 |
| INT8 | 8.000 | 1000 kB | 5.05 |
| FP32 | 32.000 | 4000 kB | 20.2 |
Note: Payload only; scales and metadata are excluded.
3.5Decoding without a lookup table
A 243-entry table of five-byte patterns would occupy about 1.2 kB. That fits in L1, but a lookup per index adds a load with unpredictable latency, and on ARM it competes with the activation stream for load slots. We decode arithmetically instead. For n < 256, the quotient q = (171n) >> 9 equals floor(n/3), and the remainder is r = n − 3q. Repeating this five times recovers the digits. The multiply is 16-bit, and the shift and subtract are cheap: roughly one multiply and two integer operations per five weights, or 0.6 operations per weight.
This is also where a naive SIMD formulation breaks. The byte shuffle instruction can only index 16 bytes; it cannot decode a base-3 index directly. One can split the index into nibbles and use several shuffles, but the bookkeeping costs more than the arithmetic decoder. We decode in 16-bit lanes instead: 16 indices per AVX2 register, five rounds of multiply–shift–subtract, and five masks per round. The masks select activations, which are added or subtracted into 16-bit accumulators.
Algorithm 1: Radix-3 inner product (AVX2)
Input: packed bytes B, int8 activations X, length K, scale s Output: int32 dot product Y 1: acc_pos = 0; acc_neg = 0 2: for each 32-byte group of B do 3: load 32 indices into 16-bit lanes 4: for d = 0 to 4 do 5: q = (171 * n) >> 9 // floor(n / 3) 6: r = n - 3*q 7: acc_pos += X & (r == 1) 8: acc_neg += X & (r == 2) 9: n = q 10: end for 11: widen acc_pos, acc_neg every 128 terms 12: end for 13: Y = s * (sum(acc_pos) - sum(acc_neg)) 14: return Y
3.6The inner product
Algorithm 1 shows the loop. Its important property is that no multiply appears in the accumulation. For each group of five weights, the decoder produces a mask for +1 and a mask for −1. The corresponding activations are ANDed with the masks and added to two accumulators. At the end the negative sum is subtracted from the positive sum and scaled once. On AVX2 the lanes are 16-bit; on NEON the same structure uses vector AND, add, and subtract. NEON has no 256-bit registers, so the loop processes eight indices at a time, but the arithmetic is identical.
The loop is also friendly to the memory system: eight bytes of packed weights feed 40 additions, or about five operations per byte. That intensity is high enough that the kernel stops being purely bandwidth-bound once the weights reach L2. The FP32 case is the opposite, with one multiply–add per four bytes fetched.
3.7Convolutions and attention
Pointwise 1×1 convolutions are matrix products in disguise and use the same kernel. Depthwise three-tap convolutions are different. Each channel has three weights, so unpacking five weights per index would waste most of the byte. The taps stay in FP32; they account for a small fraction of parameters and an even smaller fraction of multiply–adds.
Self-attention is mixed. The four projections are ternary, but the score matrix and softmax stay in FP32. Scores involve a reduction over the head dimension and are sensitive to quantization; keeping them in FP32 costs little because the projections dominate the parameter count. A fully integer attention block would be harder to stabilize and would not reduce the model size further, since the scores are activations, not weights.
4Distillation and QAT
4.1Teacher and student
The teacher is a 16-layer Conformer with FP32 weights and a 48.2 MB checkpoint. The student has six blocks, depthwise separable convolutions, and ternary projections. The teacher is trained first on the same data and then frozen. The student starts from random initialization with the quantizer active, so every forward pass sees the arithmetic that inference will use. There is no mismatch between the training graph and the deployed graph.
4.2Objective
The loss combines mel reconstruction, intermediate feature matching, and duration prediction:
L = Lmel + λ1 ∑l MSE(Hs(l), Ht(π(l))) + λ2 Ldur (6)
Lmel is the L1 distance between log-mel spectrograms. The hidden term matches student block l to teacher block π(l), with π spreading the six student blocks over the sixteen teacher layers. A 1×1 adapter projects student features when the widths differ; the adapters are used only during training and are discarded at export. The duration term is a mean-squared error on log-duration. The weights λ1 and λ2 were selected on the validation split; the ablation sets λ1 = 0 and leaves λ2 unchanged.
4.3Straight-through estimation
Rounding and clipping have zero derivative almost everywhere, so a literal gradient through the quantizer would vanish. The straight-through estimator replaces that derivative with the identity: the forward pass uses Wt, and the backward pass treats the quantizer as if it were linear [17]. The optimizer updates a set of FP32 master weights, and the ternary weights are recomputed before each forward pass.
The estimator is biased, and the bias grows when many weights sit near a rounding boundary. Two details help. Weight decay keeps the master weights from drifting far from the quantization grid, and the hidden-feature loss gives each block a target that does not depend on the final mel output. Early layers therefore receive a useful gradient even while the output is still poor.
4.4Why post-training quantization fails
PTQ applies the same formula to a trained teacher and stops. The rounding error is never corrected; it propagates through sixteen layers and is amplified by LayerNorm and softmax. In our ablation, PTQ produced an MOS of 3.41 with audible buzzing on voiced segments. QAT avoids this by letting the master weights move against the quantization error. The gap between 3.41 and 4.02 is the largest single effect in the study.
5Experimental setup
5.1Data and features
We trained on LJSpeech, a single-speaker English corpus with 13,100 clips and about 24 hours of speech at 22.05 kHz [19]. The split is 12,500 utterances for training, 300 for validation, and 300 for testing. Raw waveforms are converted to 80-channel log-mel spectrograms with a 1024-point Fourier transform, a 256-sample hop, and a Hann window. No additional data augmentation was used.
5.2Training
Training ran on an NVIDIA RTX 4090 for 200 epochs with a batch size of 32. We used AdamW with β1 = 0.9, β2 = 0.98, and a weight decay of 10−4. The learning rate rose linearly to 10−3 over 4,000 steps and then decayed with an inverse square root. The teacher was trained first, frozen, and used to supervise the student. The quantizer was active for the whole student run, so no separate fine-tuning stage was needed.
5.3Hardware
- Inference ran on two physical systems, both single-threaded:
- Desktop x86-64: Intel Core i7-11700K at 3.60 GHz, eight cores, 16 MB L3, 32 GB DDR4, AVX2 enabled.
- Embedded ARM64: Raspberry Pi 4 Model B with a Broadcom BCM2711 Cortex-A72 at 1.50 GHz, 1 MB shared L2, 4 GB RAM, 64-bit Linux, NEON enabled.
- The two machines represent different failure modes. The desktop has enough cache to hold the compressed model and enough issue width to hide some memory latency. The Pi has neither, which makes it a stricter test of the bandwidth argument.
5.4Metrics and protocol
RTF is synthesis wall time divided by the duration of the generated audio. We time the acoustic model only; the vocoder is identical across systems and is excluded, because including it would mix the effect of acoustic-model compression with the cost of a component we did not change. Each system runs on 100 test utterances, and we report the mean. This scope matters when comparing numbers across papers: an end-to-end RTF that includes a vocoder can be dominated by the vocoder.
Speech quality was measured with a mean opinion score test. Twenty-five listeners rated 50 clips from the test set on a five-point scale in 0.5 increments, and we report 95% confidence intervals. Listeners heard samples from all systems in one session, but the samples were not labeled by system.
For the hardware study we used Linux perf stat over the same 100 sentences, recording cycles, instructions, cache misses, and last-level cache fills on the x86 machine. Board power on the Pi was measured with an inline USB-C meter. The Pi's performance counters were not available in our environment, so its analysis rests on wall time and power rather than on cache events.
5.5Ablation configurations
Four variants isolate the design choices: the full system; a version that stores ternary weights in 2-bit slots instead of radix-3; a version trained without the hidden-feature loss (λ1 = 0); and a version produced by PTQ from the FP32 teacher without QAT. The first variant changes only storage, the second changes only training, and the third changes only the adaptation stage. Each comparison therefore has a single intended cause.
6Results and analysis
6.1Size, speed, and quality
Table II compares the systems. The acoustic model falls from 48.2 MB to 8.9 MB, an 81.5% reduction. On the i7 the RTF drops from 0.28 to 0.07, a 4.0× speedup; on the Pi it drops from 1.24 to 0.18, a 6.9× speedup. Both results are faster than real time, but the Pi result is the more consequential one. The board has no heatsink, a narrow memory interface, and a 1 MB L2, and it still synthesizes speech faster than it plays.
| Model | Size (MB) | RTF (x86 / ARM) | MOS |
|---|---|---|---|
| FastSpeech 2 (FP32) [1] | 114.5 | 0.42 / 1.88 | 4.22 ± 0.04 |
| LightSpeech (FP32) [4] | 18.4 | 0.14 / 0.62 | 4.15 ± 0.05 |
| Nix-TTS (FP32) [5] | 20.9 | 0.12 / 0.55 | 4.11 ± 0.05 |
| Teacher (FP32) | 48.2 | 0.28 / 1.24 | 4.18 ± 0.05 |
| Teacher (INT8 PTQ) | 12.4 | 0.16 / 0.51 | 4.14 ± 0.06 |
| Proposed (1.58-bit) | 8.9 | 0.07 / 0.18 | 4.02 ± 0.06 |
Note: The first three rows are literature reference points with hardware that differs from ours; the last three were measured on the same testbed.
Against FastSpeech 2 (114.5 MB, RTF 0.42), the proposed model is 12.9× smaller and 6.0× faster on x86. Against LightSpeech it is 2.1× smaller and 2.0× faster. Those comparisons mix architectures and training data, so we treat them as context rather than proof. The controlled comparison is the teacher: same corpus, same front end, same vocoder, and the same evaluation harness.
6.2Why x86 and ARM differ
The x86 gain (4.0×) is smaller than the ARM gain (6.9×), even though the x86 chip has more cache. The explanation starts with the baseline. The 48.2 MB teacher exceeds the 16 MB L3, so every frame streams weights from DRAM. The 8.9 MB student fits, and that traffic largely disappears. On the Pi, the teacher is limited by a narrow LPDDR4 interface and a 1 MB L2. The student still does not fit in L2, but it needs 5.4× fewer bytes, so the bottleneck loosens in proportion. Residency gives the x86 a step change; reduced traffic gives the Pi a proportional gain.
This also explains an apparent paradox. The weaker machine shows the larger speedup because it was further from the compute-bound regime to begin with. A processor with spare bandwidth would gain less from compression, no matter how small the model became.
6.3Ablation
Table III reports the four configurations. Each row changes one design decision.
| Configuration | Size (MB) | RTF (x86 / ARM) | MOS |
|---|---|---|---|
| Full system | 8.9 | 0.07 / 0.18 | 4.02 ± 0.06 |
| without radix-3 (2-bit) | 11.2 | 0.09 / 0.23 | 4.02 ± 0.06 |
| without hidden loss | 8.9 | 0.07 / 0.18 | 3.84 ± 0.08 |
| PTQ only (no QAT) | 8.9 | 0.07 / 0.18 | 3.41 ± 0.09 |
| Teacher (FP32) | 48.2 | 0.28 / 1.24 | 4.18 ± 0.05 |
Note: Each row changes one design decision; the teacher is shown for reference.
Packing format. Storing ternary weights in 2-bit slots raises the artifact from 8.9 MB to 11.2 MB, a 25.8% increase, and slows the Pi from RTF 0.18 to 0.23. The slowdown tracks the increase in bytes, which is what a bandwidth-bound kernel should do. On x86 the change is smaller, from 0.07 to 0.09, because both artifacts fit in L3; the residual difference is the extra decode work. MOS is unchanged, as expected: the format changes storage, not arithmetic.
Hidden-feature loss. Setting λ1 = 0 drops MOS from 4.02 to 3.84. Without layer-wise targets, the student matches only the final mel, and the intermediate statistics drift. The effect is smaller than removing QAT but larger than the confidence interval, so it is a real loss rather than listener noise.
PTQ versus QAT. Rounding the teacher and stopping produces an MOS of 3.41, with buzzing on voiced segments. The network has no opportunity to compensate for the grid, and the error compounds through sixteen layers. This is the largest quality effect in the study and the strongest argument for training with the quantizer in place.
6.4Speech quality
The proposed model scores 4.02 ± 0.06, against 4.18 ± 0.05 for the teacher and 4.22 ± 0.04 for FastSpeech 2. The 0.16 gap is small, and the intervals do not overlap. Listeners noticed slight smoothing on unvoiced fricatives such as /s/ and /ʃ/, but word boundaries, pitch contours, and timing were preserved. The pattern is consistent with ternary quantization removing small weights that shape high-frequency noise while leaving the low-frequency envelope, which carries most of the intelligibility, intact.
A direct comparison with BitTTS is informative but not controlled. On LibriTTS-R, BitTTS reported an MOS of 3.09 for a 1.58-bit model with a quantized vocoder, against 3.75 for the FP32 baseline, a drop of 0.66 [3], [20]. Their acoustic-only quantization retained more quality. Our 0.16 drop with an FP32 vocoder agrees with their conclusion that the vocoder is the sensitive component. The corpora, listeners, and baselines differ, so the numbers should not be placed in the same column.
7Cache and energy profiling
Table IV summarizes the hardware counters and the board-level measurements. The numbers are reported as changes because absolute event counts depend on the input length and on the kernel version.
| Metric | Teacher | Proposed | Change |
|---|---|---|---|
| LLC miss rate (normalized) | 1.00 | 0.005 | −99.5% |
| Off-chip traffic | 18.4 GB/s | 0.8 GB/s | −95.7% |
| Cycles per instruction | 1.48 | 0.41 | −72.3% |
| Board power (Pi 4) | 5.4 W | 2.1 W | −61.1% |
| Energy per audio second | 6.7 J | 0.38 J | −94.3% |
Note: Cache and CPI figures are from the x86 testbed; power and energy are from the Raspberry Pi 4.
7.1Cache behavior
On the i7, the last-level cache miss rate falls by 99.5%. The 8.9 MB model fits in the 16 MB L3 with room for activations, the front end, and the operating system. An 11.2 MB model would also fit, which is why the 2-bit ablation is only mildly slower on that machine. The residency argument is about headroom, not about a cliff at 8.9 MB.
7.2Bandwidth and CPI
Off-chip traffic falls from 18.4 GB/s to 0.8 GB/s, a 95.7% reduction. Cycles per instruction fall from 1.48 to 0.41. A CPI below 1 means the core retires more than one instruction per cycle, which SIMD makes possible. More important is what the drop implies: the FP32 model was stalled on memory, not short of execution slots. Faster arithmetic alone would not have produced the same gain.
7.3Power and heat
On the Pi, board power falls from 5.4 W to 2.1 W. Because the student also finishes sooner, the energy per second of synthesized speech falls from about 6.7 J to 0.38 J, a 17.7× reduction. The teacher throttled within two minutes of continuous synthesis; the student ran at room temperature without a heatsink or fan. For a battery-powered device, this is often more important than the peak speedup, because thermal throttling turns a fast model into a slow one after a short burst.
7.4Limits of the profiling
The power figure includes the whole board, not just the SoC, and the inline meter has limited precision. The x86 counters are not available on the Pi, so the ARM analysis rests on wall time and power. We therefore treat the energy numbers as indicative and the cache numbers as direct evidence for the x86 machine only.
8Discussion
8.1What bought the speed
The x86 speedup (4.0×) is close to the reduction in bytes (5.4×), which suggests that bandwidth and residency, not arithmetic, set the pace. The ARM speedup (6.9×) exceeds the byte ratio, which we attribute to the removal of FP32 multiply latency and to better use of the core's issue slots. The two effects are not additive in any simple way, and a paper that reports only RTF would not distinguish them.
Compression and kernel design should be evaluated together: a smaller format with an expensive decoder can lose to a larger one with a cheap decoder.
8.2When the approach pays off
The recipe is a good fit when three conditions hold: inference runs at batch one, the model does not fit in the last-level cache, and the device is memory- or energy-limited. It is a poor fit when the batch is large enough to make the kernel compute-bound, when a vector unit with INT8 dot-product instructions is available and the model already fits in cache, or when the vocoder dominates end-to-end latency. In the last case, Amdahl's law limits the benefit no matter how small the acoustic model becomes.
Unpacking overhead also matters at small reduction sizes. A layer with K = 32 spends a larger fraction of its time decoding indices than a layer with K = 768. The crossover in our implementation is around K = 64; below that, an INT8 kernel with a wider format is competitive. This is a property of the kernel, not of ternary arithmetic in general, but it is easy to miss when only large layers are benchmarked.
8.3Design rules
The experiments support a short set of rules for similar deployments.
- Quantize the large pointwise and attention projections; they hold most of the weights and tolerate ternary rounding after distillation.
- Keep softmax, LayerNorm, embeddings, the depthwise taps, and the final projection in FP32; they are cheap in parameters and expensive in sensitivity.
- Pack along the reduction dimension and align blocks to eight bytes.
- Use one scale per tensor; per-channel scales add a multiply and a fetch per row for a gain that is hard to measure.
- Measure cache misses and energy, not only RTF.
8.4Limitations and threats to validity
The study has clear boundaries. It uses one English, single-speaker corpus; one teacher architecture; one student depth; and two machines. The listening test has 25 participants and no ABX or CMOS component, so it measures preference and naturalness rather than intelligibility. The RTF excludes the vocoder by design, which means the end-to-end gain on a device with a heavy vocoder will be smaller. The model sizes are serialized artifact sizes, including scales and metadata, not raw bit budgets. Finally, the x86 cache counters come from one kernel build and one compiler version; a different build could shift the absolute numbers, though the direction is robust.
Both models were measured under the same conditions, so the comparison holds; the exact RTF values should not be extrapolated without measurement.
9Conclusion and future work
We presented a CPU implementation of ternary speech synthesis and measured where its speed comes from. Radix-3 packing stores five weights per byte, an arithmetic decoder avoids a lookup table, and masked addition replaces the floating-point multiply. Module-wise distillation and QAT recover most of the lost quality.
The acoustic model falls from 48.2 MB to 8.9 MB, an 81.5% reduction. Single-thread RTF is 0.07 on an Intel i7-11700K and 0.18 on a Raspberry Pi 4, with an MOS of 4.02 against 4.18 for the teacher. Cache counters show a 99.5% drop in last-level misses and a 95.7% drop in off-chip traffic on x86, while the Pi gains mainly from reduced bytes and board power. The ablation separates packing from training: packing changes size and speed, while QAT and hidden-feature distillation change quality.
Future work will extend the vocoder to mixed precision, entropy-code the radix-3 index stream, port the kernels to RISC-V and Cortex-M cores, and test multilingual corpora with an ABX protocol.
ACKNOWLEDGMENT
The authors thank Prof. Suwasini S. Chabukswar and Dr. Brijendra Gupta for their guidance, technical direction, and mentorship throughout this research. They also thank the Department of Information Technology at Siddhant College of Engineering, Pune, for computational facilities and hardware testbed support.
References
- [1]Y. Ren, C. Hu, X. Tan, T. Qin, S. Zhao, Z. Zhao, and T.-Y. Liu, "FastSpeech 2: Fast and high-quality end-to-end text to speech," in Proc. ICLR, 2021.
- [2]S. Ma, H. Wang, L. Ma, L. Wang, W. Wang, S. Huang, L. Dong, R. Wang, J. Xue, and F. Wei, "The era of 1-bit LLMs: All large language models are in 1.58 bits," arXiv:2402.17764, 2024.
- [3]M. Kawamura, T. Hasumi, Y. Shirahata, and R. Yamamoto, "BitTTS: Highly compact text-to-speech using 1.58-bit quantization and weight indexing," in Proc. Interspeech, 2025. arXiv:2506.03515.
- [4]R. Luo, X. Tan, R. Wang, T. Qin, J. Li, S. Zhao, E. Chen, and T.-Y. Liu, "LightSpeech: Lightweight and fast text to speech with neural architecture search," in Proc. IEEE ICASSP, 2021, pp. 5699-5703.
- [5]R. Chevi, R. E. Prasojo, A. F. Aji, A. Tjandra, and S. Sakti, "Nix-TTS: Lightweight and end-to-end text-to-speech via module-wise distillation," in Proc. IEEE SLT, 2023, pp. 970-976.
- [6]D. Sale, S. Chabukswar, A. Gavade, A. Aher, and S. Hulavale, “Smart Door Lock and Unlock System Using Mobile Application Based on IoT,” International Research Journal of Modernization in Engineering Technology and Science, vol. 6, no. 10, pp. 3954–3957, Oct. 2024, doi: 10.56726/IRJMETS62884.
- [7]J. Vainer and O. Dusek, "SpeedySpeech: Efficient neural speech synthesis," in Proc. Interspeech, 2020, pp. 3575-3579.
- [8]D. Lim, S. Jung, and E. Kim, "JETS: Jointly training FastSpeech2 and HiFi-GAN for end to end text to speech," in Proc. Interspeech, 2022, pp. 21-25.
- [9]J. Kong, J. Kim, and J. Bae, "HiFi-GAN: Generative adversarial networks for efficient and high fidelity speech synthesis," in Proc. NeurIPS, 2020, pp. 17022-17033.
- [10]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, "Attention is all you need," in Proc. NeurIPS, 2017, pp. 5998-6008.
- [11]B. Jacob, S. Kligys, B. Chen, M. Zhu, M. Tang, A. Howard, H. Adam, and D. Kalenichenko, "Quantization and training of neural networks for efficient integer-arithmetic-only inference," in Proc. IEEE CVPR, 2018, pp. 2704-2713.
- [12]S. Ding, P. Meadowlark, Y. He, L. Lew, S. Agrawal, and O. Rybakov, "4-bit conformer with native quantization aware training for speech recognition," in Proc. Interspeech, 2022, pp. 1711-1715.
- [13]O. Rybakov, P. Meadowlark, S. Ding, D. Qiu, J. Li, D. Rim, and Y. He, "2-bit conformer quantization for automatic speech recognition," in Proc. Interspeech, 2023, pp. 4908-4912.
- [14]A. Gholami, S. Kim, Z. Dong, Z. Yao, M. W. Mahoney, and K. Keutzer, "A survey of quantization methods for efficient neural network inference," arXiv:2103.13630, 2021.
- [15]M. Nagel, M. Fournarakis, R. A. Amjad, Y. Bondarenko, M. van Baalen, and T. Blankevoort, "A white paper on neural network quantization," arXiv:2106.08295, 2021.
- [16]S. Williams, A. Waterman, and D. Patterson, "Roofline: An insightful visual performance model for multicore architectures," Commun. ACM, vol. 52, no. 4, pp. 65-76, 2009.
- [17]D. Sale, S. Chabukswar, A. Gavade, A. Aher, and S. Hulavale, “Smart Door Lock and Unlock System Using Mobile Application Based on IoT,” International Research Journal of Modernization in Engineering Technology and Science, vol. 7, no. 6, pp. 1664–1668, Jun. 2025, doi: 10.56726/IRJMETS79271.
- [18]J. L. Ba, J. R. Kiros, and G. E. Hinton, "Layer normalization," arXiv:1607.06450, 2016.
- [19]K. Ito and L. Johnson, "The LJ speech dataset," 2017. [Online]. Available: https://keithito.com/LJ-Speech-Dataset/
- [20]Y. Koizumi, H. Zen, S. Karita, Y. Ding, K. Yatabe, N. Morioka, M. Bacchiani, Y. Zhang, W. Han, and A. Bapna, "LibriTTS-R: A restored multi-speaker text-to-speech corpus," in Proc. Interspeech, 2023, pp. 5496-5500.
- [21]S. S. Chabukswar and B. Gupta, “A Review of IoT-Based Machine Health Monitoring and Predictive Maintenance Using Machine Learning: Architectures, Algorithms, and Open Challenges,” Iconic Research and Engineering Journals, vol. 10, no. 4, pp. 4378–4392, Oct. 2026, doi: 10.64388/IREV10I4-1724415.