Instructions to use Congi-libya/BayanSimplify-v0.2-Fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Congi-libya/BayanSimplify-v0.2-Fast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Congi-libya/BayanSimplify-v0.2-Fast")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Congi-libya/BayanSimplify-v0.2-Fast") model = AutoModelForSeq2SeqLM.from_pretrained("Congi-libya/BayanSimplify-v0.2-Fast", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Congi-libya/BayanSimplify-v0.2-Fast with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Congi-libya/BayanSimplify-v0.2-Fast" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Congi-libya/BayanSimplify-v0.2-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Congi-libya/BayanSimplify-v0.2-Fast
- SGLang
How to use Congi-libya/BayanSimplify-v0.2-Fast with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Congi-libya/BayanSimplify-v0.2-Fast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Congi-libya/BayanSimplify-v0.2-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Congi-libya/BayanSimplify-v0.2-Fast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Congi-libya/BayanSimplify-v0.2-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Congi-libya/BayanSimplify-v0.2-Fast with Docker Model Runner:
docker model run hf.co/Congi-libya/BayanSimplify-v0.2-Fast
BayanSimplify-v0.2-Fast
Model 2 of the Bayan project, compact: AraBART on the same 22,733-pair mix, the app's fast default.
What it does
The same data and tags as BayanSimplify-v0.2 on AraBART (139M parameters, a third of the size), so it fits a 250 MB download as an int8 bundle (222 MB) and shows the first word on a mid-range phone in 82–172 ms.
Input: بسط: (without the shadda, which AraBART's tokenizer cannot read), then an optional tag such as [S2] ,
then the text.
BayanBench v2.0, test, core items:
| Setting | Meaning kept | Longest clause, words cut |
|---|---|---|
[S2], float |
40.1% | 6.7 |
| no tag, float | 51.4% | 4.9 |
| no tag, int8 in the app | 50.5% | 4.8 |
Fast, but it keeps the meaning less often than the AraT5v2 models; the app offers BayanSimplify-v0.3 as its large model.
Use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
repo = "Congi-libya/BayanSimplify-v0.2-Fast"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSeq2SeqLM.from_pretrained(repo)
text = "وقد أدى التوسع العمراني السريع الذي شهدته المدينة خلال العقدين الماضيين إلى ازدحام مروري خانق في ساعات الذروة."
x = tok("بسط: " + text, return_tensors="pt", max_length=256, truncation=True)
y = model.generate(**x, num_beams=1, no_repeat_ngram_size=3, max_length=256)
print(tok.decode(y[0], skip_special_tokens=True))
The BayanSimplify family
| Model | What it is | Base model | Training data | In the Bayan app |
|---|---|---|---|---|
| BayanSimplify-v0.1 | Model 1 | AraT5v2-base-1024 | SAMER, level 5 → 3 | not shipped |
| BayanSimplify-v0.2 | Model 2 | AraT5v2-base-1024 | 22,733-pair mix (SAMER, Baseet, DAASI) with strength tags | "Earlier large model" |
| BayanSimplify-v0.2-Fast | Model 2, compact | AraBART | the same mix | "Fast model", the default download |
| BayanSimplify-v0.3 | Model 3, our best | AraT5v2-base-1024 | Bayan corpus v1, 14,975 rows | "Large model", four beams |
| BayanSimplify-ONNX | The int8 bundles the app downloads | v0.2-Fast, v0.2, v0.3 |
Licence and data
CC BY-NC 4.0 (non-commercial), in line with the training data's terms. SAMER is used under the CAMeL Lab's permission to fine-tune and share weights for non-commercial use; its text is not redistributed here.
About Bayan
Bayan (بيان) simplifies Arabic text for readers with dyslexia, entirely on an Android phone: select text in any app, choose «تبسيط» (Simplify), and a simpler version appears over the page. Built by Team Cogni for the Samsung Innovation Campus AI capstone, 2026. Every number on this card comes from the team's final report and BayanBench v2.0, the benchmark built for the task (meaning scored by Gemma 4 31B, checked against human raters, AUC 0.85).
- Downloads last month
- 201
Model tree for Congi-libya/BayanSimplify-v0.2-Fast
Base model
moussaKam/AraBART