Files
Tashkeel-700M/README.md
ModelHub XC c36fbacf9f 初始化项目,由ModelHub XC社区提供模型
Model: Etherll/Tashkeel-700M
Source: Original Platform
2026-04-12 14:11:58 +08:00

2.4 KiB

base_model, tags, license, language, datasets
base_model tags license language datasets
LiquidAI/LFM2-700M
text-generation-inference
transformers
unsloth
lfm2
trl
sft
arabic
apache-2.0
ar
arbml/tashkeela

Tashkeel-700M

Arabic Diacritization Model | نَمُوذِجٌ تَشْكِيلُ النُّصُوصِ الْعَرَبِيَّةِ

نموذج بحجم 700 مليون بارامتر مخصص لتشكيل النصوص العربية. تم تدريب هذا النموذج بضبط نموذج

LiquidAI/LFM2-700M

على مجموعة البيانات

arbml/tashkeela.

كيفية الاستخدام

from transformers import AutoModelForCausalLM, AutoTokenizer

#تحميل النموذج
model_id = "Etherll/Tashkeel-700M"
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype="bfloat16",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)

# إضافة التشكيل
prompt = "السلام عليكم" 
input_ids = tokenizer.apply_chat_template(
    [{"role": "user", "content": prompt}],
    add_generation_prompt=True,
    return_tensors="pt",
    tokenize=True,
).to(model.device)

output = model.generate(
    input_ids,
    do_sample=False,  
)

print(tokenizer.decode(output[0, input_ids.shape[-1]:], skip_special_tokens=True))

مثال

  • النص المدخل: السلام عليكم
  • الناتج: السَّلَامُ عَلَيْكُمْ


Tashkeel-700M (English)

A 700M parameter model for Arabic diacritization (Tashkeel). This model is a fine-tune of LiquidAI/LFM2-700M on the arbml/tashkeela dataset.

How to Use

The Python code for usage is the same as listed in the Arabic section above.

Example

  • Input: السلام عليكم
  • Output: السَّلَامُ عَلَيْكُمْ

This lfm2 model was trained 2x faster with Unsloth and Huggingface's TRL library.