---
license: other
license_name: hayula-research-license-v1
license_link: https://hayula.xyz/license
language:
- ar
- en
tags:
- arabic
- bilingual
- llama
- lora
- qwen2.5
- averroes
- hayula
pipeline_tag: text-generation
base_model: hayulalab/Averroes-Q-Instruct
---
# الخوارزمي / Hayula-Algorithm-7B-LoRA
**تطوير البرمجيات** — 19,962 ثنائي تعليمي للبرمجة من مجموعة Averroes
---
## English
### Hayula-Algorithm-7B-LoRA
**Code Development Specialist** — LoRA adapter fine-tuned on 19,962 code instruction pairs from Averroes corpus.
Named after Al-Khwarizmi, the father of algebra and algorithms.
| Property | Value |
|:---------|:------|
| **Base Model** | Averroes-Q-Instruct (Qwen2.5-7B) |
| **Method** | LoRA (rank 8, scale 20, 16 layers) |
| **Training** | 500 iterations, lr 1e-5, batch 4 |
| **Hardware** | Apple M2 Ultra (192GB) |
| **Adapter Size** | 44MB |
| **Metrics** | Val loss 1.389 |
### Quick Start
```python
from mlx_lm import load, generate
from mlx_lm.lora import load_adapters
model, tokenizer = load("hayulalab/Averroes-Q-Instruct")
load_adapters(model, "hayulalab/Hayula-Algorithm-7B-LoRA")
messages = [{"role": "user", "content": "Analyze this finding..."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256)
print(response)
```
---
## العربية
### الخوارزمي — نموذج تطوير البرمجيات
مُدرَّب باستخدام LoRA على بيانات برمجية عربية من مجموعة Averroes.
سُمّي على اسم محمد بن موسى الخوارزمي، واضع أسس الجبر والخوارزميات.
| الخاصية | القيمة |
|:--------|:-------|
| **النموذج الأساسي** | Averroes-Q-Instruct |
| **طريقة التدريب** | LoRA (rank 8, scale 20, 16 layers) |
| **عدد التكرارات** | 500 |
| **معدل التعلم** | 1e-5 |
| **الجهاز** | Apple M2 Ultra (192GB) |
| **حجم المحوّل** | 44MB |
| **النتائج** | Val loss 1.389 |
### البدء السريع
```python
from mlx_lm import load, generate
from mlx_lm.lora import load_adapters
model, tokenizer = load("hayulalab/Averroes-Q-Instruct")
load_adapters(model, "hayulalab/Hayula-Algorithm-7B-LoRA")
messages = [{"role": "user", "content": "حلل هذه الثغرة الأمنية..."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256)
print(response)
```
---
### License / الترخيص
Hayula Research License v1.0 — [Full terms](https://hayula.xyz/license)