CoolFace
Modelpublic

Abdulwasey/SaudiLegalAI-8B

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes14downloads
Model Card

SaudiLegalAI-8B

Specialized Legal AI Assistant for Saudi Arabian Law

SaudiLegalAI-8B is a specialized legal artificial intelligence model developed by Abdul Wasey specifically for the Saudi Arabian legal system. Built upon the advanced Qwen3-8B architecture and optimized with Apple MLX framework, this model provides expert-level assistance in Saudi legal matters, combining modern commercial law with traditional Islamic jurisprudence.

πŸ›οΈ Model Overview

SaudiLegalAI-8B is designed to serve legal professionals, businesses, and individuals navigating the complex Saudi legal landscape. The model integrates:

  • β€”Saudi Commercial Law - Company formation, business regulations, investment guidelines
  • β€”Islamic Jurisprudence (Fiqh) - Sharia-compliant legal principles and rulings
  • β€”Vision 2030 Reforms - Latest regulatory changes and modernization initiatives
  • β€”Bilingual Expertise - Native Arabic legal terminology with English translations

πŸš€ Quick Start

Installation

bash
pip install mlx mlx-lm

Usage

python
from mlx_lm import generate, load

# Load SaudiLegalAI-8B
model, tokenizer = load("SaudiLegalAI-8B")

# Ask legal questions in Arabic or English
question = "Ω…Ψ§ Ω‡ΩŠ Ω…ΨͺΨ·Ω„Ψ¨Ψ§Ψͺ Ψͺأسيس Ψ΄Ψ±ΩƒΨ© في Ψ§Ω„Ψ³ΨΉΩˆΨ―ΩŠΨ©ΨŸ"
response = generate(model, tokenizer, question, max_tokens=200)
print(response)

⚑ Technical Specifications

  • β€”Base Architecture: Qwen3ForCausalLM
  • β€”Model Size: 8.0B parameters
  • β€”Quantization: 8-bit optimized
  • β€”Context Length: 131,072 tokens
  • β€”Languages: Arabic (primary), English (secondary)
  • β€”Vocabulary Size: 151,936 tokens
  • β€”Framework: Apple MLX optimized
  • β€”License: Apache 2.0

🎯 Specialized Capabilities

Legal Domains Covered

  • β€”Corporate Law - Business formation, partnerships, mergers
  • β€”Commercial Law - Contracts, trade regulations, dispute resolution
  • β€”Investment Law - Foreign investment rules, SAGIA guidelines
  • β€”Labor Law - Employment contracts, worker rights, Saudization
  • β€”Real Estate Law - Property ownership, development regulations
  • β€”Islamic Banking - Sharia-compliant finance, sukuk, murabaha

Key Features

  • β€”βœ… Expert Legal Analysis - Detailed case law interpretation
  • β€”βœ… Regulatory Compliance - Up-to-date legal requirements
  • β€”βœ… Document Drafting - Legal document templates and review
  • β€”βœ… Cross-Reference - Islamic law integration with modern statutes
  • β€”βœ… Multilingual Support - Arabic legal terminology with English explanations

πŸ”§ Advanced Configuration

Memory Requirements

  • β€”Minimum: 16GB RAM
  • β€”Recommended: 32GB RAM for optimal performance
  • β€”Apple Silicon: M1/M2/M3 optimized with MLX

Context Utilization

The model supports up to 131K tokens context length, enabling:

  • β€”Full legal document analysis
  • β€”Multi-case precedent review
  • β€”Complex regulatory interpretation
  • β€”Comprehensive legal research

βš–οΈ Legal Disclaimer

Important Notice: SaudiLegalAI-8B is an AI assistant designed to provide general legal information and research support. This model:

  • β€”βŒ Does NOT replace professional legal counsel
  • β€”βŒ Should NOT be used for final legal decisions
  • β€”βŒ Cannot guarantee legal accuracy in all cases
  • β€”βœ… Is intended for research and preliminary analysis only

Always consult qualified Saudi legal professionals for official legal advice and court proceedings.

πŸ—οΈ Model Development

Developer: Abdul Wasey Institution: Legal AI Research Initiative Training Data: Comprehensive Saudi legal corpus including:

  • β€”Saudi Commercial Court decisions (10,000+ cases)
  • β€”Ministry of Justice regulations
  • β€”SAGIA investment guidelines
  • β€”Islamic jurisprudence (Fiqh) texts
  • β€”Vision 2030 legal framework updates

Training Methodology:

  • β€”Advanced LoRA fine-tuning on legal specialization
  • β€”Multi-stage training: Foundation β†’ Application β†’ Integration
  • β€”Quality validation with legal expert review
  • β€”Continuous updates with regulatory changes

πŸ“ž Support & Contact

For technical support, model updates, or collaboration opportunities:

  • β€”Developer: Abdul Wasey
  • β€”Email: a.wasey40@gmail.com
  • β€”Research Focus: Saudi Legal AI, Islamic Jurisprudence Technology
  • β€”Updates: Regular model updates with legal system changes

SaudiLegalAI-8B - Bridging Traditional Islamic Law with Modern Saudi Legal Practice

Developed with respect for Islamic principles and Saudi legal traditions πŸ‡ΈπŸ‡¦