InternLM-Law: An Open Source Chinese Legal Large Language Model

Zhiwei Fei, Songyang Zhang, Xiaoyu Shen, Dawei Zhu, Xiao Wang +7 more
6/21/2024
cs.CL

No official code found. Best implementation: InternLM/InternLM-Law (17 stars, Apache-2.0, last commit 2024-05-14).

Abstract

While large language models (LLMs) have showcased impressive capabilities, they struggle with addressing legal queries due to the intricate complexities and specialized expertise required in the legal field. In this paper, we introduce InternLM-Law, a specialized LLM tailored for addressing diverse legal queries related to Chinese laws, spanning from responding to standard legal questions (e.g., legal exercises in textbooks) to analyzing complex real-world legal situations. We meticulously construct a dataset in the Chinese legal domain, encompassing over 1 million queries, and implement a data filtering and processing pipeline to ensure its diversity and quality. Our training approach involves a novel two-stage process: initially fine-tuning LLMs on both legal-specific and general-purpose content to equip the models with broad knowledge, followed by exclusive fine-tuning on high-quality legal data to enhance structured output generation. InternLM-Law achieves the highest average performance on LawBench, outperforming state-of-the-art models, including GPT-4, on 13 out of 20 subtasks. We make InternLM-Law and our dataset publicly available to facilitate future research in applying LLMs within the legal domain.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[COLING 2025] InternLM-Law: An Open Source Chinese Legal Large Language Model

170Mar 18, 20242 years agoApache-2.0
legalllm

Similar Papers

Cite this paper

@article{fei2024internlmlaw,
  title  = {InternLM-Law: An Open Source Chinese Legal Large Language Model},
  author = {Zhiwei Fei and Songyang Zhang and Xiaoyu Shen and Dawei Zhu and Xiao Wang and Maosong Cao and Fengzhe Zhou and Yining Li and Wenwei Zhang and Dahua Lin and Kai Chen and Jidong Ge},
  year   = {2024},
  eprint = {2406.14887},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.14887v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.14887.svg)](https://codeofpaper.com/paper/2406.14887)

Discussion