
# GPT2 Medium 4 Persian
> This is part of the
[Flax/Jax Community Week](https://discuss.huggingface.co/t/pretrain-gpt2-from-scratch-in-persian/7560), organized by [HuggingFace](https://huggingface.co/) and TPU usage sponsored by Google.


## Team Members
- [Mehrdad Farahani](huggingface.co/m3hrdadfi)
- [Saied Alimoradi](https://discuss.huggingface.co/u/saied)
- [M. Reza Zerehpoosh](huggingface.co/ironcladgeek)
- [Hooman Sedghamiz](https://discuss.huggingface.co/u/hooman650)
- [Mazeyar Moeini Feizabadi](https://discuss.huggingface.co/u/mazy1998)

## Dataset
We used  [Oscar](https://huggingface.co/datasets/oscar) dataset, which is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus.

## How To Use
You can use this model directly with a pipeline for text generation.

```python
from transformers import pipeline, AutoTokenizer, GPT2LMHeadModel
tokenizer = AutoTokenizer.from_pretrained('flax-community/gpt2-medium-persian')
model = GPT2LMHeadModel.from_pretrained('flax-community/gpt2-medium-persian')
generator = pipeline('text-generation', model, tokenizer=tokenizer, config={'max_length':100})
generated_text = generator('در یک اتفاق شگفت انگیز، پژوهشگران')
```
For using Tensorflow import TFGPT2LMHeadModel instead of GPT2LMHeadModel.
## Demo

... SOON

## Evaluation

... SOON
{"language": "fa", "tags": ["text-generation"], "widget": [{"text": "\u062f\u0631 \u06cc\u06a9 \u0627\u062a\u0641\u0627\u0642 \u0634\u06af\u0641\u062a \u0627\u0646\u06af\u06cc\u0632\u060c \u067e\u0698\u0648\u0647\u0634\u06af\u0631\u0627\u0646"}, {"text": "\u06af\u0631\u0641\u062a\u06af\u06cc \u0628\u06cc\u0646\u06cc \u062f\u0631 \u06a9\u0648\u062f\u06a9\u0627\u0646 \u0648 \u0628\u0647\u200c\u062e\u0635\u0648\u0635 \u0646\u0648\u0632\u0627\u062f\u0627\u0646 \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f"}, {"text": "\u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u06cc\u0645 \u0646\u0648\u0631\u0648\u0632 \u0627\u0645\u0633\u0627\u0644 \u0633\u0627\u0644\u06cc"}]}
transformers pytorch tf jax tensorboard gpt2 text-generation fa autotrain_compatible endpoints_compatible has_space text-generation-inference region:us
TAGS
#transformers #pytorch #tf #jax #tensorboard #gpt2 #text-generation #fa #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 


# GPT2 Medium 4 Persian
> This is part of the
Flax/Jax Community Week, organized by HuggingFace and TPU usage sponsored by Google.


## Team Members
- Mehrdad Farahani
- Saied Alimoradi
- M. Reza Zerehpoosh
- Hooman Sedghamiz
- Mazeyar Moeini Feizabadi

## Dataset
We used  Oscar dataset, which is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus.

## How To Use
You can use this model directly with a pipeline for text generation.


For using Tensorflow import TFGPT2LMHeadModel instead of GPT2LMHeadModel.
## Demo

... SOON

## Evaluation

... SOON
# GPT2 Medium 4 Persian
> This is part of the
Flax/Jax Community Week, organized by HuggingFace and TPU usage sponsored by Google. ## Team Members
- Mehrdad Farahani
- Saied Alimoradi
- M. Reza Zerehpoosh
- Hooman Sedghamiz
- Mazeyar Moeini Feizabadi ## Dataset
We used  Oscar dataset, which is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus. ## How To Use
You can use this model directly with a pipeline for text generation.


For using Tensorflow import TFGPT2LMHeadModel instead of GPT2LMHeadModel. ## Demo

... SOON ## Evaluation

... SOON
TAGS
#transformers #pytorch #tf #jax #tensorboard #gpt2 #text-generation #fa #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
 # GPT2 Medium 4 Persian
> This is part of the
Flax/Jax Community Week, organized by HuggingFace and TPU usage sponsored by Google. ## Team Members
- Mehrdad Farahani
- Saied Alimoradi
- M. Reza Zerehpoosh
- Hooman Sedghamiz
- Mazeyar Moeini Feizabadi ## Dataset
We used  Oscar dataset, which is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus. ## How To Use
You can use this model directly with a pipeline for text generation.


For using Tensorflow import TFGPT2LMHeadModel instead of GPT2LMHeadModel. ## Demo

... SOON ## Evaluation

... SOON
passage: TAGS
#transformers #pytorch #tf #jax #tensorboard #gpt2 #text-generation #fa #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
# GPT2 Medium 4 Persian
> This is part of the
Flax/Jax Community Week, organized by HuggingFace and TPU usage sponsored by Google.## Team Members
- Mehrdad Farahani
- Saied Alimoradi
- M. Reza Zerehpoosh
- Hooman Sedghamiz
- Mazeyar Moeini Feizabadi## Dataset
We used  Oscar dataset, which is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus.## How To Use
You can use this model directly with a pipeline for text generation.


For using Tensorflow import TFGPT2LMHeadModel instead of GPT2LMHeadModel.## Demo

... SOON## Evaluation

... SOON