You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

ViLegalQwen3-1.7B-Base

ViLegalQwen3-1.7B-Base is a decoder-only language model for Vietnamese legal text understanding, part of the ViLegalLM suite. It is continually pretrained from Qwen3-1.7B-Base on a newly curated 16GB Vietnamese legal corpus. ViLegalQwen3-1.7B-Base achieves state-of-the-art results among 1.7B-scale models across Vietnamese legal downstream tasks including Question Answering, Natural Language Inference, and Syllogism Reasoning.

Paper: ViLegalLM: Language Models for Vietnamese Legal Text — ACL 2026

Resources: GitHub | ViLegalBERT | ViLegalQwen2.5-1.5-Base


How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("ntphuc149/ViLegalQwen3-1.7B-Base")
model = AutoModelForCausalLM.from_pretrained("ntphuc149/ViLegalQwen3-1.7B-Base")

Note: This is a base (pretrained) model, not an instruction-tuned model. We do not recommend using base language models for conversations. Instead, you can apply post-training, e.g., SFT, RLHF, continued pretraining, etc., on this model.


Model Summary

Summary for ViLegalQwen3-1.7B-Base checkpoint (click to expand)
Attribute Value
Architecture Qwen3 (decoder-only, causal LM)
Parameters 1.72B
Base model Qwen3-1.7B-Base
Max sequence length 4096 tokens
Tokenizer Qwen3 tokenizer
Training objective Causal Language Modeling (CLM)
Training domain Vietnamese legal text
Precision FP32

Evaluation Results

ViLegalQwen3-1.7B-Base achieves state-of-the-art results among 1.7B-scale models across all evaluated Vietnamese legal benchmarks. Bold = best in the 1.7B parameter group. Italic = closed-source model scores.

Question Answering (click to expand)

True/False — ALQAC-TF

Model Pre Rec F1
Qwen3-1.7B-Base 90.27 87.89 89.07
qwen3-1.7b-legal-pretrain 89.62 86.32 87.94
ViLegalQwen3-1.7B-Base 90.62 91.58 91.10
gpt-4o-mini (0-shot) 89.86 97.89 93.70

Multiple Choice — ALQAC-MCQ & VLSP-MCQ-LK

Model Pre_mac Rec_mac F1_mac
ALQAC-MCQ
Qwen3-1.7B-Base 85.64 84.68 85.03
qwen3-1.7b-legal-pretrain 87.96 88.19 88.00
ViLegalQwen3-1.7B-Base 89.22 88.81 88.92
gpt-4o-mini (0-shot) 90.83 91.58 91.15
VLSP-MCQ-LK
Qwen3-1.7B-Base 67.84 62.80 64.98
qwen3-1.7b-legal-pretrain 66.95 60.88 63.32
ViLegalQwen3-1.7B-Base 70.12 64.00 66.54
gpt-4o-mini (0-shot) 69.05 51.16 58.17

Abstractive QA — ViBidLQA-AQA

Model ROUGE-L BLEU-4 BS-F1
Qwen3-1.7B-Base 73.81 51.18 90.24
qwen3-1.7b-legal-pretrain 74.84 51.49 90.32
ViLegalQwen3-1.7B-Base 74.49 52.11 90.43
gpt-4o-mini (0-shot) 67.06 40.46 86.85
Natural Language Inference (click to expand)

NLI — VLSP-NLI

Model Precision Recall F1
Qwen3-1.7B-Base 94.00 97.33 95.64
qwen3-1.7b-legal-pretrain 97.44 97.22 97.24
ViLegalQwen3-1.7B-Base 95.75 100.00 97.83
gpt-4o-mini (0-shot) 100.00 86.67 92.86
Syllogism Reasoning (click to expand)

Syllogism Reasoning — VLSP-Syllogism

Model BS-F1 LLM-Judge
Qwen3-1.7B-Base 76.69 0.2760
qwen3-1.7b-legal-pretrain 76.80 0.2899
ViLegalQwen3-1.7B-Base 77.50 0.3038
gpt-4o-mini (0-shot) 78.63 0.5069

Also in ViLegalLM

Model Architecture Params Context
ViLegalBERT Encoder-only 135M 256
ViLegalQwen2.5-1.5B-Base Decoder-only 1.54B 2,048
ViLegalQwen3-1.7B-Base (this model) Decoder-only 1.72B 4,096

Limitations and Biases

  • Domain scope: Trained exclusively on Vietnamese legal texts; may not generalize to other legal systems or jurisdictions.
  • Base model only: Not instruction-tuned; outputs may be incomplete or incoherent without task-specific fine-tuning.
  • Temporal bias: Legal corpus reflects Vietnamese law as of the collection date; model outputs may not reflect recent legislative changes.
  • Inherited biases: May reflect biases present in the source legal corpora, including regional variations in legal practice and domain coverage imbalances.
  • Not a legal authority: Model outputs should never be used as definitive legal interpretations without expert validation.

Intended Use

Intended for:

  • Further fine-tuning on Vietnamese legal downstream tasks (QA, NLI, reasoning)
  • Vietnamese legal text generation and completion
  • Research on Vietnamese legal NLP and continual pretraining

Not intended for:

  • Direct conversational or instruction-following use without fine-tuning
  • Replacing professional legal counsel or human judgment in legal decision-making
  • Providing legal advice without expert validation
  • Legal systems outside Vietnam without careful domain adaptation

Citation

If you use ViLegalQwen3-1.7B-Base, please cite our paper:

<!-- ViLegalLM citation — available soon -->

License

Apache-2.0

This model is derived from Qwen3-1.7B-Base which is licensed under Apache-2.0. ViLegalQwen3-1.7B-Base is released under the same Apache-2.0 license.

Downloads last month
-
Safetensors
Model size
2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ntphuc149/ViLegalQwen3-1.7B-Base

Finetuned
(307)
this model

Collection including ntphuc149/ViLegalQwen3-1.7B-Base