tarikkaankoc7 commited on
Commit
3384eb1
1 Parent(s): 7b91297

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -3
README.md CHANGED
@@ -4,9 +4,102 @@ license: apache-2.0
4
 
5
  <h1 style="text-align: center;">TKK-LLaMA3-8B-Elite-V1.0</h1>
6
 
7
- <div style="text-align: center;">
8
- <img src="https://cdn-uploads.huggingface.co/production/uploads/62bdd8065f304e8ea762287f/yjhKqN_bkVuJRa7JMtMBW.png" alt="TKK-LLaMA3-8B-Elite-V1.0" />
9
- </div>
10
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
 
4
 
5
  <h1 style="text-align: center;">TKK-LLaMA3-8B-Elite-V1.0</h1>
6
 
7
+ <p style="text-align: center;">
8
+ TKK-LLaMA3-8B-Elite-V1.0, a generative model built upon the LLaMA 8B architecture, represents my individual undergraduate graduation project. Developed during my studies in Software Engineering at Malatya Turgut Özal University, this project stands as a culmination of my academic endeavors. I extend my sincere appreciation to Assoc. Prof. Dr. Harun Bingöl, who served as both my department chair and thesis advisor. His invaluable guidance, unwavering support, and mentorship have significantly shaped my educational and research experiences. I am deeply grateful for his continuous encouragement, insightful feedback, and unwavering dedication. Thank you, Dr. Bingöl...
9
+ </p>
10
 
11
 
12
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62bdd8065f304e8ea762287f/yjhKqN_bkVuJRa7JMtMBW.png)
13
+
14
+
15
+
16
+ <h2>Model Details</h2>
17
+
18
+ <p>
19
+ Training took 133 hours and 59 minutes for a total of 37,420 steps and was conducted on 8 Tesla V100 GPUs.
20
+ </p>
21
+
22
+
23
+ <ul>
24
+ <li><strong>Base Model:</strong> LLaMA 8B based LLM</li>
25
+ <li><strong>Model Developers:</strong> Tarık Kaan Koç</li>
26
+ <li><strong>Thesis Advisor:</strong> Assoc. Prof. Dr. Harun Bingöl</li>
27
+ <li><strong>Input:</strong> Text only</li>
28
+ <li><strong>Output:</strong> Text only</li>
29
+ <li><strong>Training Dataset:</strong> Cleaned Turkish raw data with 1 million raw instruction Turkish data, private</li>
30
+ <li><strong>Training Method:</strong> Fine-tuning with LORA</li>
31
+ </ul>
32
+
33
+ <h2>LORA Fine-Tuning Configuration</h2>
34
+
35
+
36
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62bdd8065f304e8ea762287f/TYPXlGYUilOJ5fsQDK9-O.png)
37
+
38
+ <ul>
39
+ <li><strong>lora_alpha:</strong> 16</li>
40
+ <li><strong>lora_dropout:</strong> 0.1</li>
41
+ <li><strong>r:</strong> 64</li>
42
+ <li><strong>bias:</strong> none</li>
43
+ <li><strong>task_type:</strong> CAUSAL_LM</li>
44
+ </ul>
45
+
46
+
47
+
48
+ ### Example Usage:
49
+
50
+ ```python
51
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer, pipeline
52
+ import torch
53
+
54
+ model_id = "tarikkaankoc7/TKK-LLaMA3-8B-Elite-V1.0"
55
+
56
+ model = AutoModelForCausalLM.from_pretrained(
57
+ model_id,
58
+ torch_dtype=torch.bfloat16,
59
+ device_map="auto",
60
+ trust_remote_code=True
61
+ )
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained(
64
+ model_id,
65
+ trust_remote_code=True
66
+ )
67
+
68
+ streamer = TextStreamer(tokenizer)
69
+
70
+ text_generation_pipeline = pipeline(
71
+ "text-generation",
72
+ model=model,
73
+ tokenizer=tokenizer,
74
+ model_kwargs={"torch_dtype": torch.bfloat16},
75
+ streamer=streamer
76
+ )
77
+
78
+ messages = [
79
+ {"role": "system", "content": "Sen yardımsever bir yapay zeka asistanısın ve kullanıcıların verdiği talimatlara doğrultusunda en iyi cevabı üretmeye çalışıyorsun."},
80
+ {"role": "user", "content": "Leonardo da Vinci'nin en ünlü tablosu hangisidir?"}
81
+ ]
82
+
83
+ prompt = tokenizer.apply_chat_template(
84
+ messages,
85
+ tokenize=False,
86
+ add_generation_prompt=True
87
+ )
88
+
89
+ terminators = [
90
+ tokenizer.eos_token_id
91
+ ]
92
+
93
+ outputs = text_generation_pipeline(
94
+ prompt,
95
+ max_new_tokens=2048,
96
+ eos_token_id=terminators,
97
+ do_sample=True,
98
+ temperature=0.6,
99
+ top_p=0.95
100
+ )
101
+
102
+ print(outputs[0]["generated_text"])
103
+ ```
104
+
105