RichardErkhov commited on
Commit
1b1d064
1 Parent(s): ed83b8c

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +163 -0
README.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ turkish-gpt2-large-750m-instruct-v0.1 - bnb 4bits
11
+ - Model creator: https://huggingface.co/ytu-ce-cosmos/
12
+ - Original model: https://huggingface.co/ytu-ce-cosmos/turkish-gpt2-large-750m-instruct-v0.1/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ widget:
20
+ - text: "Türkiye'nin başkenti neresidir?"
21
+ example_title: "Başkent"
22
+ - text: "Su kıtlığı sorunlarına karşı çözümler neler olabilir?"
23
+ example_title: "Su Kıtlığı"
24
+ - text: "Yapay zeka işsizlik riski yaratıyor mu?"
25
+ example_title: "Yapay Zeka İşsizlik Riski"
26
+ - text: "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."
27
+ example_title: "Başlık Üret"
28
+ - text: "Aşağıdaki bağlamda orijinal bir şey söyleyin: Bir iş görüşmesini yeni bitirdiniz ve işverene bu pozisyona olan ilginizi göstermek istiyorsunuz."
29
+ example_title: "Role Gir"
30
+ - text: "Bir şirketin siber güvenliğini güçlendirmek için alınması gereken önlemler nelerdir?"
31
+ example_title: "Siber Güvenlik"
32
+ - text: "En popüler 5 programlama dili nedir?"
33
+ example_title: "Programlama Dilleri"
34
+ - text: "İnsanlık tarihinde en büyük etki yaratan birkaç icadı say."
35
+ example_title: "İcatlar"
36
+ - text: "Çok sayıda kitap okumak bir çocuğa hangi becerileri kazandırır?"
37
+ example_title: "Kitap Okumak"
38
+ - text: "Şu konuyla ilgili 5 anahtar kelimeden oluşan bir liste oluşturun: iklim değişikliği"
39
+ example_title: "İklim Değişikliği Anahtar Kelimeler"
40
+ - text: "Bilgisayarların faydaları nelerdir?"
41
+ example_title: "Bilgisayarların Faydaları"
42
+
43
+ license: mit
44
+ language:
45
+ - tr
46
+ pipeline_tag: text-generation
47
+ base_model: ytu-ce-cosmos/turkish-gpt2-large
48
+
49
+ tags:
50
+ - Turkish
51
+ - turkish
52
+ - gpt2
53
+ - instruction-tuning
54
+ - alpaca
55
+ ---
56
+
57
+ <img src="./model_cover.png" width="400px"/>
58
+
59
+ # turkish-gpt2-large-750m-instruct-v0.1
60
+
61
+ Derived from ytu-ce-cosmos/turkish-gpt2-large, this model is a Turkish Language Model (LLM) finetuned with a dataset consisting of 35K instructions.
62
+ 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.
63
+
64
+ ## Quickstart
65
+
66
+ ```python
67
+ import torch
68
+ from transformers import AutoTokenizer, GPT2LMHeadModel
69
+ from transformers import pipeline
70
+
71
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
72
+ device_id = 0 if torch.cuda.is_available() else -1
73
+
74
+ model = GPT2LMHeadModel.from_pretrained("ytu-ce-cosmos/turkish-gpt2-large-750m-instruct-v0.1").to(device)
75
+
76
+ tokenizer = AutoTokenizer.from_pretrained("ytu-ce-cosmos/turkish-gpt2-large-750m-instruct-v0.1")
77
+
78
+ text_generator = pipeline('text-generation', model=model, tokenizer=tokenizer, device=device_id, max_new_tokens=256)
79
+
80
+ def get_model_response(instruction):
81
+ instruction_prompt = f"### Kullanıcı:\n{instruction}\n### Asistan:\n"
82
+ result = text_generator(instruction_prompt)
83
+ generated_response = result[0]['generated_text']
84
+ return generated_response[len(instruction_prompt):]
85
+
86
+ model_response = get_model_response("Evde egzersiz yapmanın avantajlarını açıkla.")
87
+ print(model_response)
88
+ """
89
+ 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.
90
+ """
91
+ ```
92
+
93
+ To use the chat template:
94
+
95
+ ```python
96
+ chat_generator = pipeline("conversational", model=model, tokenizer=tokenizer, device=device_id, max_new_tokens=256)
97
+
98
+ messages = [
99
+ {"role": "user", "content": "Evde egzersiz yapmanın avantajlarını açıkla."}
100
+ ]
101
+
102
+ chat_outputs = chat_generator(messages)
103
+ print(chat_outputs)
104
+ """
105
+ Conversation id: 236ffc4a-2a36-4191-92fb-90d6753df1ae
106
+ user: Evde egzersiz yapmanın avantajlarını açıkla.
107
+ assistant: Evde egzersiz yapmak, gelişmiş fiziksel ve zihinsel sağlık için sayısız avantaj sunar. Düzenli egzersiz, stresi azaltmaya, kas gücünü artırmaya ve genel sağlığı iyileştirmeye yardımcı olabilir. Ayrıca, evde egzersiz yapmak, daha iyi uyku kalitesi, artan enerji seviyeleri ve gelişmiş bilişsel işlevler gibi daha iyi fiziksel ve zihinsel sağlık sonuçları sağlayabilir. Evde egzersiz yapmak ayrıca, gelişmiş esneklik, denge ve koordinasyon, gelişmiş kalp sağlığı ve gelişmiş kemik sağlığı dahil olmak üzere gelişmiş fiziksel ve zihinsel sağlık yararları sağlayabilir.
108
+ """
109
+ ```
110
+
111
+ ----------
112
+
113
+ ### Training Details
114
+
115
+ - We've meticulously fine-tuned this model with a 35,000-instruction Turkish dataset to enhance its precision and adaptability.
116
+
117
+ - By employing LoRA (Low-Rank Adaptation), we have successfully propelled this model to the pinnacle of its performance capabilities.
118
+ - **LoRA** Config:
119
+ * rank = 256
120
+ * lora_alpha = 512
121
+ * lora_dropout = 0.05
122
+ * bias="none"
123
+ * task_type="CAUSAL_LM"
124
+
125
+ - In addition to monitoring loss, we successfully integrated Rouge calculations into our system's evaluation metrics.
126
+ - One of the innovative techniques we adopted involved employing a model to cleanse our data.
127
+
128
+ Other relevant information can be found in the [paper](https://arxiv.org/abs/2404.17336).
129
+
130
+ ----------
131
+
132
+ ### Model Description
133
+ - **Developed by:** ytu-ce-cosmos
134
+ - **Finetuned from model :** `ytu-ce-cosmos/turkish-gpt2-large`
135
+
136
+ # Acknowledgments
137
+ - Thanks to the generous support from the Hugging Face team, it is possible to download models from their S3 storage 🤗
138
+ - Research supported with Cloud TPUs from Google's TPU Research Cloud (TRC)
139
+
140
+ ----------
141
+
142
+ ### Citation
143
+ ```bibtex
144
+ @article{kesgin2024introducing,
145
+ title={Introducing cosmosGPT: Monolingual Training for Turkish Language Models},
146
+ 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},
147
+ journal={arXiv preprint arXiv:2404.17336},
148
+ year={2024}
149
+ }
150
+ ```
151
+
152
+ ----------
153
+
154
+ ### Framework versions
155
+
156
+ - PEFT 0.9.0
157
+
158
+ ### Contact
159
+ COSMOS AI Research Group, Yildiz Technical University Computer Engineering Department <br>
160
+ https://cosmos.yildiz.edu.tr/ <br>
161
+ cosmos@yildiz.edu.tr
162
+
163
+