Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

sbourziq1337/Darija-GPT

Domaine:

natural language processing

Type de record:

modelsoftware
Créateur:
sbo
Hôte:
# Darija GPT A tiny GPT-style language model built from scratch in C++17, trained on Moroccan Darija (Moroccan Arabic) text. No PyTorch, no TensorFlow — just raw C++ with a custom autograd engine. --- ## What is this? This project implements a complete transformer-based language model (GPT architecture) entirely in C++ from the ground up. It includes: - **Custom autograd engine** with forward/backward passes - **Byte-level tokenizer** that handles any language natively - **Multi-head self-attention** with causal masking - **Transformer blocks** with LayerNorm and residual connections - **GELU activation** and feed-forward networks - **Cross-entropy loss** with numerically stable softmax - **SGD optimizer** with gradient clipping - **Text generation** with temperature, top-k, and repetition penalty - **Model save/load** in a custom binary format - **Interactive chat mode** ### Architecture ``` Input Tokens | v +---------------+ | Embedding | Token embeddings + Position embeddings +---------------+ | v +---------------+ +---------------+ | Transformer | --> | Transformer | --> ... (x N layers) | Block 1 | | Block 2 | +---------------+ +---------------+ | v +---------------+ | LayerNorm | +---------------+ | v +---------------+ | Linear (LM | Language modeling head | Head) | +---------------+ | v Logits -> Softmax -> Next Token Prediction ``` --- ## Quick Start ### Prerequisites - C++17 compatible compiler (g++ or clang++) - `make` - A text file with Darija (or any) text at `data/darija.txt` ### Build ```bash make ``` This creates two executables: - `./llm` — Training and generation - `./chat` — Interactive chat mode ### Train ```bash ./llm ``` The model will: 1. Load `data/darija.txt` 2. Train for 10,000 steps (default, configurable in `src/main.cpp`) 3. Save weights to `models/darija_gpt.bin` 4. Generate sample text from prompts ### Chat ```bash ./chat models/darija_gpt.bin ``` Commands: - `/quit …

Visit

github.com

Languages

Arabic, Algerian SpokenArabic, Moroccan Spoken

Similaires

Duino/Darija-GPT-v2Kirouane-Ayoub/Darija-GPTIyadKouloughli/GPT-For-Darija-Smalleyoaab/Ethio-Gptgonifola/mbira-gptMultilingual GPT model

Duino/Darija-GPT-v2

Kirouane-Ayoub/Darija-GPT

# Build and Train GPT2 Model from Scratch : ## Overview Welcome to the **Darija-GPT** project, whe

IyadKouloughli/GPT-For-Darija-Small

# 🇩🇿 Darija-GPT: Generative AI for Algerian Dialect **Darija-GPT** is a project dedicated to buildi

eyoaab/Ethio-Gpt

this is an ethiopian version of gpt # Ethio-Gpt ## Description **Ethio-Gpt** : is an AI-powered c

gonifola/mbira-gpt

Mbira GPT DJ Station — African Music AI Platform. Interactive mbira variation explorer with tuning s

Multilingual GPT model

We introduce a family of autoregressive GPT-like models with 1.3 billion parameters trained on 60 languages from 25 language families using Wikipedia and Colossal Clean Crawled Corpus. We reproduce the GPT-3 architecture using GPT-2 sources and the sparse attentio