Codex07 commited on
Commit
68619fc
·
verified ·
1 Parent(s): 2dce28f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -16
README.md CHANGED
@@ -2,6 +2,7 @@
2
  library_name: peft
3
  model_name: lora_1B_TR
4
  tags:
 
5
  - lora
6
  - sft
7
  - transformers
@@ -9,31 +10,69 @@ tags:
9
  - unsloth
10
  licence: license
11
  pipeline_tag: text-generation
 
 
 
 
 
 
12
  ---
13
- - base_model:adapter:/home/tk/Desktop/Folder/projects/AI/Models/Llama-3.2-1B-Instruct/
14
- base_model: /home/tk/Desktop/Folder/projects/AI/Models/Llama-3.2-1B-Instruct/
15
 
16
 
17
  # Model Card for lora-out-1B
18
 
19
- This model is a fine-tuned version of [None](https://huggingface.co/None).
20
- It has been trained using [TRL](https://github.com/huggingface/trl).
21
 
22
  ## Quick start
23
 
24
  ```python
25
- from transformers import pipeline
26
-
27
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
28
- generator = pipeline("text-generation", model="None", device="cuda")
29
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
30
- print(output["generated_text"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  ```
32
 
33
  ## Training procedure
 
 
34
 
35
-
36
-
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  This model was trained with SFT.
39
 
@@ -48,10 +87,7 @@ This model was trained with SFT.
48
 
49
  ## Citations
50
 
51
-
52
-
53
  Cite TRL as:
54
-
55
  ```bibtex
56
  @misc{vonwerra2022trl,
57
  title = {{TRL: Transformer Reinforcement Learning}},
@@ -61,4 +97,4 @@ Cite TRL as:
61
  publisher = {GitHub},
62
  howpublished = {\url{https://github.com/huggingface/trl}}
63
  }
64
- ```
 
2
  library_name: peft
3
  model_name: lora_1B_TR
4
  tags:
5
+ - meta-llama/Llama-3.2-1B-Instruct
6
  - lora
7
  - sft
8
  - transformers
 
10
  - unsloth
11
  licence: license
12
  pipeline_tag: text-generation
13
+ base_model: meta-llama/Llama-3.2-1B-Instruct
14
+ datasets:
15
+ - kadirnar/combined-turkish-datasets-v5
16
+ language:
17
+ - tr
18
+ - en
19
  ---
20
+
 
21
 
22
 
23
  # Model Card for lora-out-1B
24
 
25
+ This model is a fine-tuned version of 'meta-llama/Llama-3.2-1B-Instruct'.
26
+
27
 
28
  ## Quick start
29
 
30
  ```python
31
+ from unsloth import FastLanguageModel
32
+ from peft import PeftModel
33
+ from transformers import AutoTokenizer
34
+
35
+ BASE = "meta-llama/Llama-3.2-1B-Instruct"
36
+ ADAPTER = "Codex07/Lora_1B_TR"
37
+
38
+ # Load Model
39
+ model, tok = FastLanguageModel.from_pretrained(
40
+ model_name=BASE, max_seq_length=2048, load_in_4bit=False, dtype=None, device_map="auto"
41
+ )
42
+ # Load Adaptor
43
+ model = PeftModel.from_pretrained(model, ADAPTER) # adapter’ı Unsloth modeline tak
44
+ FastLanguageModel.for_inference(model)
45
+
46
+ # Test
47
+ messages = [
48
+ {"role":"system","content":"You are AI assistant. Give user answers"},# Sen bir Yapay Zeka Asistanısısın. kullanıcıdan gelen sorulara resmi cevap ver.
49
+ {"role":"user","content":"Hi, can you help me?"},
50
+ {"role":"assistant","content":"I would like to help you."},
51
+ {"role":"user","content":"How many tools do you have?"},
52
+ ]
53
+ prompt = tok.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
54
+ out = model.generate(prompt, max_new_tokens=2048)
55
+ print(tok.decode(out[0, prompt.shape[-1]:], skip_special_tokens=True))
56
  ```
57
 
58
  ## Training procedure
59
+ Half of 'kadirnar/combined-turkish-datasets-v5' Turkish dataset used.
60
+ Dataset divided into chunks by size 65k.
61
 
62
+ ```bibtex
63
+ 1> 2:50:33 / 2.746500 -> 1.771400 / 5.1.0
64
+ 2> 3:00:00 / 1.7 -> 1.7 / 5.1.1
65
+ 3> 2:18:19 / 1.859100 -> 1.474300 / 5.1.2
66
+ 4> 3:15:13 / 1.421800 -> 1.122000 / 5.1.3
67
+ 5> 2:50:00 / 1.746600 -> 1.629600 / 5.1.0
68
+ 6> 2:44:46 / 1.745000 -> 1.653300 / 5.1.1
69
+ 7> 2:07:00 / 1.478200 -> 1.357400 / 5.1.2
70
+ 8> 3:11:54 / 1.174700 -> 1.046100 / 5.1.3
71
+ 9> 3:12:39 / 1.117600 -> 0.796700 / 5.2.0
72
+ 10>1:00:57 / 2.217400 -> 1.741400 / 5.2.1
73
+ 11>1:30:04 / 2.919900 -> 2.534300 / 5.2.2
74
+ 12>1:30:05 / 2.534300 -> 2.320100 / 5.2.2
75
+ ```
76
 
77
  This model was trained with SFT.
78
 
 
87
 
88
  ## Citations
89
 
 
 
90
  Cite TRL as:
 
91
  ```bibtex
92
  @misc{vonwerra2022trl,
93
  title = {{TRL: Transformer Reinforcement Learning}},
 
97
  publisher = {GitHub},
98
  howpublished = {\url{https://github.com/huggingface/trl}}
99
  }
100
+ ```