Low-Bit Quantization for On-Device Translation Models: From 1.25-Bit Weights to Real-World Deployment
Deploying large language models for offline translation on smartphones involves far more than downloading weights. This article explores the technical reality behind approximately 1.25-bit quantization, including ternary weight encoding, fine-grained sparsity, mixed-precision calibration, and memory behavior at runtime. It explains why smaller model files do not automatically translate to lower peak memory usage, why compressed models require specialized compute kernels to achieve real speedups, and how to evaluate translation quality, thermal throttling, privacy, and user experience on actual devices. A phased deployment roadmap is also outlined for teams integrating quantized translation models into production mobile applications.
From Model Compression to Practical On-Device Translation
The core requirement for on-device offline translation is enabling language conversion entirely on the device, without network connectivity. This serves travelers, users in weak-network environments, and organizations that prefer not to transmit sensitive text to external systems.
However, placing a translation model on a phone is not equivalent to simply downloading a model file to local storage. Developers must simultaneously address four categories of challenges:
First, whether the model weights are small enough to satisfy installation, download, and storage constraints. Second, whether inference produces acceptable memory peaks. Third, whether generation speed and time-to-first-token meet interaction requirements. Fourth, whether the compressed model still accurately handles numbers, negation, technical terminology, and low-resource languages.
Low-bit quantization should therefore be understood as a foundational enabling technology for edge deployment, not the entirety of the offline translation experience. A complete solution requires coordinated work across model training, execution kernels, cache management, and product interaction design.
What Approximately 1.25-Bit Quantization Actually Means
Parameter Count, Storage Precision, and File Size
Model parameter count and model file size are not the same metric. At the same parameter scale, different storage precisions can result in several-fold differences in weight footprint.
Take approximately 1.8 billion parameters as an example. If each parameter is stored in 16 bits, the theoretical weight data volume alone is:
1.8 billion × 16 ÷ 8 = 3.6 billion bytes.
If the average per-parameter cost is 1.25 bits, the theoretical weight data volume becomes:
1.8 billion × 1.25 ÷ 8 = 281.25 million bytes.
This is an idealized calculation for weight payload only, and does not mean the actual model file will reach this size. Quantization scale factors, sparse position encoding, vocabulary tables, configuration data, alignment padding, and parameters retained at higher precision can all increase the final volume.
When reporting compression results, the comparison basis should be clearly stated: raw weight data, the complete model package, or the application install bundle including inference components. Different measurement scopes should not be mixed directly.
Ternary Weights and Fine-Grained Sparsity
One approach to low-bit models maps a large number of continuous weights into three states—negative, zero, and positive—and combines them with grouped scale factors to restore numerical magnitude.
The zero value carries dual meaning: it is both a quantization outcome and an expression of sparse structure. Non-zero weights can be represented with compact sign encoding.
For example, suppose every four weights form a group, with three non-zero weights retained and one position set to zero. The signs of the three non-zero weights require three bits, and the four possible zero positions require two bits, totaling five bits per group, or an average of 1.25 bits per weight.
This example illustrates the basic encoding logic of low-bit formats, but it does not represent that all implementations use this exact format. It does not account for scale factors, grouping metadata, or other auxiliary information. Therefore, the idea that “zeroed parameters do not need their values saved” should not be misinterpreted as “sparse positions do not need to be stored either.”
Why Sparsity Structure Must Be Fine-Grained
Completely irregular sparse distributions may reduce the number of non-zero parameters, but they tend to introduce additional index overhead and non-contiguous memory access, degrading execution efficiency.
Sparsity constraints within fixed small groups create more predictable data layouts, facilitating batch decoding and specialized compute paths. However, this regularity also limits which weights can be retained, potentially adding precision loss.
The choice of sparsity structure is therefore not about maximizing the number of zeros, but about finding a balance among model quality, encoding efficiency, and hardware execution efficiency.
Maintaining Translation Quality After Compression
Weight Magnitude Does Not Equal Parameter Importance
Larger weights usually deserve attention, but absolute value does not fully reflect a parameter’s impact on output. Some parameters with modest magnitudes may be highly sensitive to specific languages, technical terms, or syntactic relationships.
A more robust approach is to observe output changes, activation distributions, and error propagation before and after quantization, guided by representative data. For layers or modules with significant impact, higher precision can be retained; for parts more amenable to compression, lower precision can be applied.
The resulting mixed-precision scheme is generally more controllable than applying uniform compression to all parameters. However, it also adds complexity to execution paths and deployment maintenance.
Calibration Data Must Cover Real Language Distributions
Translation models face multilingual input, not a single text type. Calibration performed with only one language or short sentences may not represent real-world usage.
Calibration data should cover different writing systems, sentence lengths, numbers, dates, proper nouns, and the specialized domains users actually care about. For low-resource languages, attention should also be paid to bias caused by insufficient samples.
If the application needs to translate chat conversations, calibration data should include colloquialisms, abbreviations, typos, and mixed-language expressions. If used for document reading, it should cover long sentences, headings, lists, and contextual references.
Post-Quantization Recovery Requires Targeted Validation
Low-bit quantization changes the weight distribution. Depending on the model and available resources, techniques such as quantization-aware training, distillation, or moderate fine-tuning can help the model adapt to the compressed representation capacity.
But an improvement in training loss does not automatically mean an improvement in translation experience. Developers still need to verify whether the model produces omissions, repetitions, semantic inversions, or numeric errors, paying special attention to language directions and task types with the most noticeable changes before and after compression.
Smaller Files Do Not Automatically Mean Lower Runtime Memory
The on-device memory budget should include at least weights, activations, intermediate compute buffers, attention caches, vocabulary tables, and application overhead.
For autoregressive generation models, cache usage typically grows as input length and generation length increase. Even if weights occupy only a few hundred megabytes, runtime peaks can still be significantly higher than the model file size.
Deployment evaluation should therefore record separately:
- Resident memory after model loading;
- Peak memory during first inference;
- Peak variation across different input lengths;
- Resource state after continuous translation sessions;
- Stability under foreground/background switching and memory pressure.
From an engineering perspective, constraints can be placed on maximum input and output length, segmented translation can be adopted, and temporary buffers should be promptly reclaimed after task completion. For long documents, splitting should be performed by sentence, paragraph, or semantic unit rather than mechanically cutting at fixed character counts.
Segmentation also weakens context, so terminology consistency must be maintained and the scope of retained context should be clearly defined, to avoid tension between resource savings and translation coherence.
Why Low-Bit Computation Requires Dedicated Optimization
Storage Format and Execution Method Must Be Consistent
If inference first fully recovers all low-bit weights into high-precision data and then invokes ordinary matrix operations, the file size may be reduced, but decoding overhead and temporary memory can offset part of the benefit.
A more suitable approach is to read compressed weights in compute blocks, fusing decoding, scale restoration, and matrix operations as much as possible, avoiding the construction of complete high-precision weight copies.
Implementation details should account for processor instructions, cache capacity, data layout, and thread scheduling. Whether a low-bit format brings advantages ultimately depends on measured results on target devices.
Performance Gains Depend on Bottleneck Location
Low-bit quantization reduces weight read volume, but it does not mean end-to-end speed will necessarily improve proportionally to bit-width reduction.
Actual latency also includes text preprocessing, input-stage computation, step-by-step generation, output post-processing, and UI refresh. If the bottleneck lies in compute, cache access, or thread scheduling during generation, the benefit of smaller weights alone may be limited.
Performance testing should distinguish at least time-to-first-token, steady-state generation speed, and total completion time, avoiding a single “speedup factor” to describe all aspects of experience.
Phone Testing Must Account for Sustained Load
Short-duration testing often fails to reflect real usage. Continuous translation may trigger device thermal throttling, causing subsequent tasks to slow down. Excessively high thread counts may also affect UI responsiveness and other applications.
Therefore, cold start, warm operation after preheating, continuous multi-round tasks, and conditions under different battery levels and temperatures all need to be tested. Parallelism should be chosen with throughput, power consumption, and interaction smoothness in mind, rather than pursuing only the highest speed in a single test.
How Translation Quality Should Be Evaluated
Multilingual models cannot be validated by a single overall average score. If multiple languages are supported, each source–target language pair should be evaluated separately, because the difficulty and quality of the two opposite directions are not necessarily the same.
The number of languages is not equal to the number of translation directions. Excluding same-language conversion, if all languages can be directly translated to and from each other, the number of directed translation directions for N languages is N × (N − 1). But supporting many directions does not mean quality is consistent across all of them.
A three-tier evaluation system is recommended:
Basic semantic layer: Check whether the original meaning is fully preserved, and whether omissions, additions, or negation errors occur.
Business accuracy layer: Focus on amounts, units, dates, addresses, names, and specialized terminology. For high-risk text, stricter human review procedures should be applied.
On-device experience layer: Evaluate completion rate, cancellation responsiveness, long-text stability, and resource consumption within acceptable wait times.
Automated metrics are suitable for continuous regression testing, while human review is better at identifying issues with pragmatics, tone, and domain-specific expression. The two approaches should complement each other rather than replace one another.
Offline Capability Still Requires Privacy and Permission Design
On-device inference reduces the need to upload source text, but it does not automatically mean the application collects no data. Input text may still appear in logs, clipboard, crash reports, or backups.
Therefore, recording original text and translations should be avoided where possible. Debug data should be de-identified and assigned a retention period. Network-based model downloads and local translation execution should be clearly separated in both workflow and permission design.
If the application provides cross-app text selection or selected-text translation, it should use OS-permitted authorization mechanisms, clearly explain the scope of read access, and allow users to pause at any time. Feature design should prioritize user-initiated actions, avoiding continuous, unnoticed reading of content from other applications.
When images, scanned documents, or speech are involved, additional OCR or speech recognition modules are required. The text translation model’s capabilities should not be claimed as image recognition or speech translation abilities.
A Phased Deployment Approach
Phase one: Define target languages, device scope, text length, and acceptable wait times. Establish a quality baseline with the uncompressed model.
Phase two: Experiment with different quantization and sparsity configurations, comparing actual package size, runtime memory, and quality changes on key language directions.
Phase three: Optimize weight reading, compute kernels, and thread scheduling on target devices. Complete sustained-load and thermal testing.
Phase four: Integrate segmented translation, task cancellation, exception recovery, privacy protection, and model updates into application design.
Phase five: Build a long-term regression set. After every change to the model, vocabulary, quantization format, or runtime components, re-verify numbers, terminology, negation expressions, and resource usage.
The value of approximately 1.25-bit quantization lies in significantly reducing weight storage and read costs, creating the conditions for billion-parameter models to run on phones. But a mature offline translation solution must also demonstrate post-compression quality, real-device efficiency, and application stability. Only when all three are incorporated into an engineering feedback loop can model compression translate into reliable user experience.
