previous-token-prediction-turkish-gpt2-large

Example Usage

from transformers import AutoTokenizer, GPT2LMHeadModel
from transformers import pipeline
model = GPT2LMHeadModel.from_pretrained("ytu-ce-cosmos/previous-token-prediction-turkish-gpt2-large")
tokenizer = AutoTokenizer.from_pretrained("ytu-ce-cosmos/previous-token-prediction-turkish-gpt2-large")
text = """3. bol bol su için 4. cep telefonunuzu yatakta kullanmayın 5. yatma saatlerinize dikkat edin. """
d = tokenizer.decode(tokenizer.encode(text)[::-1], skip_special_tokens = True)
text_generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
r = text_generator(d, max_length=100)[0]['generated_text']
print(tokenizer.decode(tokenizer.encode(r)[::-1]))
"""
ve bihekim tarafından yapılacak takipeler v yapılan tetkikler sonrası şikayetleriniz aydınlanacaktır. eğer şikayeteleriniz d sürekli ve ani artış varsa mutlaka hekiminize başvurmalısınız.
1. yatma saatlerinize dikkat edin. bazı hormonlarınız sağlığınız için kötü olabilir. bunu aklınızın bir köşesinde bulundurmaya çalışın.
2. düzenli egzersiz yapın. bunların sizin sağlığınız için önemli olduğunu kendinize hatırlatın.
3. bol bol su için 4. cep telefonunuzu yatakta kullanmayın 5. yatma saatlerinize dikkat edin.
"""

Acknowledgments

  • Research supported with Cloud TPUs from Google's TensorFlow Research Cloud (TFRC). Thanks for providing access to the TFRC ❤️
  • Thanks to the generous support from the Hugging Face team, it is possible to download models from their S3 storage 🤗

Citation

@article{kesgin2024introducing,
  title={Introducing cosmosGPT: Monolingual Training for Turkish Language Models},
  author={Kesgin, H Toprak and Yuce, M Kaan and Dogan, Eren and Uzun, M Egemen and Uz, Atahan and Seyrek, H Emre and Zeer, Ahmed and Amasyali, M Fatih},
  journal={arXiv preprint arXiv:2404.17336},
  year={2024}
}

Contact

COSMOS AI Research Group, Yildiz Technical University Computer Engineering Department
https://cosmos.yildiz.edu.tr/
cosmos@yildiz.edu.tr

Downloads last month
61
Safetensors
Model size
774M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ytu-ce-cosmos/previous-token-prediction-turkish-gpt2-large