Logo Lanfrica

abdu1z1z/Arabi-Local-LLM

Domain:

natural language processing

Record type:

model
Creator:
abd
Host:
# 🤖 Faseeh-3B: Local Arabic AI Assistant **A specialized Arabic Large Language Model (LLM) fine-tuned locally using QLoRA technology.** This project demonstrates the capability of fine-tuning powerful AI models on consumer hardware (NVIDIA RTX 5070) to follow instructions and communicate effectively in Arabic. ## 🚀 Features | المميزات - **Locally Fine-Tuned:** Trained from scratch on a specific instruct dataset using QLoRA. - **Arabic First:** Optimized for Arabic NLP tasks, instruction following, and official writing. - **Efficient:** Runs smoothly on consumer GPUs (requires ~6GB VRAM for inference). - **Interactive UI:** Includes a clean Gradio-based web interface for easy interaction. ## 🏗️ Methodology | منهجية العمل This project was developed through a structured pipeline focusing on efficiency and resource optimization: 1. **Model Selection:** Selected `Qwen-2.5-3B-Instruct` as the base model for its strong multilingual capabilities and compact size suitable for local iteration. 2. **Data Preparation:** Processed an Arabic instruction-following dataset (Instruction/Output pairs), formatted specifically to align with the model's tokenizer. 3. **Efficient Fine-Tuning (QLoRA):** * Applied **4-bit quantization** (NF4) to reduce memory footprint. * Used **LoRA (Low-Rank Adaptation)** adapters to train only a fraction of parameters (~0.1%), keeping the base model frozen. * Leveraged **Gradient Checkpointing** and **Flash Attention 2** to maximize training speed on the RTX 5070. 4. **Interface Development:** Built a custom streaming chat interface using **Gradio** to interact with the trained adapter in real-time. --- **تضمنت عملية التطوير عدة مراحل تقنية رئيسية:** 1. **اختيار النموذج:** تم اعتماد `Qwen-2.5-3B` نظراً لكفاءته العالية ودعمه القوي للغات المتعددة. 2. **تحضير البيانات:** معالجة وتنظيف بيانات عربية (نظام تعليمات) وتنسيقها لتتوافق مع الموديل. 3. **الضبط الدقيق (Fine-Tuning):** استخدام تقنية **QLoRA** لتدريب النموذج محلياً بدقة 4-بت، مما سمح …