raidhon commited on
Commit
ace98b8
1 Parent(s): 3ea5a71

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - text-generation
7
+ - large-language-model
8
+ - orpo
9
+ dataset:
10
+ - jondurbin/truthy-dpo-v0.1
11
+ - AlekseyKorshuk/evol-codealpaca-v1-dpo
12
+ - argilla/distilabel-intel-orca-dpo-pairs
13
+ - argilla/ultrafeedback-binarized-avg-rating-for-dpo-filtered
14
+ - snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset
15
+ - mlabonne/orpo-dpo-mix-40k
16
+
17
+ base_model:
18
+ - TinyLlama/TinyLlama-1.1B-Chat-v1.0
19
+ model-index:
20
+ - name: Coven Tiny 1.1B
21
+ description: "Coven Tiny 1.1B is a derivative of TinyLlama 1.1B Chat, fine-tuned to perform specialized tasks involving deeper understanding and reasoning over context. This model exhibits strong capabilities in both general language understanding and task-specific challenges."
22
+ results:
23
+ - task:
24
+ type: text-generation
25
+ name: Winogrande Challenge
26
+ dataset:
27
+ name: Winogrande
28
+ type: winogrande
29
+ config: winogrande_xl
30
+ split: test
31
+ args:
32
+ num_few_shot: 5
33
+ metrics:
34
+ - type: accuracy
35
+ value: 61.17
36
+ name: accuracy
37
+ - task:
38
+ type: text-generation
39
+ name: TruthfulQA Generation
40
+ dataset:
41
+ name: TruthfulQA
42
+ type: truthful_qa
43
+ config: multiple_choice
44
+ split: validation
45
+ args:
46
+ num_few_shot: 0
47
+ metrics:
48
+ - type: accuracy
49
+ value: 34.31
50
+ name: accuracy
51
+ - task:
52
+ type: text-generation
53
+ name: PIQA Problem Solving
54
+ dataset:
55
+ name: PIQA
56
+ type: piqa
57
+ split: validation
58
+ args:
59
+ num_few_shot: 5
60
+ metrics:
61
+ - type: accuracy
62
+ value: 71.06
63
+ name: accuracy
64
+ - task:
65
+ type: text-generation
66
+ name: OpenBookQA Facts
67
+ dataset:
68
+ name: OpenBookQA
69
+ type: openbookqa
70
+ split: test
71
+ args:
72
+ num_few_shot: 5
73
+ metrics:
74
+ - type: accuracy
75
+ value: 30.60
76
+ name: accuracy
77
+ - task:
78
+ type: text-generation
79
+ name: MMLU Knowledge Test
80
+ dataset:
81
+ name: MMLU
82
+ type: mmlu
83
+ config: all
84
+ split: test
85
+ args:
86
+ num_few_shot: 5
87
+ metrics:
88
+ - type: accuracy
89
+ value: 38.03
90
+ name: accuracy
91
+ - task:
92
+ type: text-generation
93
+ name: Hellaswag Contextual Completions
94
+ dataset:
95
+ name: Hellaswag
96
+ type: hellaswag
97
+ split: validation
98
+ args:
99
+ num_few_shot: 10
100
+ metrics:
101
+ - type: accuracy
102
+ value: 43.44
103
+ name: accuracy
104
+ - task:
105
+ type: text-generation
106
+ name: GSM8k Mathematical Reasoning
107
+ dataset:
108
+ name: GSM8k
109
+ type: gsm8k
110
+ split: test
111
+ args:
112
+ num_few_shot: 5
113
+ metrics:
114
+ - type: accuracy
115
+ value: 14.71
116
+ name: exact match (strict)
117
+ - type: accuracy
118
+ value: 14.63
119
+ name: exact match (flexible)
120
+ - task:
121
+ type: text-generation
122
+ name: BoolQ Question Answering
123
+ dataset:
124
+ name: BoolQ
125
+ type: boolq
126
+ split: validation
127
+ args:
128
+ num_few_shot: 5
129
+ metrics:
130
+ - type: accuracy
131
+ value: 65.20
132
+ name: accuracy
133
+ - task:
134
+ type: text-generation
135
+ name: ARC Challenge
136
+ dataset:
137
+ name: ARC Challenge
138
+ type: ai2_arc
139
+ split: test
140
+ args:
141
+ num_few_shot: 25
142
+ metrics:
143
+ - type: accuracy
144
+ value: 34.81
145
+ name: accuracy
146
+ ---
147
+
148
+
149
+
150
+ # 🤏 Coven Tiny 1.1B 32K ORPO
151
+
152
+
153
+ Coven Tiny 1.1B 32K is an improved iteration of TinyLlama-1.1B-Chat-v1.0, refined to expand processing capabilities and refine language model preferences. This model includes a significantly increased context limit of 32K tokens, allowing for more extensive data processing and understanding of complex language scenarios. In addition, Coven Tiny 1.1B 32K uses the innovative ORPO (Monolithic Preference Optimization without Reference Model) technique. ORPO simplifies the fine-tuning process by directly optimizing the odds ratio to distinguish between favorable and unfavorable generation styles, effectively improving model performance without the need for an additional preference alignment step.
154
+
155
+ ## Model Details
156
+
157
+ * **Model name**: Coven Tiny 1.1B 32K ORPO alpha
158
+ * **Fine-tuned by**: raidhon
159
+ * **Base model**: [TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
160
+ * **Parameters**: 1.1B
161
+ * **Context**: 32K
162
+ * **Language(s)**: Multilingual
163
+ * **License**: Apache2.0
164
+
165
+
166
+
167
+ ### Eval
168
+
169
+
170
+ | Task | Model | Metric | Value | Change (%) |
171
+ |---------------------|-----------------------|----------------|----------|-----------------|
172
+ | Winogrande | TinyLlama 1.1B Chat | Accuracy | 61.56% | - |
173
+ | | Coven Tiny 1.1B | Accuracy | 61.17% | -0.63% |
174
+ | TruthfulQA | TinyLlama 1.1B Chat | Accuracy | 30.43% | - |
175
+ | | Coven Tiny 1.1B | Accuracy | 34.31% | +12.75% |
176
+ | PIQA | TinyLlama 1.1B Chat | Accuracy | 74.10% | - |
177
+ | | Coven Tiny 1.1B | Accuracy | 71.06% | -4.10% |
178
+ | OpenBookQA | TinyLlama 1.1B Chat | Accuracy | 27.40% | - |
179
+ | | Coven Tiny 1.1B | Accuracy | 30.60% | +11.68% |
180
+ | MMLU | TinyLlama 1.1B Chat | Accuracy | 24.31% | - |
181
+ | | Coven Tiny 1.1B | Accuracy | 38.03% | +56.44% |
182
+ | Hellaswag | TinyLlama 1.1B Chat | Accuracy | 45.69% | - |
183
+ | | Coven Tiny 1.1B | Accuracy | 43.44% | -4.92% |
184
+ | GSM8K (Strict) | TinyLlama 1.1B Chat | Exact Match | 1.82% | - |
185
+ | | Coven Tiny 1.1B | Exact Match | 14.71% | +708.24% |
186
+ | GSM8K (Flexible) | TinyLlama 1.1B Chat | Exact Match | 2.65% | - |
187
+ | | Coven Tiny 1.1B | Exact Match | 14.63% | +452.08% |
188
+ | BoolQ | TinyLlama 1.1B Chat | Accuracy | 58.69% | - |
189
+ | | Coven Tiny 1.1B | Accuracy | 65.20% | +11.09% |
190
+ | ARC Easy | TinyLlama 1.1B Chat | Accuracy | 66.54% | - |
191
+ | | Coven Tiny 1.1B | Accuracy | 57.24% | -13.98% |
192
+ | ARC Challenge | TinyLlama 1.1B Chat | Accuracy | 34.13% | - |
193
+ | | Coven Tiny 1.1B | Accuracy | 34.81% | +1.99% |
194
+ | Humaneval | TinyLlama 1.1B Chat | Pass@1 | 10.98% | - |
195
+ | | Coven Tiny 1.1B | Pass@1 | 10.37% | -5.56% |
196
+ | Drop | TinyLlama 1.1B Chat | Score | 16.02% | - |
197
+ | | Coven Tiny 1.1B | Score | 16.36% | +2.12% |
198
+ | BBH | Coven Tiny 1.1B | Average | 29.02% | - |
199
+
200
+
201
+
202
+ ## 💻 Usage
203
+
204
+ ```python
205
+ # Install transformers from source - only needed for versions <= v4.34
206
+ # pip install git+https://github.com/huggingface/transformers.git
207
+ # pip install accelerate
208
+
209
+ import torch
210
+ from transformers import pipeline
211
+
212
+ pipe = pipeline("text-generation", model="raidhon/coven_tiny_1.1b_32k_orpo_alpha", torch_dtype=torch.bfloat16, device_map="auto")
213
+
214
+ messages = [
215
+ {
216
+ "role": "system",
217
+ "content": "You are a friendly chatbot who always responds in the style of a pirate",
218
+ },
219
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
220
+ ]
221
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
222
+ outputs = pipe(prompt, max_new_tokens=2048, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
223
+ print(outputs[0]["generated_text"])
224
+ ```
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "raidhon/coven_tiny_1.1b_32k_orpo_alpha",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5632,
14
+ "max_position_embeddings": 32768,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 22,
18
+ "num_key_value_heads": 4,
19
+ "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-05,
21
+ "rope_scaling": null,
22
+ "rope_theta": 1000000.0,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "float16",
25
+ "transformers_version": "4.39.3",
26
+ "use_cache": true,
27
+ "vocab_size": 32000
28
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.39.3"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c6bf1de78c73f368c293c71f46e74e95dded9a96d34ee7da90a6253ff4fdfc1
3
+ size 2200119664
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ system_message + '\\n' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ 'Human: ' + content + '\\nAssistant: ' }}{% elif message['role'] == 'assistant' %}{{ content + '</s>' + '\\n' }}{% endif %}{% endfor %}",
33
+ "clean_up_tokenization_spaces": false,
34
+ "eos_token": "</s>",
35
+ "legacy": false,
36
+ "model_max_length": 1000000000000000019884624838656,
37
+ "pad_token": "</s>",
38
+ "padding_side": "left",
39
+ "sp_model_kwargs": {},
40
+ "spaces_between_special_tokens": false,
41
+ "split_special_tokens": false,
42
+ "tokenizer_class": "LlamaTokenizer",
43
+ "trust_remote_code": false,
44
+ "unk_token": "<unk>",
45
+ "use_default_system_prompt": false,
46
+ "use_fast": true
47
+ }