FaseehGPT is a GPT-style language model designed for Arabic text processing, trained on a subset of Arabic datasets to generate coherent and contextually relevant text. It uses a pre-trained Arabic tokenizer (asafaya/bert-base-arabic) and is optimized for resource-constrained environments like Google Colab (free GPU). The model was trained for 20 epochs with checkpoints and sample generations.
-
Architecture: Decoder-only transformer with multi-head self-attention and feed-forward layers
-
Parameters:
- Vocabulary Size: ~32,000 (from
asafaya/bert-base-arabic tokenizer)
- Embedding Dimension: 512
- Number of Layers: 12
- Number of Attention Heads: 8
- Feed-forward Dimension: 2048
- Total Parameters: ~70.7 million
-
Configuration:
- Maximum Sequence Length: 512
- Dropout Rate: 0.1
- Activation Function: GELU
-
Weight Initialization: Normal distribution (mean = 0, std = 0.02)
-
Special Features: Supports top-k and top-p sampling; weight tying between input and output embeddings
-
arbml/Arabic_News: 7,114,814 news article texts
-
arbml/Arabic_Literature: 1,592,629 literary texts
-
Subset Used: 50,000 texts (randomly sampled)
- Training Set: 45,000 (90%)
- Validation Set: 5,000 (10%)
FaseehGPT can be used to generate Arabic text from a prompt. Example code:
1from transformers import AutoModel, AutoTokenizer
2
3# Load model and tokenizer
4model = AutoModel.from_pretrained("alphatechlogics/FaseehGPT", trust_remote_code=True)
5tokenizer = AutoTokenizer.from_pretrained("alphatechlogics/FaseehGPT")
6
7# Generate text
8prompt = "السلام عليكم"
9input_ids = tokenizer(prompt, return_tensors="pt").input_ids
10outputs = model.generate(input_ids, max_new_tokens=100, temperature=1.0, top_k=50, top_p=0.9)
11generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
12print(generated_text)
-
Source: Hugging Face Datasets
-
Used Datasets:
arbml/Arabic_News: News across diverse topics with formal Arabic
arbml/Arabic_Literature: Novels and poetry, providing rich language variety
-
Total Texts: 8,707,443 (full); 50,000 used for training
1@article{umar2025faseehgpt,
2 title={FaseehGPT: A Lightweight Transformer Model for Arabic Text Generation with Enhanced Morphological Understanding},
3 author={Umar, Ahsan},
4 publisher={Engineering Archive}
5}