Downloads · 30 days
7
6% of all-time downloads
ezzhamed/Islamic-Finance-LLM-v1.0
Islamic-Finance-LLM-v1.0 is a machine learning model from ezzhamed. 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.
A LoRA fine-tuned model specialized in Islamic Finance and Sharia-compliant financial transactions.
Downloads · 30 days
7
6% of all-time downloads
All-time downloads
127
Public
Repo size
64.3 MB
Likes
1
Public
Click a slice to open those files.
.safetensors64.3 MB · 100%
From the Hugging Face model README
A LoRA fine-tuned model specialized in Islamic Finance and Sharia-compliant financial transactions.
| Property | Value |
|---|---|
| Base Model | Qwen3-14B |
| Method | LoRA (r=8, alpha=16) |
| Training Samples | 6,305 |
| Dataset | islamic_finance_training_data |
| Languages | Arabic, English |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base_model = "Qwen/Qwen3-14B"
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_model,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, "ezzhamed/Islamic-Finance-LLM-v1.0")
# Generate
messages = [
{"role": "system", "content": "أنت مستشار مالي إسلامي متخصص."},
{"role": "user", "content": "ما الفرق بين المرابحة والتورق؟"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Apache 2.0