Run this model with HF Jobs

Run hakanbogan/gpt2-turkish-cased on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/hakanbogan/gpt2-turkish-cased. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/hakanbogan/gpt2-turkish-cased on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/hakanbogan/gpt2-turkish-cased. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/hakanbogan/gpt2-turkish-cased. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

๐Ÿ‡น๐Ÿ‡ท Turkish GPT-2 Model

In this repository I release GPT-2 model, that was trained on various texts for Turkish.

The model is meant to be an entry point for fine-tuning on other texts.

Training corpora

I used a Turkish corpora that is taken from oscar-corpus.

It was possible to create byte-level BPE with Tokenizers library of Huggingface.

With the Tokenizers library, I created a 52K byte-level BPE vocab based on the training corpora.

After creating the vocab, I could train the GPT-2 for Turkish on two 2080TI over the complete training corpus (five epochs).

Logs during training: https://tensorboard.dev/experiment/3AWKv8bBTaqcqZP5frtGkw/#scalars

Model weights

Both PyTorch and Tensorflow compatible weights are available.

Model Downloads
hakanbogan/gpt2-turkish-cased config.json โ€ข merges.txt โ€ข pytorch_model.bin โ€ข special_tokens_map.json โ€ข tf_model.h5 โ€ข tokenizer_config.json โ€ข traning_args.bin โ€ข vocab.json

Using the model

The model itself can be used in this way:

from transformers import AutoTokenizer, AutoModelWithLMHead
tokenizer = AutoTokenizer.from_pretrained("hakanbogan/gpt2-turkish-cased")
model = AutoModelWithLMHead.from_pretrained("hakanbogan/gpt2-turkish-cased")

Here's an example that shows how to use the great Transformers Pipelines for generating text:

from transformers import pipeline
pipe = pipeline('text-generation', model="hakanbogan/gpt2-turkish-cased",
                 tokenizer="hakanbogan/gpt2-turkish-cased", config={'max_length':800})   
text = pipe("AkลŸamรผstรผ yolda ilerlerken, ")[0]["generated_text"]
print(text)

How to clone the model repo?

git lfs install
git clone https://huggingface.co/hakanbogan/gpt2-turkish-cased

Contact (Bugs, Feedback, Contribution and more)

For questions about the GPT2-Turkish model, just open an issue here ๐Ÿค—

Downloads last month
792
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
U8
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for hakanbogan/gpt2-turkish-cased

Finetunes
5 models

Spaces using hakanbogan/gpt2-turkish-cased 2