Manuscript Offprint

arXiv:2608.24936

GreenLeaf Law Embed Tiny: A Compact Embedding Model for Legal Domain Retrieval

Surya Saka

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

Surya Saka

JudicialMind

surya@judicialmind.ai

Abstract—We present GreenLeaf Law Embed Tiny, a 0.6B parameter embedding model for legal domain retrieval. GreenLeaf-Tiny achieves 75.11% on the Massive Legal Embedding Benchmark (MLEB) and 64.38% on MTEB(Law, v1), demonstrating competitive performance among models under 1B parameters. Our approach combines a two-stage training pipeline that first distills knowledge from a larger teacher model into a compact student architecture, then applies domain-specific fine-tuning with hard negative mining; a carefully curated dataset of 3.4 million query-passage pairs, including 150,000 human-curated samples across diverse legal jurisdictions; and an efficient inference architecture supporting multiple quantization levels (BF16, INT8, binary) enabling deployment in resource-constrained environments. We provide detailed analysis of our training methodology, architectural choices, and comprehensive evaluation across legal retrieval tasks. Our results demonstrate that domain-specific training with high-quality data can improve performance for specialized domain applications.

Index Terms—Embeddings, Legal Information Retrieval, Knowledge Distillation, Hard Negative Mining, Model Compression

I. INTRODUCTION

Legal information retrieval presents unique challenges that distinguish it from general-domain semantic search. Legal documents exhibit complex hierarchical structures, specialized terminology, and intricate cross-references that general-purpose embedding models struggle to capture [1]. The stakes are high: missed precedents or misinterpreted statutes can have significant consequences for legal outcomes. Despite the critical importance of accurate legal retrieval, the field has been dominated by either general-domain models that lack legal specialization or proprietary commercial systems with limited transparency.

Recent advances in large language models have demonstrated remarkable capabilities across diverse domains, yet their application to embedding tasks in specialized fields remains underexplored. While models like OpenAI's text-embedding-3-large and Voyage's voyage-law-2 achieve strong performance, they operate as black boxes with unknown training data and methodologies. This lack of transparency hinders reproducibility and raises questions about data privacy, particularly relevant in legal contexts where confidentiality is paramount [15]. The legal domain demands both accuracy and explainability, requirements that conflict with the opacity of large proprietary models.

This paper presents a study of training compact, high-performance embedding models specifically for the legal domain. We demonstrate that careful architectural choices, combined with high-quality domain-specific data and training techniques, can yield models that perform competitively with larger alternatives in specific legal retrieval tasks. Our work addresses a gap in available options for efficient legal embedding models suitable for deployment in privacy-sensitive legal environments [12].

The legal technology sector has witnessed significant growth, with the global legal tech market projected to reach $35 billion by 2027. However, this growth has been constrained by the computational requirements of large models. Large embedding models with 7B+ parameters require substantial GPU resources, making them impractical for many legal applications, particularly in resource-constrained environments or when processing confidential documents that cannot leave on-premises infrastructure [2].

Our key findings demonstrate that a 0.6B parameter model trained with domain-specific techniques achieves 75.11% on MLEB, competitive with some larger models on specific legal retrieval tasks. The combination of distillation followed by domain fine-tuning yields +9.24 points over direct fine-tuning alone. Hard negative mining shows 23% improvement on fine-grained legal distinction tasks compared to random negative sampling. INT8 quantization incurs only -0.3% performance degradation while reducing memory footprint by 4×. Human-curated data, comprising only 4.4% of total training data, contributes +8.2 points to final performance.

The main contributions of this paper are summarized as follows:

• We introduce a two-stage training pipeline combining knowledge distillation with hard negative mining, adapted for legal domain characteristics including hierarchical document structure and citation networks. Our ablation studies demonstrate that both stages contribute to final performance.

• We present the JudicialMind Legal Corpus, comprising 3.4M query-passage pairs including 150K human-curated samples, representing a large legal retrieval training corpus. We provide analysis of data composition, quality filtering, and jurisdiction balancing across 35 languages and 40+ jurisdictions.

• We provide architectural specifications and inference optimization techniques, including flexible quantization schemes enabling deployment across hardware constraints. Our architecture supports BF16, INT8, and binary inference with documented accuracy-efficiency trade-offs.

• We conduct evaluation across legal retrieval tasks, providing analysis of where our approach succeeds and where larger models maintain advantages. We include per-task and per-category breakdowns.

References (20)