-
Notifications
You must be signed in to change notification settings - Fork 500
Expand file tree
/
Copy pathphrase-classification.json
More file actions
96 lines (96 loc) · 2.94 KB
/
phrase-classification.json
File metadata and controls
96 lines (96 loc) · 2.94 KB
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
{
"$schema": "https://microsoft.github.io/Olive/schema.json",
"input_model":{
"type": "PyTorchModel",
"config": {
"hf_config": {
"model_name": "microsoft/Phi-3-mini-4k-instruct",
"task": "text-generation",
"from_pretrained_args": {
"trust_remote_code": true
}
}
}
},
"systems": {
"local_system": {
"type": "LocalSystem",
"config": {
"accelerators": [
{
"device": "gpu",
"execution_providers": [
"CUDAExecutionProvider"
]
}
]
}
}
},
"data_configs": [
{
"name": "dataset_default_train",
"type": "HuggingfaceContainer",
"params_config": {
"data_name": "json",
"data_files":"dataset/dataset-classification.json",
"split": "train",
"component_kwargs": {
"pre_process_data": {
"dataset_type": "corpus",
"text_cols": ["phrase","tone"],
"text_template": "<|user|>\n{phrase}<|end|>\n<|assistant|>\n{tone}<|end|>",
"corpus_strategy": "join",
"source_max_len": 1024,
"pad_to_max_len": false,
"use_attention_mask": false
}
}
}
}
],
"passes": {
"lora": {
"type": "LoRA",
"config": {
"target_modules": [
"o_proj",
"qkv_proj"
],
"lora_r": 64,
"lora_alpha": 64,
"lora_dropout": 0.1,
"train_data_config": "dataset_default_train",
"eval_dataset_size": 0.3,
"training_args": {
"seed": 0,
"data_seed": 42,
"per_device_train_batch_size": 1,
"per_device_eval_batch_size": 1,
"gradient_accumulation_steps": 4,
"gradient_checkpointing": false,
"learning_rate": 0.0001,
"max_steps": 150,
"evaluation_strategy": "steps",
"adam_beta2": 0.999,
"max_grad_norm": 0.3
}
}
},
"merge": {
"type": "MergeAdapterWeights"
},
"mb": {
"type": "ModelBuilder",
"config": {
"precision": "int4"
}
}
},
"engine": {
"cache_dir": "cache",
"output_dir": "models",
"host": "local_system",
"target": "local_system"
}
}