oguzhandoganoglu commited on
Commit
83b553e
1 Parent(s): 41fef3c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -3
README.md CHANGED
@@ -1,3 +1,71 @@
1
- ---
2
- license: llama3.1
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3.1
3
+ language:
4
+ - tr
5
+ base_model: meta-llama/Meta-Llama-3.1-8B
6
+ ---
7
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6639e48c27ef2d37a71eb4aa/Ds_KOVYwhRQ1FQY8S4WqO.png"
8
+ alt="CEREBRUM LLM" width="420"/>
9
+
10
+
11
+ # CERE V2 -LLMA-3.1-8b-TR
12
+
13
+ This model is an fine-tuned version of a Llama3.1 8b Large Language Model (LLM) for Turkish. It was trained on a high quality Turkish instruction sets created from various open-source and internal resources. Turkish Instruction dataset carefully annotated to carry out Turkish instructions in an accurate and organized manner.
14
+
15
+ ## Model Details
16
+
17
+ - **Base Model**: LLMA 3.1 8B based LLM
18
+ - **Tokenizer Extension**: Specifically extended for Turkish
19
+ - **Training Dataset**: Cleaned Turkish raw data with 5 billion tokens, custom Turkish instruction sets
20
+ - **Training Method**: Initially with DORA, followed by fine-tuning with LORA
21
+
22
+ ## Benchmark Results
23
+
24
+ - **Winogrande_tr**: 56.16
25
+ - **TruthfulQA_tr_v0.2**: 47.46
26
+ - **Mmlu_tr_v0.2**: 46.46
27
+ - **HellaSwag_tr_v0.2**: 48.87
28
+ - **GSM8k_tr_v0.2**: 25.43
29
+ - **Arc_tr_v0.2**: 41.97
30
+
31
+
32
+ ## Usage Examples
33
+
34
+ ```python
35
+
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+ device = "cuda" # the device to load the model onto
38
+
39
+ model = AutoModelForCausalLM.from_pretrained(
40
+ "Cerebrum/cere-llama-3.1-8B-tr",
41
+ torch_dtype="auto",
42
+ device_map="auto"
43
+ )
44
+ tokenizer = AutoTokenizer.from_pretrained("Cerebrum/cere-llama-3.1-8B-tr")
45
+
46
+ prompt = "Python'da ekrana 'Merhaba Dünya' nasıl yazılır?"
47
+ messages = [
48
+ {"role": "system", "content": "Sen, Cerebrum Tech tarafından üretilen ve verilen talimatları takip ederek en iyi cevabı üretmeye çalışan yardımcı bir yapay zekasın."},
49
+ {"role": "user", "content": prompt}
50
+ ]
51
+ text = tokenizer.apply_chat_template(
52
+ messages,
53
+ tokenize=False,
54
+ add_generation_prompt=True
55
+ )
56
+ model_inputs = tokenizer([text], return_tensors="pt").to(device)
57
+
58
+ generated_ids = model.generate(
59
+ model_inputs.input_ids,
60
+ temperature=0.3,
61
+ top_k=50,
62
+ top_p=0.9,
63
+ max_new_tokens=512,
64
+ repetition_penalty=1,
65
+ )
66
+ generated_ids = [
67
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
68
+ ]
69
+
70
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
71
+ ```