simonhughes22
commited on
Commit
•
be70e75
1
Parent(s):
afedd94
Update README.md
Browse files
README.md
CHANGED
@@ -78,11 +78,15 @@ Also note that the order of the documents is important, the first document is th
|
|
78 |
### Training
|
79 |
|
80 |
```python
|
|
|
81 |
from sentence_transformers.cross_encoder.evaluation import CEBinaryClassificationEvaluator
|
82 |
-
from sentence_transformers import
|
83 |
|
84 |
num_epochs = 5
|
85 |
model_save_path = "./model_dump"
|
|
|
|
|
|
|
86 |
|
87 |
# Load some training examples as such, using a pandas dataframe with source and summary columns:
|
88 |
train_examples, test_examples = [], []
|
|
|
78 |
### Training
|
79 |
|
80 |
```python
|
81 |
+
from sentence_transformers.cross_encoder import CrossEncoder
|
82 |
from sentence_transformers.cross_encoder.evaluation import CEBinaryClassificationEvaluator
|
83 |
+
from sentence_transformers import InputExample
|
84 |
|
85 |
num_epochs = 5
|
86 |
model_save_path = "./model_dump"
|
87 |
+
model_name = 'cross-encoder/nli-deberta-v3-base' # base model, use 'vectara/hallucination_evaluation_model' if you want to further fine-tune ours
|
88 |
+
|
89 |
+
model = CrossEncoder(model_name, num_labels=1, automodel_args={'ignore_mismatched_sizes':True})
|
90 |
|
91 |
# Load some training examples as such, using a pandas dataframe with source and summary columns:
|
92 |
train_examples, test_examples = [], []
|