-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_config.py
More file actions
51 lines (48 loc) · 1.63 KB
/
Copy pathdefault_config.py
File metadata and controls
51 lines (48 loc) · 1.63 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
default_config = {
"model_name": "meta-llama/Llama-3.2-3B",
"experiment_name": "default-name",
"sentence_transformer_model": "BAAI/bge-m3",
"checkpoint_path": "pt_models",
"graph_path": "gnd/gnd.pickle",
"dataset_path": "dataset",
"label_mapping_path": "mapping/label_mapping.feather",
"num_epochs": 2,
"batch_size": 32,
"learning_rate": 5e-5,
"warmup_rate": 0.02,
"max_grad_norm": 1.0,
"eval_steps": 500,
"logging_steps": 50,
"save_steps": 5000,
"eval_generation": True,
"train_subsample_ratio": 1.0,
"validate_subsample_ratio": 0.03,
"sort_by_freq": True,
"use_k_freq_labels": 0,
"learning_rate_decay": True,
"context": {
"context_type": "text", # Choices: "text" or "graph". Use null if no context is needed.
"top_k": 0, # How many instances to retrieve
"hops": 0, # Also include hops in the knowledge graph from retrieved instances
"title_wise": False, # Whether to retrieve title-to-label or title-to-title
"relation": None, # Choices: null (use all relations) "broader" or "related"
"index_path": None,
"mapping_path": None,
"best_example": False, # Only for label few shot retrieval. CHooses most similar to title in set of docs associated with retrieved labels.
"explicit_triplets": False # Use explicit triples as information when hard prompting.
},
"prompt_config": {
"num_prompt_tokens": 50,
"at_layer": 25,
"hidden_size": 3072,
"down_project_size": 1024,
"dropout": 0.1,
"type": "hidden_states", # Choices: "hidden_states", "random", "context" or "graph_context"
"gnn_hidden_size": 512,
"gnn_n_layers": 2,
"kge_size": 1024,
"kge_kind": "random",
"kge_path": None,
"kge_encoder": None,
}
}