DarijaDZ_cbow_128

128-dimensional CBOW word2vec embeddings for Algerian Darija, trained on the DarijaDZ corpus.

What it is

Family word2vec (CBOW)
Dimension 128
Vocabulary 20,000 SentencePiece unigram pieces
Unit subword piece (a word's vector is the mean of its pieces)

Files: model.safetensors (tensor embeddings, 20000 x 128), unigram_20000.model (the SentencePiece tokenizer), config.json.

Plots

t-SNE of the most frequent corpus words (blue: frequent corpus words, red: curated evaluation words, including Arabizi and French clusters).

t-SNE of frequent words

Training data

The DarijaDZ corpus: Algerian YouTube and TikTok comments in Arabic script, Arabizi and mixed scripts, tokenized with the 20K SentencePiece unigram model shipped here.

Training procedure

CBOW, 256 rows per batch. Negative sampling with 5 negatives, learning rate 0.002, frequent-token subsampling.

How to use

import numpy as np
import sentencepiece as spm
from huggingface_hub import hf_hub_download
from safetensors.numpy import load_file

repo = "nasrellahkharroubi/DarijaDZ_cbow_128"
E = load_file(hf_hub_download(repo, "model.safetensors"))["embeddings"]   # (20000, 128)
sp = spm.SentencePieceProcessor(model_file=hf_hub_download(repo, "unigram_20000.model"))

def vec(word):
    return E[sp.encode(word)].mean(axis=0)   # a word's vector = mean of its piece vectors

Citation

If you use these embeddings in your research, please cite:

Nasrellah Kharroubi.
DarijaDZ: Algerian Darija Word Embeddings.
2026.
Downloads last month
41
Safetensors
Model size
2.56M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train nasrellahkharroubi/DarijaDZ_cbow_128

Collection including nasrellahkharroubi/DarijaDZ_cbow_128