Downloads · 30 days
5
14% of all-time downloads
zeynou09/algerian-law-qwen-lora
algerian-law-qwen-lora is a machine learning model from zeynou09. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
نموذج Qwen2.5-1.5B-Instruct مُدرَّب بـ LoRA على نصوص القانون الجزائري.
Downloads · 30 days
5
14% of all-time downloads
All-time downloads
36
Public
Repo size
28.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors17.5 MB · 60%
From the Hugging Face model README
نموذج Qwen2.5-1.5B-Instruct مُدرَّب بـ LoRA على نصوص القانون الجزائري.
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch
BASE_MODEL = "unsloth/Qwen2.5-1.5B-Instruct-bnb-4bit"
ADAPTER = "zeynou09/algerian-law-qwen-lora"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16,
)
tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
quantization_config=bnb_config,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, ADAPTER)
⚠️ هذه المعلومات للاطلاع فقط، يُنصح باستشارة محامٍ مختص.