## 3 Results  
### Optimization of Quantized LiteRT DNN Models Using Representative Datasets  
The platform for quantization of LiteRT DNN Models is a GPU-based workstation with Intel i5-2300 CPU @ 2.80 GHz, 24 GB RAM, NVIDIA GeForce RTX 3080-12 GB GPU, running Windows 10 OS (64-bit) and Python 3.8.18 with installed libraries including TensorFlow 2.10.0. One of the main issues in the development phase is the time required for post-training quantization to produce the final product--a quantized LiteRT DNN model ready for deployment on the microcontroller. Figure 6 summarizes all measurements for the post-training quantization times of both IntQ and Full-IntQ models, which were observed to be linearly dependent on the RDS size. For RDS sizes of up to 1000 ECG recordings, the quantization process is relatively fast, requiring between 17 s and 20 s. However, when the LiteRT conversion uses the total calibration dataset (over 4300 samples), the post-training quantization time increases to 34 s for Full-IntQ and 37 s for IntQ. Notably, IntQ models are slower because they require additional time for internal conversion of input/output data from float32 to int8 for inner activations, whereas Full-IntQ models handle input/output conversion externally as int8, avoiding internal conversions. Given that the RDS is limited and includes only specific cases from the calibration dataset, a critical challenge in post-training quantization is to ensure the optimal RDS content. Figure 7 illustrates three distinct RDS configurations achieved through different selection strategies. The random selection strategy (1 st column) creates an RDS dominated by the predominant rhythm in the calibration dataset (70% ASYS). The rhythm-based selec  
Figure 6: Measurements of post-training quantization times for the Integer (IntQ) and Full-Integer (Full-IntQ) quantized LiteRT models as a function of the representative dataset size (RDS = 10, 20, 40, 80, 120, 160, 200, 250, 300, 350, 400, 500, 1000, and 4306 ECG recordings) selected from the calibration dataset. tion strategy (2 nd column) ensures RDS with a balanced rhythm composition (30% NSR, 30% ONR, 20% ASYS, 20% VF). Finally, the amplitude-based selection strategy (3 rd column) enables the collection of low-amplitude ASYS with RMS \(<\) 100 \(\upmu\)V (20%), extreme-amplitude noises with RMS \(>\) 1000 \(\upmu\)V (20%), and normal-amplitude ECGs within the RMS range of 100-1000 \(\upmu\)V (60%). There are apparent differences between the example RDS configurations shown in Figure 7, which are hypothesized to have varying impacts on the quantization error, defined as MAE(pVF) in Equation (3). The error is measured using the validation database, with statistical conclusions drawn from generalizations across 100 random RDS configurations for each size, as shown in Figure 8. Distributions with a wider min-max range indicate a greater influence of the RDS content on the quantization error. Notably, wide distributions are observed in the quantization of IntQ LiteRT models with limited RDS size \(\leq\)40 and most Full-IntQ LiteRT models, presenting quantization error span from 0.6% to over 4%. These findings highlight the importance of carefully optimizing RDS content. From the 100 quantized models per RDS size in Figure 8, RDS optimization identifies the best representative with the lowest quantization error for each size. MAE(pVF) of all best models is compared in Figure 9. Both quantized LiteRT versions are identified as optimal at an RDS size of 80 using the random RDS generator, achieving MAE(pVF) values of 0.6% for IntQ and 0.7% for Full-IntQ. Other RDS generation strategies, such as rhythm-based strategies, appear equally effective, while amplitude-based strategies are less effective. A consistent trend of increasing quantization error is observed as RDS size grows, with the maximal error (about 2%) occurring when the entire calibration dataset is used for RDS.