--- 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**