Text Generation
Transformers
Safetensors
English
Russian
mistral
conversational
text-generation-inference
File size: 9,088 Bytes
adc7bb2
046d180
 
 
0f8ff39
 
046d180
 
 
0f8ff39
 
 
 
 
046d180
5c6547b
0c41343
 
 
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
0c41343
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
0c41343
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
0c41343
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
0c41343
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
0c41343
 
 
 
 
 
0f8ff39
0c41343
0f8ff39
0c41343
 
0f8ff39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adc7bb2
046d180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f8ff39
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
---
language:
- ru
- en
license: mit
library_name: transformers
tags:
- python
- code
datasets:
- MexIvanov/Vezora-Tested-22k-Python-Alpaca-ru
- MexIvanov/CodeExercise-Python-27k-ru
- zelkame/ru-stackoverflow-py
base_model: HuggingFaceH4/zephyr-7b-beta
pipeline_tag: conversational
model-index:
- name: zephyr-python-ru-merged
  results:
  - task:
      type: text-generation
    dataset:
      name: gsm8k
      type: gsm8k
    metrics:
    - type: Grade School Math 8K (5-Shot)
      value: 32.52
      name: Grade School Math 8K (5-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
    dataset:
      name: ai2_arc
      type: ai2_arc
    metrics:
    - type: AI2 Reasoning Challenge (25-Shot)
      value: 56.06
      name: AI2 Reasoning Challenge (25-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
    dataset:
      name: HellaSwag
      type: HellaSwag
    metrics:
    - type: HellaSwag (10-Shot)
      value: 82.06
      name: HellaSwag (10-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
    dataset:
      name: MMLU
      type: MMLU
    metrics:
    - type: MMLU (5-Shot)
      value: 60.02
      name: MMLU (5-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
    dataset:
      name: truthfulqa
      type: truthfulqa
    metrics:
    - type: truthfulqa:mc (0-Shot)
      value: 52.81
      name: truthfulqa:mc (0-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
    dataset:
      name: winogrande
      type: winogrande
    metrics:
    - type: winogrande (5-Shot)
      value: 76.95
      name: winogrande (5-Shot)
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: AI2 Reasoning Challenge (25-Shot)
      type: ai2_arc
      config: ARC-Challenge
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: acc_norm
      value: 56.06
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: HellaSwag (10-Shot)
      type: hellaswag
      split: validation
      args:
        num_few_shot: 10
    metrics:
    - type: acc_norm
      value: 82.06
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MMLU (5-Shot)
      type: cais/mmlu
      config: all
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 60.2
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: TruthfulQA (0-shot)
      type: truthful_qa
      config: multiple_choice
      split: validation
      args:
        num_few_shot: 0
    metrics:
    - type: mc2
      value: 52.81
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: Winogrande (5-shot)
      type: winogrande
      config: winogrande_xl
      split: validation
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 76.95
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: GSM8k (5-shot)
      type: gsm8k
      config: main
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 32.52
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MexIvanov/zephyr-python-ru-merged
      name: Open LLM Leaderboard
---

# Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->



## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->



- **Developed by:** C.B. Pronin, A.V. Volosova, A.V. Ostroukh, Yu.N. Strogov, V.V. Kurbatov, A.S. Umarova.
- **Model type:** Base model HuggingFaceH4/zephyr-7b-beta merged with LoRA (Peft) adapter model MexIvanov/zephyr-python-ru trained on a mix of publicly available data and machine-translated synthetic python coding datasets.
- **Language(s) (NLP):** Russian, English, Python
- **License:** MIT
- **Finetuned from model:** HuggingFaceH4/zephyr-7b-beta

### Model Sources

<!-- Provide the basic links for the model. -->

- **Repository:** Comming soon...
- **Paper:** Comming soon...

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
An experimental finetune of Zephyr-7b-beta, aimed at improving coding performance and support for coding-related instructions written in Russian language.

### Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

Instruction-based coding in Python, based of instructions written in natural language (English or Russian)

Prompt template - Zephyr:
```  
<|system|>
</s>
<|user|>
{prompt}</s>
<|assistant|>
```  

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->
This adapter model is intended (but not limited) for research usage only. It was trained on a code based instruction set and it does not have any moderation mechanisms. Use at your own risk, we are not responsible for any usage or output of this model.

Quote from Zephyr (base-model) repository: "Zephyr-7B-β has not been aligned to human preferences for safety within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base model (mistralai/Mistral-7B-v0.1), however it is likely to have included a mix of Web data and technical sources like books and code. See the Falcon 180B model card for an example of this."

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.


## Training procedure


The following `bitsandbytes` quantization config was used during training:
- quant_method: QuantizationMethod.BITS_AND_BYTES
- load_in_8bit: False
- load_in_4bit: True
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: nf4
- bnb_4bit_use_double_quant: False
- bnb_4bit_compute_dtype: float16

### Framework versions


- PEFT 0.6.2
## Training procedure


The following `bitsandbytes` quantization config was used during training:
- quant_method: QuantizationMethod.BITS_AND_BYTES
- load_in_8bit: False
- load_in_4bit: True
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: nf4
- bnb_4bit_use_double_quant: False
- bnb_4bit_compute_dtype: float16

### Framework versions


- PEFT 0.6.2
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_MexIvanov__zephyr-python-ru-merged)

|             Metric              |Value|
|---------------------------------|----:|
|Avg.                             |60.10|
|AI2 Reasoning Challenge (25-Shot)|56.06|
|HellaSwag (10-Shot)              |82.06|
|MMLU (5-Shot)                    |60.20|
|TruthfulQA (0-shot)              |52.81|
|Winogrande (5-shot)              |76.95|
|GSM8k (5-shot)                   |32.52|