// <![CDATA[BERT KNOWLEDGE DISTILLATION DAN QUANTIZATION PADA KLASIFIKASI TEKS KASUS CYBERBULLYING]]> 0422106801 - Dewi Rosmala , S.Si, M.IT. Dosen Pembimbing 1 I KOMANG PANJI NATHA ATMAJA / 15-2021-120 Penulis
Dibanding pendekatan berbasis fitur statis, BERT cenderung unggul pada tugas klasifikasi teks karena representasi kontekstual yang lebih kaya. Namun, ukuran model yang besar dan waktu inferensi yang tinggi menjadi tantangan ketika diimplementasikan pada perangkat dengan keterbatasan sumber daya, seperti smartphone atau sistem yang memerlukan respons real-time. Untuk mengatasi masalah ini, penelitian ini mengusulkan pendekatan optimasi menggunakan Knowledge Distillation (KD) dan Quantization guna menghasilkan model yang lebih efisien dengan tetap mempertahankan akurasi yang tinggi. Eksperimen dilakukan dengan melatih model student menggunakan DistilBERT sebagai arsitektur dasar, yang kemudian disempurnakan melalui teknik distilasi dari model teacher. Selain itu, dilakukan proses Quantization dengan pendekatan Learned Step Size Quantization (LSQ) dan konversi model ke format ONNX dengan representasi bit rendah (INT8 hingga INT2). Hasil eksperimen menunjukkan bahwa model student DistilBERT yang telah melalui distilasi mencapai akurasi 99.60% dan F1-score 99.50%, dengan ukuran model sebesar 514 MB dan waktu inferensi 0.004 detik per sampel. Model ini menunjukkan efisiensi yang lebih baik dibandingkan dengan BERT base dan seluruh varian model yang mengalami Quantization, baik menggunakan LSQ maupun ONNX, dalam hal ukuran model dan waktu inferensi. Secara keseluruhan, pendekatan ini terbukti mampu mempertahankan performa klasifikasi yang tinggi sambil secara signifikan mengurangi ukuran model dan waktu inferensi, menjadikannya cocok untuk diterapkan dalam sistem deteksi cyberbullying berbasis teks berbahasa Indonesia yang memerlukan respon cepat dan efisiensi sumber daya. Compared to approaches based on static features, BERT tends to excel at text classification tasks thanks to its richer contextual representations. However, its large model size and high inference latency pose challenges when deploying on resource-constrained devices, such as smartphones or systems that require real-time responses. To address this, this study proposes optimization via Knowledge Distillation (KD) and Quantization to produce a more efficient model while maintaining high accuracy. Experiments were conducted by training a student model using DistilBERT as the base architecture, further refined through distillation from a teacher model. In addition, Quantization was applied using the Learned Step Size Quantization (LSQ) approach, and the model was converted to ONNX with low-bit representations (INT8 to INT2). The results show that the distilled DistilBERT student model achieves 99.60% accuracy and a 99.50% F1-score, with a model size of 514 MB and an inference time of 0.004 seconds per sample. This model demonstrates better efficiency than BERT base and all quantized variants—whether using LSQ or ONNX—in terms of model size and inference time. Overall, the proposed approach preserves high classification performance while significantly reducing model size and inference latency, making it suitable for Indonesian text-based cyberbullying detection systems that demand rapid responses and resource efficiency.