Downloads · 30 days
0
maanaar/allam7b-sft-arabic-grammar-eerab
allam7b-sft-arabic-grammar-eerab is a machine learning model from maanaar. 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 transformers. The card lists the license as apache-2.0.
- Developed by: maanaar - License: apache-2.0 - Finetuned from model : ALLaM-AI/ALLaM-7B-Instruct-preview
Downloads · 30 days
0
Access
Public
Updated Sep 2, 2025
Repo size
321 MB
Likes
0
Public
Click a slice to open those files.
.safetensors320 MB · 100%
From the Hugging Face model README
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Fine-tuned ALLaM-7B model for Arabic Q&A and grammar tasks.
from unsloth import FastLanguageModel
import torch
model_name = "maanaar/allam7b-sft-arabic-grammar-eerab"
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_name,
max_seq_length=2048,
dtype=None, # auto-detect
load_in_4bit=True, # saves GPU memory
)
messages = [
{"role": "user", "content": "ما اعراب جملة لا اله الا الله"}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
outputs = model.generate(
**tokenizer(text, return_tensors="pt").to(model.device),
max_new_tokens=256,
temperature=0.7,
top_p=0.8,
top_k=20
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))