Small Wins Big: Comparing Large Language Models and Domain Fine-Tuned Models for Sarcasm Detection in Code-Mixed Hinglish Text
Organizations: Pondicherry University · Ashoka University
Abstract
Sarcasm detection in multilingual and code-mixed environments remains a challenging task for natural language processing models due to structural variations, informal expressions, and low-resource linguistic availability. This study compares four large language models, Llama 3.1, Mistral, Gemma 3, and Phi-4, with a fine-tuned DistilBERT model for sarcasm detection in code-mixed Hinglish text. The results indicate that the smaller, sequentially fine-tuned DistilBERT model achieved the highest overall accuracy of 84%, outperforming all of the LLMs in zero and few-shot set ups, using minimal LLM generated code-mixed data used for fine-tuning. These findings indicate that domain-adaptive fine-tuning of smaller transformer based models may significantly improve sarcasm detection over general LLM inference, in low-resource and data scarce settings.
Figures & tables
| Original Sentence | Translated Sentence |
|---|---|
| Bernie Sanders wins Maine democratic caucus | Bernie Sanders n Λ Maine democratic caucus Ejt Λ |
| Meet the white house’s newest star: a whiteboard | White house k Λ newest star s Λ Emlo: ek whiteboard |
| Four consequences of a $15 minimum wage | $15 minimum wage k Λ cAr consequences |
| 15 things to bring on your summer adventures | apn Λ summer adventures pr l Λ jAn Λ k Λ Ela Λ 15 things |
| Dataset Split | Sarcastic | Non-Sarcastic |
|---|---|---|
| Training | 9380 | 9380 |
| Fine-Tune (English) | 1171 | 1171 |
| Fine-Tune (Hinglish) | 1171 | 1171 |
| Testing | 1172 | 1172 |
| Split | Positive | Negative | Neutral |
|---|---|---|---|
| Fine-tuning | 644 | 646 | 645 |
| Models | Zero-Shot | Few-Shot | ||||||
|---|---|---|---|---|---|---|---|---|
| English | Code-mixed | English | Code-mixed | |||||
| Accuracy | F1-Score | Accuracy | F1-Score | Accuracy | F1-Score | Accuracy | F1-Score | |
| Llama 3.1 | 0.6681 | 0.66 | 0.4953 | 0.34 | 0.6907 | 0.68 | 0.6229 | 0.60 |
| Mistral | 0.6079 | 0.55 | 0.5341 | 0.42 | 0.5328 | 0.41 | 0.5030 | 0.34 |
| Gemma 3 | 0.6553 | 0.60 | 0.5806 | 0.53 | 0.5034 | 0.34 | 0.5614 | 0.47 |
| Phi 4 | 0.6945 | 0.69 | 0.6036 | 0.55 | 0.6540 | 0.62 | 0.6028 | 0.56 |
| Fine-tuning data | Testing data | Accuracy | F1 Score |
|---|---|---|---|
| No fine-tune | Code-mixed [Sarcasm] | 0.56868 | 0.47 |
| English [Sarcasm] | Code-mixed [Sarcasm] | 0.64462 | 0.61 |
| Code-mixed [Sarcasm] | Code-mixed [Sarcasm] | 0.83873 | 0.84 |
| English [Sentiment] | Code-mixed [Sarcasm] | 0.53882 | 0.47 |
| Code-mixed [Sentiment] | Code-mixed [Sarcasm] | 0.58873 | 0.59 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Pred. Sarc | Pred. Non-Sarc | |
|---|---|---|
| Actual Sarc | 1103 | 69 |
| Actual Non-Sarc | 860 | 312 |
| Pred. Sarc | Pred. Non-Sarc | |
|---|---|---|
| Actual Sarc | 474 | 698 |
| Actual Non-Sarc | 186 | 986 |
| Pred. Sarc | Pred. Non-Sarc | |
|---|---|---|
| Actual Sarc | 909 | 263 |
| Actual Non-Sarc | 115 | 1057 |