tkesgin's picture
Update README.md (#2)
596b22f verified
|
raw
history blame
No virus
4.91 kB
metadata
widget:
  - text: |
      ### Kullanıcı:
      Türkiye'nin başkenti neresidir?
      ### Asistan:
    example_title: Başkent
  - text: |
      ### Kullanıcı:
      Su kıtlığı sorunlarına karşı çözümler neler olabilir?
      ### Asistan:
    example_title: Su kıtlığı
  - text: |
      ### Kullanıcı:
      Yapay zeka işsizlik riski yaratıyor mu?
      ### Asistan:
    example_title: Yapay zeka işsizlik
  - text: >
      ### Kullanıcı:

      Aşağıdaki makale için bir başlık önerin: Bu makale, işletmelerin
      müşterilerle iletişim kurma biçiminde devrim yaratmada internetin oynadığı
      rolü incelemektedir.

      ### Asistan:
    example_title: Makale Başlık
  - text: >
      ### Kullanıcı:

      Aşağıdaki bağlamda orijinal bir şey söyleyin: Bir  görüşmesini yeni
      bitirdiniz ve işverene bu pozisyona olan ilginizi göstermek istiyorsunuz.

      ### Asistan:
    example_title: İş Görüşmesi
  - text: |
      ### Kullanıcı:
      Sülfürik asit mi daha asidik bir sıvıdır yoksa su mu?
      ### Asistan:
    example_title: Sülfürik asit
  - text: |
      ### Kullanıcı:
      En popüler 5 programlama dili nedir?
      ### Asistan:
    example_title: programlama dili
  - text: |
      ### Kullanıcı:
      İnsanlık tarihinde en büyük etki yaratan birkaç icadı say.
      ### Asistan:
    example_title: icat
  - text: |
      ### Kullanıcı:
      Çok sayıda kitap okumak bir çocuğa hangi becerileri kazandırır?
      ### Asistan:
    example_title: kitap okumak
  - text: >
      ### Kullanıcı:

      Şu konuyla ilgili 5 anahtar kelimeden oluşan bir liste oluşturun: iklim
      değişikliği

      ### Asistan:
    example_title: iklim değişikliği anahtar kelime
  - text: |
      ### Kullanıcı:
      Bilgisayarların faydaları nelerdir?
      ### Asistan:
    example_title: Bilgisayarların faydaları
license: mit
language:
  - tr
pipeline_tag: text-generation
tags:
  - Turkish
  - turkish
  - gpt2
  - instruction-tuning
  - alpaca

turkish-gpt2-large-750m-instruct-v0.1

Derived from ytu-ce-cosmos/turkish-gpt2-large, this model is a Turkish Language Model (LLM) finetuned with a dataset consisting of 35K instructions. Due to the diverse nature of the training data, which includes websites, books, and other text sources, this model can exhibit biases and generate wrong answers. Users should be aware of these biases and use the model responsibly.

Quickstart

import torch
from transformers import AutoTokenizer, GPT2LMHeadModel
from transformers import pipeline

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model = GPT2LMHeadModel.from_pretrained("ytu-ce-cosmos/turkish-gpt2-large-750m-instruct-v0.1").to(device)

tokenizer = AutoTokenizer.from_pretrained("ytu-ce-cosmos/turkish-gpt2-large-750m-instruct-v0.1")

text_generator = pipeline('text-generation', model=model, tokenizer=tokenizer, max_new_tokens=256)

def get_model_response(instruction):
    instruction_prompt = f"### Kullanıcı:\n{instruction}\n### Asistan:\n"
    result = text_generator(instruction_prompt)
    generated_response = result[0]['generated_text']
    return generated_response[len(instruction_prompt):]

print(get_model_response("Evde egzersiz yapmanın avantajlarını açıkla."))
"""
Evde egzersiz yapmak, gelişmiş fiziksel ve zihinsel sağlık için harika bir yoldur. Düzenli egzersizin, artan enerji seviyeleri, gelişmiş kas gücü ve esnekliği, gelişmiş uyku kalitesi ve daha iyi genel esenlik dahil olmak üzere birçok faydası vardır. Evde egzersiz yapmak ayrıca stresi azaltmaya, kas gücünü artırmaya ve genel sağlığı iyileştirmeye yardımcı olabilir.
"""

Training Details

  • We've meticulously fine-tuned this model with a 35,000-instruction Turkish dataset to enhance its precision and adaptability.

  • By employing LoRA (Low-Rank Adaptation), we have successfully propelled this model to the pinnacle of its performance capabilities.

  • LoRA Config:

    • rank = 256
    • lora_alpha = 512
    • lora_dropout = 0.05
    • bias="none"
    • task_type="CAUSAL_LM"
  • In addition to monitoring loss, we successfully integrated Rouge calculations into our system's evaluation metrics.

  • One of the innovative techniques we adopted involved employing a model to cleanse our data.

Further details will be provided in the forthcoming paper.


Model Description

  • Developed by: cosmos-ytuce
  • Finetuned from model : ytu-ce-cosmos/turkish-gpt2-large

Acknowledgments

  • Thanks to the generous support from the Hugging Face team, it is possible to download models from their S3 storage 🤗

Citation

Paper coming soon 😊


Framework versions

  • PEFT 0.9.0

Contact

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