PEFT
Safetensors
Finnish
mpasila commited on
Commit
8ee2c97
1 Parent(s): 5d0e986

Added LoRA

Browse files
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Capybara-Finnish-V1.3-8B-LoRA
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 is the same as the previous version but trained with a larger LoRA rank and for 3 epochs as the last time.
14
+
15
+ It uses Alpaca format but with a translated instruction at the start:
16
+ ```
17
+ {
18
+ "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%",
19
+ "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%"
20
+ }
21
+
22
+ ```
23
+
24
+ Using the following settings:
25
+ ```json
26
+ {
27
+ "lora_name": "Capybara-Finnish-V1_3",
28
+ "always_override": false,
29
+ "q_proj_en": true,
30
+ "v_proj_en": true,
31
+ "k_proj_en": false,
32
+ "o_proj_en": false,
33
+ "gate_proj_en": false,
34
+ "down_proj_en": false,
35
+ "up_proj_en": false,
36
+ "save_steps": 250.0,
37
+ "micro_batch_size": 4,
38
+ "batch_size": 128,
39
+ "epochs": 3.0,
40
+ "learning_rate": "3e-4",
41
+ "lr_scheduler_type": "linear",
42
+ "lora_rank": 384,
43
+ "lora_alpha": 768,
44
+ "lora_dropout": 0.05,
45
+ "cutoff_len": 512,
46
+ "dataset": "capybara_finnish_v1.1",
47
+ "eval_dataset": "None",
48
+ "format": "alpaca-format-finnish",
49
+ "eval_steps": 100.0,
50
+ "raw_text_file": "None",
51
+ "overlap_len": 128,
52
+ "newline_favor_len": 128,
53
+ "higher_rank_limit": false,
54
+ "warmup_steps": 100.0,
55
+ "optimizer": "adamw_torch",
56
+ "hard_cut_string": "\\n\\n\\n",
57
+ "train_only_after": "",
58
+ "stop_at_loss": 0,
59
+ "add_eos_token": false,
60
+ "min_chars": 0.0,
61
+ "report_to": "None"
62
+ }
63
+ ```
64
+
65
+ ### Framework versions
66
+
67
+ - 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": 768,
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": 384,
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:22772ffd178a52459fff66143177aa814db17809f72b549f368a94d683c65ea8
3
+ size 805316192
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.0361,
8
+ "grad_norm": 0.1468171924352646,
9
+ "learning_rate": 3.1034482758620685e-05,
10
+ "epoch": 2.98,
11
+ "current_steps": 1051,
12
+ "train_runtime": 8426.1409,
13
+ "train_samples_per_second": 0.504,
14
+ "train_steps_per_second": 0.004,
15
+ "total_flos": 2618215184203776.0,
16
+ "train_loss": 2.226992231426817
17
+ }
training_parameters.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name": "Capybara-Finnish-V1_3",
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": 384,
18
+ "lora_alpha": 768,
19
+ "lora_dropout": 0.05,
20
+ "cutoff_len": 512,
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
+ }