File size: 1,510 Bytes
6b1f225
 
 
bb2f0ee
 
125b739
bb2f0ee
 
 
 
 
 
 
 
c59b04f
 
bb2f0ee
 
 
 
abb08f6
 
 
 
bb2f0ee
 
abb08f6
 
 
 
bb2f0ee
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
---


This classification model is based on [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2).
The model should be used to produce relevance and specificity of the last message in the context of a dialog.

It is pretrained on corpus of dialog data from social networks and finetuned on [tinkoff-ai/context_similarity](https://huggingface.co/tinkoff-ai/context_similarity). 
The performance of the model on validation split [tinkoff-ai/context_similarity](https://huggingface.co/tinkoff-ai/context_similarity) (with the best thresholds for validation samples):

<table>
    <thead>
        <tr>
            <td colspan="2"><center>relevance</center></td>
            <td colspan="2"><center>specificity</center></td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><center>f0.5</center></td>
            <td><center>roc-auc</center></td>
            <td><center>f0.5</center></td>
            <td><center>roc-auc</center></td>
        </tr>
        <tr>
            <td><center>0.82</center></td>
            <td><center>0.74</center></td>
            <td><center>0.81</center></td>
            <td><center>0.8</center></td>
        </tr>
    </tbody>
</table>

The model can be loaded as follows:

```python
# pip install transformers
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("tinkoff-ai/context_similarity")
model = AutoModel.from_pretrained("tinkoff-ai/context_similarity")
# model.cuda()
```