Downloads · 30 days
9
12% of all-time downloads
adnanmd76/islamic-ai-foundation
islamic-ai-foundation is a text classification model from adnanmd76. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as other.
World's first foundation model for comprehensive Islamic knowledge processing with Noor-e-Abjad integration
Downloads · 30 days
9
12% of all-time downloads
All-time downloads
77
Public
Repo size
—
Likes
1
Public
Click a slice to open those files.
.md3.5 KB · 45%
From the Hugging Face model README
World's first foundation model for comprehensive Islamic knowledge processing with Noor-e-Abjad integration
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("adnanmd76/islamic-ai-foundation")
tokenizer = AutoTokenizer.from_pretrained("adnanmd76/islamic-ai-foundation")
from datasets import load_dataset
# Load Noor-e-Abjad dataset
dataset = load_dataset("adnanmd76/nooreabjad-dataset")
# Your fine-tuning code herefrom transformers import Trainer, TrainingArguments
training_args = TrainingArguments(
output_dir="./nooreabjad-finetuned",
per_device_train_batch_size=4,
num_train_epochs=3,
fp16=True
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=dataset["train"]
)
# mergekit-multimodal-islamic.yaml
models:
- model: adnanmd76/islamic-ai-foundation
weight: 0.6
parameters:
- name: classifier
weight: 0.7
- model: aubmindlab/bert-base-arabertv2
weight: 0.4
parameters:
- name: encoder
weight: 0.3
merge_method: linear
dtype: float16
# FastAPI integration
from fastapi import FastAPI
app = FastAPI()
@app.post("/validate-abjad")
async def validate_abjad(text: str):
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
return {"prediction": outputs.logits.argmax().item()}
"And We have certainly made the Qur’an easy for remembrance..." — Quran 54:17 "Read in the name of your Lord who created..." — Quran 96:1