Upload 9 files
Browse files- README.md +109 -3
- adapter_config.json +19 -0
- adapter_model.bin +3 -0
- added_tokens.json +7 -0
- generation_config.json +15 -0
- merges.txt +0 -0
- special_tokens_map.json +8 -0
- tokenizer_config.json +59 -0
- vocab.json +0 -0
README.md
CHANGED
@@ -1,3 +1,109 @@
|
|
1 |
-
---
|
2 |
-
license:
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- IlyaGusev/ru_turbo_alpaca
|
5 |
+
- IlyaGusev/ru_turbo_alpaca_evol_instruct
|
6 |
+
- IlyaGusev/ru_turbo_saiga
|
7 |
+
- IlyaGusev/ru_sharegpt_cleaned
|
8 |
+
- IlyaGusev/oasst1_ru_main_branch
|
9 |
+
- IlyaGusev/gpt_roleplay_realm
|
10 |
+
- lksy/ru_instruct_gpt4
|
11 |
+
language:
|
12 |
+
- ru
|
13 |
+
- en
|
14 |
+
library_name: peft
|
15 |
+
tags:
|
16 |
+
- Saiga
|
17 |
+
- ruGPT-3.5
|
18 |
+
- 13B
|
19 |
+
- chat
|
20 |
+
- lora
|
21 |
+
- Peft
|
22 |
+
- adapter
|
23 |
+
---
|
24 |
+
|
25 |
+
# ruGPT-3.5 13B LoRA: Adapter-Only Version
|
26 |
+
|
27 |
+
Welcome to the adapter-only version of ruGPT-3.5 13B LoRA. This model is built upon the foundation of [ruGPT-3.5-13B](https://huggingface.co/ai-forever/ruGPT-3.5-13B).
|
28 |
+
|
29 |
+
📌 Important: This model was trained using settings identical to [GigaSaiga](https://huggingface.co/IlyaGusev/gigasaiga_lora), but incorporates additional dataset.
|
30 |
+
|
31 |
+
🔗 Training code is [here](https://github.com/EvilFreelancer/ruGPT-3.5-13B-lora).
|
32 |
+
|
33 |
+
> Note: If you prefer, you can opt to use the ruGPT-3.5 13B fp16 base model.
|
34 |
+
|
35 |
+
## Code sample
|
36 |
+
|
37 |
+
```python
|
38 |
+
from peft import AutoPeftModelForCausalLM
|
39 |
+
|
40 |
+
model = AutoPeftModelForCausalLM.from_pretrained("zpbrent/peft-ruGPT-3.5-13B-lora")
|
41 |
+
```
|
42 |
+
|
43 |
+
## Examples
|
44 |
+
|
45 |
+
```text
|
46 |
+
User: Привет! Почему трава зелёная?
|
47 |
+
ruGPT-3.5: Трава зелёная благодаря хлорофиллу - пигменту растений, который поглощает световые волны определенной длины и преобразует их в энергию химических связей. Хлорофилл также обеспечивает растения питательными веществами из почвы через фотосинтез.
|
48 |
+
```
|
49 |
+
|
50 |
+
```text
|
51 |
+
User: Придумай стишок про нейросети.
|
52 |
+
ruGPT-3.5: Нейросеть – это чудо науки,
|
53 |
+
Она способна решать любые задачи.
|
54 |
+
И если ты хочешь стать программистом,
|
55 |
+
То лучше всего изучать нейронные сети.
|
56 |
+
```
|
57 |
+
|
58 |
+
```text
|
59 |
+
User: Высота самой высокой горы на Земле?
|
60 |
+
ruGPT-3.5: Самая высокая гора на Земле находится в Гималаях и называется Эверест (8848 метров).
|
61 |
+
```
|
62 |
+
|
63 |
+
```text
|
64 |
+
User: Сколько максимум лет может прожить галопогосская черепаха?
|
65 |
+
ruGPT-3.5: Галопогосские черепахи могут жить до 100 лет и более. Они являются одними из самых долгоживущих животных на планете.
|
66 |
+
```
|
67 |
+
|
68 |
+
## 📚 Training Datasets
|
69 |
+
|
70 |
+
The datasets utilized for training this model are consistent with those used for [Saiga-2](https://github.com/IlyaGusev/rulm).
|
71 |
+
|
72 |
+
Here's the comprehensive list:
|
73 |
+
|
74 |
+
- [ru_turbo_alpaca](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca)
|
75 |
+
- [ru_turbo_alpaca_evol_instruct](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca_evol_instruct)
|
76 |
+
- [ru_turbo_saiga](https://huggingface.co/datasets/IlyaGusev/ru_turbo_saiga)
|
77 |
+
- [ru_sharegpt_cleaned](https://huggingface.co/datasets/IlyaGusev/ru_sharegpt_cleaned)
|
78 |
+
- [oasst1_ru_main_branch](https://huggingface.co/datasets/IlyaGusev/oasst1_ru_main_branch)
|
79 |
+
- [gpt_roleplay_realm](https://huggingface.co/datasets/IlyaGusev/gpt_roleplay_realm)
|
80 |
+
- [ru_instruct_gpt4](https://huggingface.co/datasets/lksy/ru_instruct_gpt4)
|
81 |
+
|
82 |
+
## 🛠 Training Procedure
|
83 |
+
|
84 |
+
The following `bitsandbytes` quantization config was used during training:
|
85 |
+
|
86 |
+
- quant_method: bitsandbytes
|
87 |
+
- load_in_8bit: True
|
88 |
+
- load_in_4bit: False
|
89 |
+
- llm_int8_threshold: 6.0
|
90 |
+
- llm_int8_skip_modules: None
|
91 |
+
- llm_int8_enable_fp32_cpu_offload: False
|
92 |
+
- llm_int8_has_fp16_weight: False
|
93 |
+
- bnb_4bit_quant_type: fp4
|
94 |
+
- bnb_4bit_use_double_quant: False
|
95 |
+
- bnb_4bit_compute_dtype: float32
|
96 |
+
|
97 |
+
## ⚙️ Framework Versions
|
98 |
+
|
99 |
+
Ensure you have the following framework versions for compatibility:
|
100 |
+
|
101 |
+
- PyTorch 2.1.0
|
102 |
+
- PEFT 0.5.0
|
103 |
+
- bitsandbytes 0.41.1
|
104 |
+
- transformers 4.34.0
|
105 |
+
|
106 |
+
## Links
|
107 |
+
|
108 |
+
- https://t.me/evilfreelancer
|
109 |
+
- https://dzen.ru/evilfreelancer
|
adapter_config.json
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_mapping": {"parent_library":"setfit","base_model_class":"SetFitModel"},
|
3 |
+
"base_model_name_or_path": "zpbrent/setfit-minilm-distilled",
|
4 |
+
"bias": "none",
|
5 |
+
"fan_in_fan_out": false,
|
6 |
+
"inference_mode": true,
|
7 |
+
"init_lora_weights": true,
|
8 |
+
"layers_pattern": null,
|
9 |
+
"layers_to_transform": null,
|
10 |
+
"lora_alpha": 16,
|
11 |
+
"lora_dropout": 0.05,
|
12 |
+
"modules_to_save": null,
|
13 |
+
"peft_type": "LORA",
|
14 |
+
"r": 16,
|
15 |
+
"revision": null,
|
16 |
+
"target_modules": [
|
17 |
+
"c_attn"
|
18 |
+
]
|
19 |
+
}
|
adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1563ed0c38f5e596b21307c2dfbe72227f9745ab85543ec412a33f20d59e45a
|
3 |
+
size 52457121
|
added_tokens.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</s>": 3,
|
3 |
+
"<mask>": 5,
|
4 |
+
"<pad>": 0,
|
5 |
+
"<s>": 2,
|
6 |
+
"<|endoftext|>": 1
|
7 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 2,
|
4 |
+
"eos_token_id": 3,
|
5 |
+
"pad_token_id": 0,
|
6 |
+
"transformers_version": "4.34.0",
|
7 |
+
"temperature": 0.2,
|
8 |
+
"top_p": 0.9,
|
9 |
+
"top_k": 30,
|
10 |
+
"do_sample": true,
|
11 |
+
"max_new_tokens": 1536,
|
12 |
+
"num_beams": 1,
|
13 |
+
"repetition_penalty": 1.15,
|
14 |
+
"no_repeat_ngram_size": 15
|
15 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"mask_token": "<mask>",
|
5 |
+
"pad_token": "<pad>",
|
6 |
+
"sep_token": "<s>",
|
7 |
+
"unk_token": "<|endoftext|>"
|
8 |
+
}
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<pad>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<|endoftext|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": true,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "<s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": true,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"3": {
|
30 |
+
"content": "</s>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": true,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"5": {
|
38 |
+
"content": "<mask>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
}
|
45 |
+
},
|
46 |
+
"additional_special_tokens": [],
|
47 |
+
"bos_token": "<s>",
|
48 |
+
"clean_up_tokenization_spaces": false,
|
49 |
+
"eos_token": "</s>",
|
50 |
+
"errors": "replace",
|
51 |
+
"mask_token": "<mask>",
|
52 |
+
"model_max_length": 2048,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"padding_side": "left",
|
55 |
+
"sep_token": "<s>",
|
56 |
+
"tokenizer_class": "GPT2Tokenizer",
|
57 |
+
"tokenizer_file": null,
|
58 |
+
"unk_token": "<|endoftext|>"
|
59 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|