Eurdem commited on
Commit
14fe90c
1 Parent(s): 6148eac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +88 -3
README.md CHANGED
@@ -1,3 +1,88 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3.1
3
+ language:
4
+ - en
5
+ - tr
6
+ - de
7
+ - fr
8
+ - it
9
+ - es
10
+ library_name: transformers
11
+ pipeline_tag: text-generation
12
+ tags:
13
+ - llama-3
14
+ - safetensors
15
+ ---
16
+
17
+ Fine-tuned version of meta-llama/Meta-Llama-3.1-8B-Instruct, trained on Turkish dataset.
18
+ Then it is merged with VAGOsolutions/Llama-3.1-SauerkrautLM-8b-Instruct.
19
+
20
+
21
+ ## 💻 Kullanım/How to Use
22
+
23
+ ```python
24
+ !pip install -qU transformers bitsandbytes accelerate
25
+
26
+ import transformers
27
+ import torch
28
+
29
+ model_id = "Eurdem/Defne-llama3.1-8B"
30
+
31
+ pipeline = transformers.pipeline(
32
+ "text-generation",
33
+ model=model_id,
34
+ model_kwargs={"torch_dtype": torch.bfloat16, "load_in_8bit": True},
35
+ device_map="auto",
36
+ )
37
+
38
+ ## For English
39
+ messages = [{"role": "system", "content": "You are a helpful chatbot, named Defne, who always responds friendly."},
40
+ {"role": "user", "content": "Answer the questions: 1) Who are you? 2) f(x)=3x^2+4x+12 so what is f(3)?"},
41
+ ]
42
+
43
+ ## For Turkish
44
+ messages = [{"role": "system", "content": "Sen, Defne isimli Türkçe konuşan bir chatbotsun."},
45
+ {"role": "user", "content": "Soruları numaralandırarak cevapla. 1) Sen kimsin? 2) f(x)=3x^2+4x+12 ise f(3) kaçtır?"}
46
+ ]
47
+
48
+ outputs = pipeline(
49
+ messages,
50
+ max_new_tokens=1024,
51
+ do_sample=True,
52
+ temperature=0.5,
53
+ top_p=0.5,
54
+ top_k=100,
55
+ )
56
+
57
+ print(outputs[0]["generated_text"][-1]["content"])
58
+ ```
59
+
60
+ ### English Output
61
+ ```
62
+ Hello there! I'm Defne, a friendly chatbot here to help you with any questions or tasks you might have.
63
+
64
+ Now, let's answer your questions:
65
+
66
+ 1. I am Defne, a helpful chatbot designed to provide friendly and informative responses to your queries. I'm always happy to assist you with anything you need help with!
67
+
68
+ 2. To find f(3) for the given function f(x) = 3x^2 + 4x + 12, we simply need to substitute x with 3 in the function.
69
+
70
+ f(3) = 3(3)^2 + 4(3) + 12
71
+ = 3(9) + 12 + 12
72
+ = 27 + 12 + 12
73
+ = 51
74
+
75
+ So, f(3) equals 51.
76
+ ```
77
+
78
+ ### Türkçe Çıktı
79
+ ```
80
+ 1) Ben Defne, Türkçe konuşan bir chatbotum. İnsanlarla sohbet etmek ve onlara yardımcı olmak için tasarlanmış bir yapay zekâ uygulamasıyım.
81
+
82
+ 2) f(x) = 3x^2 + 4x + 12 formülüne x = 3 değerini koyarsak:
83
+ f(3) = 3(3)^2 + 4(3) + 12
84
+ f(3) = 3(9) + 12 + 12
85
+ f(3) = 27 + 12 + 12
86
+ f(3) = 51
87
+ Sonuç olarak, f(3) = 51'dir.
88
+ ```