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

87 lines
2.4 KiB
Markdown

---
base_model: LiquidAI/LFM2-700M
tags:
- text-generation-inference
- transformers
- unsloth
- lfm2
- trl
- sft
- arabic
license: apache-2.0
language:
- ar
datasets:
- arbml/tashkeela
---
# Tashkeel-700M
**Arabic Diacritization Model** | **نَمُوذِجٌ تَشْكِيلُ النُّصُوصِ الْعَرَبِيَّةِ**
نموذج بحجم 700 مليون بارامتر مخصص لتشكيل النصوص العربية. تم تدريب هذا النموذج بضبط نموذج
`LiquidAI/LFM2-700M`
على مجموعة البيانات
`arbml/tashkeela`.
- **النموذج الأساسي:** [LiquidAI/LFM2-700M](https://huggingface.co/LiquidAI/LFM2-700M)
- **مجموعة البيانات:** [arbml/tashkeela](https://huggingface.co/datasets/arbml/tashkeela)
### كيفية الاستخدام
```python
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.
- **Base Model:** [LiquidAI/LFM2-700M](https://huggingface.co/LiquidAI/LFM2-700M)
- **Dataset:** [arbml/tashkeela](https://huggingface.co/datasets/arbml/tashkeela)
### 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](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)