Added LoRA
Browse files- README.md +65 -0
- adapter_config.json +27 -0
- adapter_model.safetensors +3 -0
- training_log.json +12 -0
- training_parameters.json +37 -0
- training_prompt.json +5 -0
README.md
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- fi
|
4 |
+
library_name: peft
|
5 |
+
base_model: HPLT/gpt-7b-nordic-prerelease
|
6 |
+
license: apache-2.0
|
7 |
+
---
|
8 |
+
|
9 |
+
# Model Card for Alpaca-Finnish-V1-7B-LoRA
|
10 |
+
|
11 |
+
LoRA trained in 4-bit using [HPLT/gpt-7b-nordic-prerelease](https://huggingface.co/HPLT/gpt-7b-nordic-prerelease/) as the base model. Dataset used with the LoRA is [pinzhenchen/alpaca-cleaned-fi](https://huggingface.co/datasets/pinzhenchen/alpaca-cleaned-fi/).
|
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": "Alpaca-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": 256,
|
41 |
+
"lora_alpha": 512,
|
42 |
+
"lora_dropout": 0.05,
|
43 |
+
"cutoff_len": 384,
|
44 |
+
"dataset": "alpaca_data_cleaned.fi",
|
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,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "models/HPLT_gpt-7b-nordic-prerelease",
|
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": 512,
|
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": 256,
|
19 |
+
"rank_pattern": {},
|
20 |
+
"revision": null,
|
21 |
+
"target_modules": [
|
22 |
+
"q_proj",
|
23 |
+
"v_proj"
|
24 |
+
],
|
25 |
+
"task_type": "CAUSAL_LM",
|
26 |
+
"use_rslora": false
|
27 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e95761245b006688771ae764a2b4b777adf523e6b45f486b64b1a2a029e60cac
|
3 |
+
size 536888520
|
training_log.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name": "HPLT_gpt-7b-nordic-prerelease",
|
3 |
+
"base_model_class": "LlamaForCausalLM",
|
4 |
+
"base_loaded_in_4bit": true,
|
5 |
+
"base_loaded_in_8bit": false,
|
6 |
+
"projections": "q, v",
|
7 |
+
"loss": 1.5969,
|
8 |
+
"grad_norm": 0.3398808538913727,
|
9 |
+
"learning_rate": 0.00020165562913907284,
|
10 |
+
"epoch": 0.99,
|
11 |
+
"current_steps": 12799
|
12 |
+
}
|
training_parameters.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"lora_name": "Alpaca-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": 256,
|
18 |
+
"lora_alpha": 512,
|
19 |
+
"lora_dropout": 0.05,
|
20 |
+
"cutoff_len": 384,
|
21 |
+
"dataset": "alpaca_data_cleaned.fi",
|
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 |
+
}
|