File size: 3,120 Bytes
219a257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: Arabic RAG Question Answering
emoji: πŸ€–
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: apache-2.0
---

# πŸ€– Arabic RAG Question Answering System

An intelligent Arabic question answering system powered by LFM2-1.2B-RAG fine-tuned with **AdaLoRA** - enabling accurate, context-aware responses for general Arabic queries.

## 🌟 Why This Model?

### ⚑ Fast & Efficient (LiquidAI Architecture)
- **Edge-optimized**: Runs efficiently on CPU, GPU, or NPU
- **Lightning-fast inference**: 2x faster than comparable models
- **Device-agnostic**: Deploy on smartphones, laptops, or servers
- **Low memory footprint**: Perfect for resource-constrained environments

### 🎯 Advanced Fine-tuning (AdaLoRA)
This model uses **AdaLoRA (Adaptive Low-Rank Adaptation)** - an advanced parameter-efficient fine-tuning technique that:
- Dynamically allocates model capacity based on importance
- **Outperforms standard LoRA** across multiple metrics
- Achieves better F1 scores and answer correctness
- More efficient parameter usage for superior results

### 🌍 Arabic RAG Excellence
- General-purpose Arabic question answering
- Context-aware responses grounded in provided information
- Modern Standard Arabic optimization
- Real-world RAG applications ready

## 🎯 How to Use

1. **Paste Context**: Add any Arabic text containing information
2. **Ask Question**: Write your question in Arabic
3. **Get Answer**: Receive an accurate, extracted answer instantly

Perfect for: document analysis, information extraction, educational tools, customer support, and research applications.

## πŸ”§ Model Details

- **Base Model**: [LiquidAI/LFM2-1.2B-RAG](https://huggingface.co/LiquidAI/LFM2-1.2B-RAG)  
- **Fine-tuning**: AdaLoRA (Adaptive Low-Rank Adaptation)  
- **Dataset**: [ARCD](https://huggingface.co/datasets/hsseinmz/arcd) β€” 693 Arabic QA examples  
- **Language**: Modern Standard Arabic  
- **Architecture**: Hybrid model with multiplicative gates and convolutions  

> ⚑ The model can be further enhanced and evaluated on larger or similar Arabic QA datasets to improve generalization and robustness.

## ⚑ Features

- πŸš€ Real-time answer generation
- πŸŽ›οΈ Adjustable generation parameters
- πŸ“ Pre-loaded example questions
- πŸ”„ Full RTL support for Arabic
- πŸ“‹ Copy-to-clipboard functionality
- πŸ’» Works on any device (CPU/GPU)

## πŸ”— Resources

- **Model Card**: [azeddinShr/LFM2-1.2B-RAG-ARABIC-AdaLoRA](https://huggingface.co/azeddinShr/LFM2-1.2B-RAG-ARABIC-AdaLoRA)
- **Training Dataset**: [ARCD](https://huggingface.co/datasets/hsseinmz/arcd)
- **Base Model**: [LiquidAI/LFM2-1.2B-RAG](https://huggingface.co/LiquidAI/LFM2-1.2B-RAG)
- **Comparison**: Also available - [LoRA variant](https://huggingface.co/azeddinShr/LFM2-1.2B-RAG-ARABIC-LoRA)

## πŸ“§ Contact

Questions or feedback? Visit the [model repository](https://huggingface.co/azeddinShr/LFM2-1.2B-RAG-ARABIC-AdaLoRA) or email me directly at [azdinsahir11@gmail.com](mailto:azdinsahir11@gmail.com) !

---

**Built with ❀️ using LiquidAI, AdaLoRA, and Gradio**