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)
Limitations and bias
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.
Training data
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 procedure
Training was done using HF Trainer using free GPU on Kaggle.
Eval results
Final perplexity reached was 52, eval_accuracy = 0.3704, eval_loss = 3.9513
BibTeX entry and citation info
@inproceedings{Abed Khooli,
year={2023}
}
Runs of akhooli ap2023 on huggingface.co
104
Total runs
0
24-hour runs
10
3-day runs
8
7-day runs
45
30-day runs
More Information About ap2023 huggingface.co Model
ap2023 huggingface.co
ap2023 huggingface.co is an AI model on huggingface.co that provides ap2023's model effect (), which can be used instantly with this akhooli ap2023 model. huggingface.co supports a free trial of the ap2023 model, and also provides paid use of the ap2023. Support call ap2023 model through api, including Node.js, Python, http.
ap2023 huggingface.co is an online trial and call api platform, which integrates ap2023's modeling effects, including api services, and provides a free online trial of ap2023, you can try ap2023 online for free by clicking the link below.
ap2023 is an open source model from GitHub that offers a free installation service, and any user can find ap2023 on GitHub to install. At the same time, huggingface.co provides the effect of ap2023 install, users can directly use ap2023 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.