Instructions to use VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain") model = AutoModelForMultimodalLM.from_pretrained("VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain
- SGLang
How to use VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain with Docker Model Runner:
docker model run hf.co/VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain
Use Docker
docker model run hf.co/VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain- 🧠 Vietnamese Legal Base Model - Qwen1.7B (Pretrained)
- This model is a Vietnamese legal-domain base model pretrained from Qwen-1.7B, adapted specifically for legal text understanding and legal question answering tasks.
- 📌 Overview
- 📚 Training Data
- 📊 Dataset Statistics
- Training Configuration
- All texts were collected from publicly available and legally permitted sources, then preprocessed to ensure quality and consistency for domain adaptation.
- 🚀 Example Usage
- 🧑💼 Maintainers
- ⚠️ License & Usage
- This model is a Vietnamese legal-domain base model pretrained from Qwen-1.7B, adapted specifically for legal text understanding and legal question answering tasks.
🧠 Vietnamese Legal Base Model - Qwen1.7B (Pretrained)
This model is a Vietnamese legal-domain base model pretrained from Qwen-1.7B, adapted specifically for legal text understanding and legal question answering tasks.
📌 Overview
- Base model: Qwen-1.7B
- Domain: Vietnamese legal language
- Training objective: Continual pretraining on legal-domain texts
📚 Training Data
The model was continually pretrained on a curated corpus of Vietnamese legal texts, including:
- Official legal documents (laws, codes, decrees, etc.)
- Legal news articles and commentary
📊 Dataset Statistics
The training corpus includes a total of approximately 144,000 Vietnamese texts categorized as follows:
- ~96,000 legal documents: Official sources such as laws, decrees, circulars,...
- ~48,000 legal news articles: Collected from online legal news portals, featuring case studies, legal interpretations,...
Training Configuration
The model was trained using full-parameter fine-tuning (no quantization or LoRA). Below is the training setup used for continual pretraining:
🔧 Model & Tokenization
- Base model:
Qwen/Qwen3-1.7B - Maximum sequence length:
4096 - Block size:
4096
All texts were collected from publicly available and legally permitted sources, then preprocessed to ensure quality and consistency for domain adaptation.
🚀 Example Usage
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain")
model = AutoModelForCausalLM.from_pretrained("VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain")
🧑💼 Maintainers
This model is developed and maintained by the VLSP 2025 LegalSLM Task Organizers.
For inquiries, please contact: leanhcuong@tdtu.edu.vn
⚠️ License & Usage
This model is released for research purposes only under the scope of the VLSP 2025 Evaluation Campaign. Any use outside the competition must comply with relevant data and model licensing agreements.
- Downloads last month
- 149
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VLSP2025-LegalSML/qwen3-1.7b-legal-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'