Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- cs
|
4 |
+
base_model:
|
5 |
+
- fav-kky/FERNET-C5
|
6 |
+
---
|
7 |
+
This is fav-kky/FERNET-C5, fine-tuned with the **Cross-Encoder** architecture on DaReCzech dataset. The Cross-Encoder architecture processes both input text pieces simultaneously, enabling better accuracy.
|
8 |
+
|
9 |
+
The model can be used both for re-ranking.
|
10 |
+
|
11 |
+
**Re-ranking task**: Given a query, the model assesses all potential passages and ranks them in descending order of relevance.
|
12 |
+
|
13 |
+
```python
|
14 |
+
from sentence_transformers import CrossEncoder
|
15 |
+
|
16 |
+
model = CrossEncoder('ctu-aic/CE-fernet-c5-LRank200', max_length=200)
|
17 |
+
|
18 |
+
query = "example query"
|
19 |
+
|
20 |
+
documents = [
|
21 |
+
"Example document one.",
|
22 |
+
"Example document two.",
|
23 |
+
"Example document three."
|
24 |
+
]
|
25 |
+
|
26 |
+
top_k = 3
|
27 |
+
return_documents = True
|
28 |
+
|
29 |
+
results = model.rank(
|
30 |
+
query=query,
|
31 |
+
documents=documents,
|
32 |
+
top_k=top_k,
|
33 |
+
return_documents=return_documents
|
34 |
+
)
|
35 |
+
|
36 |
+
for i, res in enumerate(results):
|
37 |
+
print(f"{i+1}. {res['text']}")
|
38 |
+
```
|