Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: zh
|
3 |
+
tags:
|
4 |
+
- cross-encoder
|
5 |
+
datasets:
|
6 |
+
- dialogue
|
7 |
+
---
|
8 |
+
|
9 |
+
# Data
|
10 |
+
train data is similarity sentence data from E-commerce dialogue, about 50w sentence pairs.
|
11 |
+
|
12 |
+
## Model
|
13 |
+
model created by [sentence-tansformers](https://www.sbert.net/index.html),model struct is cross-encoder,pretrained model is hfl/chinese-electra-180g-large-discriminator.
|
14 |
+
|
15 |
+
### Usage
|
16 |
+
```python
|
17 |
+
>>> from sentence_transformers.cross_encoder import CrossEncoder
|
18 |
+
>>> model = CrossEncoder(model_save_path, device="cuda", max_length=64)
|
19 |
+
>>> sentences = ["今天天气不错", "今天心情不错"]
|
20 |
+
>>> score = model.predict([sentences])
|
21 |
+
>>> print(score[0])
|
22 |
+
```
|