oddadmix commited on
Commit
5a9b531
·
verified ·
1 Parent(s): ecd88fb

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - oddadmix/arabic-triplets-large
4
+ language:
5
+ - ar
6
+ base_model:
7
+ - Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2
8
+ tags:
9
+ - reranking
10
+ - arabic-nlp
11
+ - nlp
12
+ ---
13
+
14
+
15
+ # Arabic Reranker V1 Model
16
+
17
+ This is an Arabic reranker model, fine-tuned from the [Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2](https://huggingface.co/Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2), which itself is based on [aubmindlab/bert-base-arabertv02](https://huggingface.co/aubmindlab/bert-base-arabertv02). The model is designed to perform reranking tasks by scoring and ordering text options based on their relevance to a given query, specifically optimized for Arabic text.
18
+
19
+ This model was trained on a synthetic dataset of Arabic triplets generated using large language models (LLMs). It was refined using a scoring technique, making it ideal for ranking tasks in Arabic Natural Language Processing (NLP).
20
+
21
+ ## Model Use
22
+
23
+ This model is well-suited for Arabic text reranking tasks, including:
24
+ - Information retrieval and document ranking
25
+ - Search engine results reranking
26
+ - Question-answering tasks requiring ranked answer choices
27
+
28
+ ## Example Usage
29
+
30
+ Below is an example of how to use the model with the `sentence_transformers` library to rerank paragraphs based on relevance to a query.
31
+
32
+ ### Code Example
33
+
34
+ ```python
35
+ from sentence_transformers import CrossEncoder
36
+
37
+ # Load the model
38
+ model = CrossEncoder('oddadmix/arabic-rerankerv1', max_length=512)
39
+
40
+ # Define the query and candidate paragraphs
41
+ Query = 'كيف يمكن استخدام التعلم العميق في معالجة الصور الطبية؟'
42
+ Paragraph1 = 'التعلم العميق يساعد في تحليل الصور الطبية وتشخيص الأمراض'
43
+ Paragraph2 = 'الذكاء الاصطناعي يستخدم في تحسين الإنتاجية في الصناعات'
44
+
45
+ # Score the paragraphs based on relevance to the query
46
+ scores = model.predict([(Query, Paragraph1), (Query, Paragraph2)])
47
+
48
+ # Output scores
49
+ print("Score for Paragraph 1:", scores[0])
50
+ print("Score for Paragraph 2:", scores[1])