Vietnam Law Llama3 8B

Model Llama3-8B được fine-tune trên dữ liệu luật pháp Việt Nam.

Cách sử dụng

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

tokenizer = AutoTokenizer.from_pretrained("your-username/vietnam-law-llama3")
model = AutoModelForCausalLM.from_pretrained(
    "your-username/vietnam-law-llama3",
    torch_dtype=torch.float16,
    device_map="auto"
)

# Test
question = "Tuổi kết hôn tối thiểu ở Việt Nam?"
prompt = f"Hỏi: {question}\nĐáp: "
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.3)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)

Training Details

  • Base model: meta-llama/Llama-3-8B-Instruct
  • Fine-tuned on Vietnamese legal documents
  • Optimized for Vietnamese legal Q&A

Examples

Q: Tuổi kết hôn tối thiểu ở Việt Nam?
A: Nam từ đủ 20 tuổi, nữ từ đủ 18 tuổi theo Luật Hôn nhân và Gia đình 2014.

Q: Thời gian làm việc tối đa 1 tuần?
A: 48 giờ trong 1 tuần theo Bộ luật Lao động 2019.

License

This model is based on Llama3 and follows the same license terms.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support