Spaces:
Runtime error
Runtime error
Feliks Zaslavskiy
commited on
Commit
•
b3dff69
1
Parent(s):
f248e14
wip
Browse files- eval.py +0 -1
- quick_evaluate.py +1 -0
- train.py +2 -2
- view_all_evals.py +2 -0
eval.py
CHANGED
@@ -19,7 +19,6 @@ model_name = 'sentence-transformers/paraphrase-albert-base-v2'
|
|
19 |
#86% so far
|
20 |
model_name = 'output/training_OnlineConstrativeLoss-2023-03-17_16-10-39'
|
21 |
|
22 |
-
|
23 |
model_sbert = SentenceTransformer(model_name)
|
24 |
|
25 |
dev_sentences1 = []
|
|
|
19 |
#86% so far
|
20 |
model_name = 'output/training_OnlineConstrativeLoss-2023-03-17_16-10-39'
|
21 |
|
|
|
22 |
model_sbert = SentenceTransformer(model_name)
|
23 |
|
24 |
dev_sentences1 = []
|
quick_evaluate.py
CHANGED
@@ -14,6 +14,7 @@ model_name = 'output/training_OnlineConstrativeLoss-2023-03-11_00-24-35'
|
|
14 |
model_name = 'output/training_OnlineConstrativeLoss-2023-03-11_01-00-19'
|
15 |
model_name='output/training_OnlineConstrativeLoss-2023-03-17_16-10-39'
|
16 |
model_name='output/training_OnlineConstrativeLoss-2023-03-17_23-15-52'
|
|
|
17 |
model_sbert = SentenceTransformer(model_name)
|
18 |
|
19 |
|
|
|
14 |
model_name = 'output/training_OnlineConstrativeLoss-2023-03-11_01-00-19'
|
15 |
model_name='output/training_OnlineConstrativeLoss-2023-03-17_16-10-39'
|
16 |
model_name='output/training_OnlineConstrativeLoss-2023-03-17_23-15-52'
|
17 |
+
#model_name='output/training_OnlineConstrativeLoss-2023-03-14_00-40-03'
|
18 |
model_sbert = SentenceTransformer(model_name)
|
19 |
|
20 |
|
train.py
CHANGED
@@ -24,8 +24,8 @@ logger = logging.getLogger(__name__)
|
|
24 |
|
25 |
|
26 |
#As base model, we use DistilBERT-base that was pre-trained on NLI and STSb data
|
27 |
-
model_name ='sentence-transformers/paraphrase-albert-base-v2'
|
28 |
model_name = 'sentence-transformers/all-mpnet-base-v1'
|
|
|
29 |
model = SentenceTransformer(model_name)
|
30 |
num_epochs = 12
|
31 |
# Smaller is generally better more accurate results.
|
@@ -35,7 +35,7 @@ train_batch_size = 10
|
|
35 |
distance_metric = losses.SiameseDistanceMetric.COSINE_DISTANCE
|
36 |
|
37 |
#Negative pairs should have a distance of at least 0.5
|
38 |
-
margin = 0.
|
39 |
|
40 |
dataset_path = "data_set_training.csv"
|
41 |
model_save_path = 'output/training_OnlineConstrativeLoss-'+datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
|
|
24 |
|
25 |
|
26 |
#As base model, we use DistilBERT-base that was pre-trained on NLI and STSb data
|
|
|
27 |
model_name = 'sentence-transformers/all-mpnet-base-v1'
|
28 |
+
model_name ='sentence-transformers/paraphrase-albert-base-v2'
|
29 |
model = SentenceTransformer(model_name)
|
30 |
num_epochs = 12
|
31 |
# Smaller is generally better more accurate results.
|
|
|
35 |
distance_metric = losses.SiameseDistanceMetric.COSINE_DISTANCE
|
36 |
|
37 |
#Negative pairs should have a distance of at least 0.5
|
38 |
+
margin = 0.4
|
39 |
|
40 |
dataset_path = "data_set_training.csv"
|
41 |
model_save_path = 'output/training_OnlineConstrativeLoss-'+datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
view_all_evals.py
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# This will take a model and display the cosine similarity
|
2 |
+
# for all the dev set.
|