arXiv:2611.07988cs.CLNov 2026

Manuscript Offprint

arXiv:2611.07988

Compression Through a Context Lens: Evaluating Adaptation, Quantization, and Distillation in Arabic Legal LLMs

Md. Rafiul Biswas, George Mikros, Wajdi Zaghouani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Model compression can facilitate the deployment of large language models in resource-constrained legal settings, but its effects on domain-specific performance may depend on the evaluation protocol. We investigate this issue using ARABLEGEVAL, a Saudi Arabic legal benchmark, under both with-context and no-context evaluation. The former provides supporting legal passages, while the latter assesses performance without external context. Removing the context produces accuracy gaps of up to 27 percentage points for the base model. We examine three stages: domain adaptation, quantization, and knowledge distillation across FANAR-9B, JAIS-8B, and Qwen2.5-7B. Four-bit quantization reduces model memory by 64–71%, with changes in no-context MCQ accuracy ranging from −3.2 to +1.6 percentage points. Distillation produces more variable results, with accuracy generally declining as student size decreases. A Qwen2.5-7B student distilled from FANAR achieves 76.6% no-context accuracy, compared with 77.2% for its teacher. Our findings suggest that no-context evaluation provides a useful complement to context-supported testing when assessing the effects of adaptation and compression on Arabic legal language models.¹

1 Introduction

Large language models (LLMs) have demonstrated promising capabilities in domain-specific applications, including legal reasoning, contract analysis, and legal question answering (Chalkidis et al., 2020; Katz et al., 2023; Ariai et al., 2025). However, deploying these models in legal settings remains challenging, particularly where computational resources and infrastructure are limited (Dong et al., 2025; Panjolia et al., 2026). Local deployment may help address confidentiality

concerns, although the use of LLMs in legal applications still requires appropriate human oversight, jurisdiction-specific validation, and safeguards against inaccurate legal advice.

Recent Arabic LLMs, including FANAR-9B (Team et al.), Jais-13B (Anwar et al., 2026), and AceGPT-13B (Huang et al., 2024), have advanced Arabic language processing. Nevertheless, their computational requirements can limit deployment in resource-constrained environments. The sensitive nature of legal information may also motivate local inference rather than reliance on external services (Heydari and Mahmoud, 2025; Guo, 2018).

Model compression offers a potential approach to reducing these computational requirements (Gou et al., 2021; Xu et al., 2024; Alyafeai and Ahmad, 2021). However, much of the existing research has focused on general-purpose or English-centric benchmarks (Ariai et al., 2025), leaving the effects of compression on Arabic legal tasks less explored. An additional challenge concerns evaluation: when a supporting legal passage is provided, models may answer questions by using the supplied information rather than relying on knowledge acquired during training. Consequently, high with-context accuracy does not necessarily indicate comparable performance when supporting context is unavailable.

We investigate this distinction by evaluating Arabic legal LLMs under both with-context and no-context protocols while examining the effects of domain adaptation, quantization, and knowledge distillation. Our primary focus is no-context multiple-choice question (MCQ) accuracy as an indicator of context-independent task performance. We address the following research questions:

  • RQ1 (Context dependency). How does access to supporting legal context affect MCQ accuracy, and how does the with-context/no-context gap vary across models and adapta-

¹https://anonymous.4open.science/r/arabic-LLM-legal-compression-6B5A tion strategies?

  • RQ2 (Adaptation and quantization). How do continued pretraining (CPT), supervised fine-tuning (SFT), their sequential combination (CPT→SFT), and post-training quantization affect no-context MCQ accuracy across different model families?

  • RQ3 (Distillation scaling). How does no-context MCQ accuracy vary with student size and teacher-student configuration, including cross-architecture distillation?

We conduct our experiments on ARABLEGALEVAL (Hijazi et al., 2024), an Arabic legal benchmark based on Saudi legal sources. We evaluate three open-source models: FANAR-9B (Team et al.), JAIS-8B (Anwar et al., 2026), and Qwen2.5-7B (Team, 2024). First, we compare the base models with CPT, SFT, and CPT→SFT adaptation. We then examine post-training quantization of the merged CPT→SFT checkpoints and, separately, distillation from the SFT-only checkpoints into smaller student models. All three stages are evaluated using the same fixed MCQ subset under both protocols. We additionally report open-ended question-answering performance on NajizQA as a secondary evaluation.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the methodology, and Section 4 presents the experimental setup. Section 5 reports the results, followed by the discussion in Section 6 and conclusion in Section 7.

References (23)