How to use from
Docker Model Runner
docker model run hf.co/BLACK0X80/horus-egy-coder
Quick Links

Horus-Egy-Coder

Egyptian Arabic coding assistant โ€” a fine-tuned Llama 3.1-8B model specialized in helping Arabic and Egyptian developers write, debug, and understand code.

Built in Egypt ๐Ÿ‡ช๐Ÿ‡ฌ | Powered by Unsloth + TRL


Model Description

horus-egy-coder is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct trained to assist Arabic-speaking developers โ€” with native understanding of Egyptian Arabic technical dialect. It can explain code in Arabic, help debug in conversational Egyptian, and write clean code with Arabic comments.

Property Value
Base model meta-llama/Llama-3.1-8B-Instruct
Parameters 1B (quantized BF16)
Training Unsloth + HuggingFace TRL (2x faster)
License Apache 2.0
Language Arabic ๐Ÿ‡ช๐Ÿ‡ฌ / English
Task Code generation, explanation, debugging

Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "BLACK0X80/horus-egy-coder"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

messages = [
    {
        "role": "system",
        "content": "ุฃู†ุช ู…ุณุงุนุฏ ุจุฑู…ุฌุฉ ุจูŠุชูƒู„ู… ุนุฑุจูŠ ู…ุตุฑูŠ. ุจุชุดุฑุญ ุงู„ูƒูˆุฏ ุจุงู„ุนุฑุจูŠ ูˆุจุชุณุงุนุฏ ุงู„ู…ุทูˆุฑูŠู†."
    },
    {
        "role": "user", 
        "content": "ุงูƒุชุจู„ูŠ function ุจู€ Python ุจุชุญุณุจ ุงู„ู€ factorial"
    }
]

input_ids = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt"
).to(model.device)

output = model.generate(
    input_ids,
    max_new_tokens=512,
    temperature=0.7,
    do_sample=True
)

print(tokenizer.decode(output[0][input_ids.shape[1]:], skip_special_tokens=True))

Example Interactions

Example 1 โ€” Code explanation in Arabic:

User: ูุณุฑู„ูŠ ุงู„ูƒูˆุฏ ุฏู‡
      for i in range(len(arr)-1):
          for j in range(len(arr)-i-1):
              if arr[j] > arr[j+1]:
                  arr[j], arr[j+1] = arr[j+1], arr[j]

Model: ุฏู‡ Bubble Sort โ€” ุฎูˆุงุฑุฒู…ูŠุฉ ุชุฑุชูŠุจ ุจุณูŠุทุฉ.
       ุจุชุนู…ู„ loop ุนู„ู‰ ุงู„ู€ array ูˆุจุชู‚ุงุฑู† ูƒู„ ุนู†ุตุฑ ุจุงู„ูŠ ุจุนุฏู‡ุŒ
       ู„ูˆ ุงู„ุนู†ุตุฑ ุงู„ุฃูƒุจุฑ ุฌู‡ ุงู„ุฃูˆู„ ุจุชุจุฏู„ู‡ู…...

Example 2 โ€” Debugging:

User: ุงู„ูƒูˆุฏ ุฏู‡ ุจูŠุทู„ุน IndexErrorุŒ ู…ุด ุนุงุฑู ู„ูŠู‡
Model: ุงู„ู…ุดูƒู„ุฉ ููŠ ุงู„ุณุทุฑ ุฏู‡... ุฌุฑุจ ูƒุฐุง...

๐Ÿ”ข GGUF Version (ู„ู„ุฃุฌู‡ุฒุฉ ุงู„ู…ุญุฏูˆุฏุฉ)

ู„ูˆ ุฌู‡ุงุฒูƒ ู…ุด ุนู†ุฏู‡ GPU ูƒุจูŠุฑุŒ ุงุณุชุฎุฏู… ุงู„ู†ุณุฎุฉ ุงู„ู…ุถุบูˆุทุฉ:

BLACK0X80/horus-egy-coder-Q4_K_M-GGUF

# ุชุดุบูŠู„ ุจู€ llama.cpp
./llama-cli -m horus-egy-coder-Q4_K_M.gguf \
  -p "ุฃู†ุช ู…ุณุงุนุฏ ุจุฑู…ุฌุฉ ุนุฑุจูŠ ู…ุตุฑูŠ." \
  --chat-format llama-3

Training Details

  • Framework: Unsloth (2x faster training, 60% less memory)
  • Library: HuggingFace TRL (SFT Trainer)
  • Base: unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
  • Quantization: BF16

Intended Use

Good for:

  • ุดุฑุญ ุงู„ูƒูˆุฏ ุจุงู„ุนุฑุจูŠ ุงู„ู…ุตุฑูŠ
  • ูƒุชุงุจุฉ functions ูˆscripts ุจู€ Python
  • Debugging ู…ุน ุชูุณูŠุฑ ุงู„ุฃุฎุทุงุก ุจุงู„ุนุฑุจูŠ
  • ุชุนู„ูŠู… ุงู„ุจุฑู…ุฌุฉ ู„ู„ู…ุจุชุฏุฆูŠู† ุงู„ุนุฑุจ

Limitations:

  • ุงู„ู†ู…ูˆุฐุฌ fine-tuned ุนู„ู‰ ุจูŠุงู†ุงุช ู…ุญุฏูˆุฏุฉ โ€” ู…ู…ูƒู† ูŠุบู„ุท ููŠ ูƒูˆุฏ ู…ุนู‚ุฏ ุฌุฏุงู‹
  • ู…ุด ู…ุชุฎุตุต ููŠ ู„ุบุงุช ุบูŠุฑ Python ุจู†ูุณ ุงู„ูƒูุงุกุฉ
  • ู…ุด ู…ู†ุงุณุจ ู„ู€ production code ุจุฏูˆู† ู…ุฑุงุฌุนุฉ ุจุดุฑูŠุฉ

About HORUS-AI

HORUS-AI is an Egyptian AI initiative focused on building Arabic and Egyptian-dialect AI models. Named after the ancient Egyptian god of knowledge, we aim to make AI accessible to Arabic-speaking developers.


Citation

@misc{horus-egy-coder-2025,
  title={Horus-Egy-Coder: Egyptian Arabic Coding Assistant},
  author={BLACK0X80 and HORUS-AI},
  year={2025},
  url={https://huggingface.co/BLACK0X80/horus-egy-coder},
  note={Fine-tuned from meta-llama/Llama-3.1-8B-Instruct}
}

Made with โค๏ธ in Egypt ๐Ÿ‡ช๐Ÿ‡ฌ

Downloads last month
19
Safetensors
Model size
1B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for BLACK0X80/horus-egy-coder

Finetuned
(1506)
this model
Quantizations
1 model