Added LoRA
Browse files- README.md +62 -0
- adapter_config.json +26 -0
- adapter_model.safetensors +3 -0
- training_log.json +17 -0
- training_parameters.json +37 -0
- training_prompt.json +5 -0
README.md
CHANGED
@@ -1,3 +1,65 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- fi
|
4 |
+
library_name: peft
|
5 |
+
base_model: mpasila/gpt3-finnish-8B-gptq-4bit
|
6 |
license: apache-2.0
|
7 |
---
|
8 |
+
|
9 |
+
# Model Card for Model ID
|
10 |
+
|
11 |
+
LoRA trained using [mpasila/gpt3-finnish-8B-gptq-4bit](https://huggingface.co/mpasila/gpt3-finnish-8B-gptq-4bit/) as the base model. Also the quantized model is based on this [TurkuNLP/gpt3-finnish-8B](https://huggingface.co/TurkuNLP/gpt3-finnish-8B/). Dataset used with the LoRA is [Finnish-NLP/Capybara-fi-deepl-translated-sft](https://huggingface.co/datasets/Finnish-NLP/Capybara-fi-deepl-translated-sft/) with some modifications so it uses Alpaca formatting [modified dataset](https://huggingface.co/datasets/mpasila/Capybara-fi-deepl-translated-sft-alpaca/).
|
12 |
+
|
13 |
+
It uses Alpaca format but with a translated instruction at the start:
|
14 |
+
```
|
15 |
+
{
|
16 |
+
"instruction,output": "Alla on ohje, jossa kuvataan tehtävä. Kirjoita vastaus, joka täyttää pyynnön asianmukaisesti.\n\n### Instruction:\n%instruction%\n\n### Response:\n%output%",
|
17 |
+
"instruction,input,output": "Alla on ohje, jossa kuvataan tehtävä ja joka on yhdistetty kontekstia lisäävään syötteeseen. Kirjoita vastaus, joka täyttää pyynnön asianmukaisesti.\n\n### Instruction:\n%instruction%\n\n### Input:\n%input%\n\n### Response:\n%output%"
|
18 |
+
}
|
19 |
+
|
20 |
+
```
|
21 |
+
|
22 |
+
Using the following settings:
|
23 |
+
```json
|
24 |
+
{
|
25 |
+
"lora_name": "Capybara_Finnish_V1",
|
26 |
+
"always_override": false,
|
27 |
+
"q_proj_en": true,
|
28 |
+
"v_proj_en": true,
|
29 |
+
"k_proj_en": false,
|
30 |
+
"o_proj_en": false,
|
31 |
+
"gate_proj_en": false,
|
32 |
+
"down_proj_en": false,
|
33 |
+
"up_proj_en": false,
|
34 |
+
"save_steps": 250.0,
|
35 |
+
"micro_batch_size": 4,
|
36 |
+
"batch_size": 128,
|
37 |
+
"epochs": 3.0,
|
38 |
+
"learning_rate": "3e-4",
|
39 |
+
"lr_scheduler_type": "linear",
|
40 |
+
"lora_rank": 32,
|
41 |
+
"lora_alpha": 64,
|
42 |
+
"lora_dropout": 0.05,
|
43 |
+
"cutoff_len": 256,
|
44 |
+
"dataset": "capybara_finnish_v1.1",
|
45 |
+
"eval_dataset": "None",
|
46 |
+
"format": "alpaca-format-finnish",
|
47 |
+
"eval_steps": 100.0,
|
48 |
+
"raw_text_file": "None",
|
49 |
+
"overlap_len": 128,
|
50 |
+
"newline_favor_len": 128,
|
51 |
+
"higher_rank_limit": false,
|
52 |
+
"warmup_steps": 100.0,
|
53 |
+
"optimizer": "adamw_torch",
|
54 |
+
"hard_cut_string": "\\n\\n\\n",
|
55 |
+
"train_only_after": "",
|
56 |
+
"stop_at_loss": 0,
|
57 |
+
"add_eos_token": false,
|
58 |
+
"min_chars": 0.0,
|
59 |
+
"report_to": "None"
|
60 |
+
}
|
61 |
+
```
|
62 |
+
|
63 |
+
### Framework versions
|
64 |
+
|
65 |
+
- PEFT 0.8.2
|
adapter_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "models/mpasila_gpt3-finnish-8B-gptq-4bit",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"loftq_config": {},
|
12 |
+
"lora_alpha": 64,
|
13 |
+
"lora_dropout": 0.05,
|
14 |
+
"megatron_config": null,
|
15 |
+
"megatron_core": "megatron.core",
|
16 |
+
"modules_to_save": null,
|
17 |
+
"peft_type": "LORA",
|
18 |
+
"r": 32,
|
19 |
+
"rank_pattern": {},
|
20 |
+
"revision": null,
|
21 |
+
"target_modules": [
|
22 |
+
"query_key_value"
|
23 |
+
],
|
24 |
+
"task_type": "CAUSAL_LM",
|
25 |
+
"use_rslora": false
|
26 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7bd6fcdefd4588da08bb6030c6b9789195f0d5d2382e97c6b3ad4f9fe63df68b
|
3 |
+
size 67118496
|
training_log.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name": "mpasila_gpt3-finnish-8B-gptq-4bit",
|
3 |
+
"base_model_class": "BloomForCausalLM",
|
4 |
+
"base_loaded_in_4bit": false,
|
5 |
+
"base_loaded_in_8bit": false,
|
6 |
+
"projections": "query_key_value",
|
7 |
+
"loss": 2.3115,
|
8 |
+
"grad_norm": 0.10131204128265381,
|
9 |
+
"learning_rate": 3.1034482758620685e-05,
|
10 |
+
"epoch": 2.98,
|
11 |
+
"current_steps": 1051,
|
12 |
+
"train_runtime": 4886.022,
|
13 |
+
"train_samples_per_second": 0.869,
|
14 |
+
"train_steps_per_second": 0.007,
|
15 |
+
"total_flos": 112306365136896.0,
|
16 |
+
"train_loss": 2.4886908531188965
|
17 |
+
}
|
training_parameters.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"lora_name": "Capybara_Finnish_V1",
|
3 |
+
"always_override": false,
|
4 |
+
"q_proj_en": true,
|
5 |
+
"v_proj_en": true,
|
6 |
+
"k_proj_en": false,
|
7 |
+
"o_proj_en": false,
|
8 |
+
"gate_proj_en": false,
|
9 |
+
"down_proj_en": false,
|
10 |
+
"up_proj_en": false,
|
11 |
+
"save_steps": 250.0,
|
12 |
+
"micro_batch_size": 4,
|
13 |
+
"batch_size": 128,
|
14 |
+
"epochs": 3.0,
|
15 |
+
"learning_rate": "3e-4",
|
16 |
+
"lr_scheduler_type": "linear",
|
17 |
+
"lora_rank": 32,
|
18 |
+
"lora_alpha": 64,
|
19 |
+
"lora_dropout": 0.05,
|
20 |
+
"cutoff_len": 256,
|
21 |
+
"dataset": "capybara_finnish_v1.1",
|
22 |
+
"eval_dataset": "None",
|
23 |
+
"format": "alpaca-format-finnish",
|
24 |
+
"eval_steps": 100.0,
|
25 |
+
"raw_text_file": "None",
|
26 |
+
"overlap_len": 128,
|
27 |
+
"newline_favor_len": 128,
|
28 |
+
"higher_rank_limit": false,
|
29 |
+
"warmup_steps": 100.0,
|
30 |
+
"optimizer": "adamw_torch",
|
31 |
+
"hard_cut_string": "\\n\\n\\n",
|
32 |
+
"train_only_after": "",
|
33 |
+
"stop_at_loss": 0,
|
34 |
+
"add_eos_token": false,
|
35 |
+
"min_chars": 0.0,
|
36 |
+
"report_to": "None"
|
37 |
+
}
|
training_prompt.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"template_type": "dataset",
|
3 |
+
"template_1": "Alla on ohje, jossa kuvataan teht\u00e4v\u00e4. Kirjoita vastaus, joka t\u00e4ytt\u00e4\u00e4 pyynn\u00f6n asianmukaisesti.\n\n### Instruction:\n%instruction%\n\n### Response:\n%output%",
|
4 |
+
"template_2": "Alla on ohje, jossa kuvataan teht\u00e4v\u00e4 ja joka on yhdistetty kontekstia lis\u00e4\u00e4v\u00e4\u00e4n sy\u00f6tteeseen. Kirjoita vastaus, joka t\u00e4ytt\u00e4\u00e4 pyynn\u00f6n asianmukaisesti.\n\n### Instruction:\n%instruction%\n\n### Input:\n%input%\n\n### Response:\n%output%"
|
5 |
+
}
|