sxtforreal commited on
Commit
8647d89
1 Parent(s): 7f4f2d3

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +25 -0
config.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+
3
+ # Set device cuda for GPU if it is available, otherwise run on the CPU
4
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
5
+
6
+ # Training hyperparameters
7
+ batch_size = 50
8
+ min_epochs = 1
9
+ max_epochs = 10
10
+ learning_rate = 5e-5
11
+ unfreeze_ratio = 0.2
12
+ temperature = 0.1
13
+
14
+ # Dataset
15
+ split_ratio = 0.2
16
+ num_workers = 1
17
+ num_pos = 20
18
+ num_neg = 200
19
+ batch_size_simcse = 200
20
+
21
+ # Compute related
22
+ accelerator = "gpu"
23
+ devices = 1 # number of gpus
24
+ precision = "16-mixed"
25
+ log_every_n_steps = 20