Create readme.md
Browse files
readme.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Arabic RAG Question Answering
|
| 3 |
+
emoji: π€
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.0.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# π€ Arabic RAG Question Answering System
|
| 14 |
+
|
| 15 |
+
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.
|
| 16 |
+
|
| 17 |
+
## π Why This Model?
|
| 18 |
+
|
| 19 |
+
### β‘ Fast & Efficient (LiquidAI Architecture)
|
| 20 |
+
- **Edge-optimized**: Runs efficiently on CPU, GPU, or NPU
|
| 21 |
+
- **Lightning-fast inference**: 2x faster than comparable models
|
| 22 |
+
- **Device-agnostic**: Deploy on smartphones, laptops, or servers
|
| 23 |
+
- **Low memory footprint**: Perfect for resource-constrained environments
|
| 24 |
+
|
| 25 |
+
### π― Advanced Fine-tuning (AdaLoRA)
|
| 26 |
+
This model uses **AdaLoRA (Adaptive Low-Rank Adaptation)** - an advanced parameter-efficient fine-tuning technique that:
|
| 27 |
+
- Dynamically allocates model capacity based on importance
|
| 28 |
+
- **Outperforms standard LoRA** across multiple metrics
|
| 29 |
+
- Achieves better F1 scores and answer correctness
|
| 30 |
+
- More efficient parameter usage for superior results
|
| 31 |
+
|
| 32 |
+
### π Arabic RAG Excellence
|
| 33 |
+
- General-purpose Arabic question answering
|
| 34 |
+
- Context-aware responses grounded in provided information
|
| 35 |
+
- Modern Standard Arabic optimization
|
| 36 |
+
- Real-world RAG applications ready
|
| 37 |
+
|
| 38 |
+
## π― How to Use
|
| 39 |
+
|
| 40 |
+
1. **Paste Context**: Add any Arabic text containing information
|
| 41 |
+
2. **Ask Question**: Write your question in Arabic
|
| 42 |
+
3. **Get Answer**: Receive an accurate, extracted answer instantly
|
| 43 |
+
|
| 44 |
+
Perfect for: document analysis, information extraction, educational tools, customer support, and research applications.
|
| 45 |
+
|
| 46 |
+
## π§ Model Details
|
| 47 |
+
|
| 48 |
+
- **Base Model**: [LiquidAI/LFM2-1.2B-RAG](https://huggingface.co/LiquidAI/LFM2-1.2B-RAG)
|
| 49 |
+
- **Fine-tuning**: AdaLoRA (Adaptive Low-Rank Adaptation)
|
| 50 |
+
- **Dataset**: [ARCD](https://huggingface.co/datasets/hsseinmz/arcd) β 693 Arabic QA examples
|
| 51 |
+
- **Language**: Modern Standard Arabic
|
| 52 |
+
- **Architecture**: Hybrid model with multiplicative gates and convolutions
|
| 53 |
+
|
| 54 |
+
> β‘ The model can be further enhanced and evaluated on larger or similar Arabic QA datasets to improve generalization and robustness.
|
| 55 |
+
|
| 56 |
+
## β‘ Features
|
| 57 |
+
|
| 58 |
+
- π Real-time answer generation
|
| 59 |
+
- ποΈ Adjustable generation parameters
|
| 60 |
+
- π Pre-loaded example questions
|
| 61 |
+
- π Full RTL support for Arabic
|
| 62 |
+
- π Copy-to-clipboard functionality
|
| 63 |
+
- π» Works on any device (CPU/GPU)
|
| 64 |
+
|
| 65 |
+
## π Resources
|
| 66 |
+
|
| 67 |
+
- **Model Card**: [azeddinShr/LFM2-1.2B-RAG-ARABIC-AdaLoRA](https://huggingface.co/azeddinShr/LFM2-1.2B-RAG-ARABIC-AdaLoRA)
|
| 68 |
+
- **Training Dataset**: [ARCD](https://huggingface.co/datasets/hsseinmz/arcd)
|
| 69 |
+
- **Base Model**: [LiquidAI/LFM2-1.2B-RAG](https://huggingface.co/LiquidAI/LFM2-1.2B-RAG)
|
| 70 |
+
- **Comparison**: Also available - [LoRA variant](https://huggingface.co/azeddinShr/LFM2-1.2B-RAG-ARABIC-LoRA)
|
| 71 |
+
|
| 72 |
+
## π§ Contact
|
| 73 |
+
|
| 74 |
+
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) !
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
**Built with β€οΈ using LiquidAI, AdaLoRA, and Gradio**
|