Files
gpt2-medium-persian/README.md
ModelHub XC bbf5b9571e 初始化项目,由ModelHub XC社区提供模型
Model: flax-community/gpt2-medium-persian
Source: Original Platform
2026-08-03 13:13:18 +08:00

1.6 KiB

language, tags, widget
language tags widget
fa
text-generation
text
در یک اتفاق شگفت انگیز، پژوهشگران
text
گرفتگی بینی در کودکان و به‌خصوص نوزادان باعث می‌شود
text
امیدواریم نوروز امسال سالی

GPT2 Medium 4 Persian

This is part of the Flax/Jax Community Week, organized by HuggingFace and TPU usage sponsored by Google.

Team Members

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.

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