Arabic Nano GPT Models
Collection
GPT2 Based Models trained on Arabic Wikipedia.
•
3 items
•
Updated
This model is a fine-tuned version of openai-community/gpt2 on the arabic wikimedia/wikipedia dataset.
Repository on GitHub: e-hossam96/arabic-nano-gpt
The model achieves the following results on the held-out test set:
import torch
from transformers import pipeline
model_ckpt = "e-hossam96/arabic-nano-gpt-v2"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
lm = pipeline(task="text-generation", model=model_ckpt, device=device)
prompt = """المحرك النفاث هو محرك ينفث الموائع (الماء أو الهواء) بسرعة فائقة \
لينتج قوة دافعة اعتمادا على مبدأ قانون نيوتن الثالث للحركة. \
هذا التعريف الواسع للمحركات النفاثة يتضمن أيضا"""
output = lm(prompt, max_new_tokens=128)
print(output[0]["generated_text"])
The entire wikipedia dataset was split into three splits based on the 90-5-5 ratios.
The following hyperparameters were used during training:
Base model
openai-community/gpt2