pytorch jax gpt2 lm-head causal-lm transformers text-generation
.gitattributes README.md all_results.json config.json eval_results.json flax_model.msgpack merges.txt pytorch_model.bin special_tokens_map.json tokenizer_config.json train_results.json trainer_state.json training_args.bin vocab.json
### Generate Arabic reviews sentences with model GPT-2 Medium.

#### Load model

```
from transformers import AutoTokenizer, AutoModelWithLMHead
  
tokenizer = AutoTokenizer.from_pretrained("mofawzy/gpt-2-medium-ar")

model = AutoModelWithLMHead.from_pretrained("mofawzy/gpt-2-medium-ar")
```



### Eval:
```
***** eval metrics *****
epoch                     =       20.0
eval_loss                 =     1.7798
eval_mem_cpu_alloc_delta  =        3MB
eval_mem_cpu_peaked_delta =        0MB
eval_mem_gpu_alloc_delta  =        0MB
eval_mem_gpu_peaked_delta =     7044MB
eval_runtime              = 0:03:03.37
eval_samples              =        527
eval_samples_per_second   =      2.874
perplexity                =     5.9285
```


#### Notebook:
https://colab.research.google.com/drive/1P0Raqrq0iBLNH87DyN9j0SwWg4C2HubV?usp=sharing
