Downloads · 30 days
93
1% of all-time downloads
akhooli/ap2023
ap2023 is a text generation model from akhooli. Use it when you need the model to write or continue text. It is set up for transformers.
Fine-tuned model of Arabic poetry dataset based on aragpt2-medium.
Downloads · 30 days
93
1% of all-time downloads
All-time downloads
6.4K
Public
Parameters
394M
3 GB on disk
Likes
2
Public
Click a slice to open those files.
.bin1.5 GB · 50%
How the weights are stored.
F32369M · 94%
From the Hugging Face model README
Fine-tuned model of Arabic poetry dataset based on aragpt2-medium.
Try this HF Space.
From script:
from transformers import pipeline
pipe = pipeline('text-generation', framework='pt', device=-1, model='akhooli/ap2023', tokenizer='akhooli/ap2023')
gen = pipe(prompt, max_length=96, temperature = 0.95,repetition_penalty=1.05,
num_beams=3, num_return_sequences=2, do_sample = True,
top_p = 1.0, top_k = 50, return_full_text=True)[0]["generated_text"]
poetry =""
for line in gen.split('.')[:-1]:
poetry += line
print(poetry)
Both the GPT2-small-arabic (trained on Arabic Wikipedia) and this model have several limitations in terms of coverage and training performance. Use them as demonstrations or proof of concepts but not as production code.
This pretrained model used poems from several eras with a total of around 1.4M lines (1.25M used for training). The dataset was trained (fine-tuned) based on the aragpt2-medium transformer model.
Training was done using HF Trainer using free GPU on Kaggle.
Final perplexity reached was 52, eval_accuracy = 0.3704, eval_loss = 3.9513
@inproceedings{Abed Khooli,
year={2023}
}