You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

moore-lm

Un petit modèle de langue de type GPT entraîné from scratch sur du texte en mooré (langue parlée principalement au Burkina Faso, code ISO mos).

Architecture

Paramètre Valeur
Couches 4
Têtes d'attention 4
Dimension embed. 768
Longueur contexte 512
Taille vocab. 8000
Tokenizer BPE maison (BPETokenizerSimple)

Meilleure perte de validation : 2.744815540313721.

Utilisation

Le modèle utilise une architecture et un tokenizer personnalisés. Il faut récupérer le code et les fichiers du dépôt :

from huggingface_hub import snapshot_download
import os, torch

# Télécharge tout le dépôt (code + poids + tokenizer)
path = snapshot_download("ouilyh/moore-lm")
os.chdir(path)  # le tokenizer charge vocab.json / vocab.bpe depuis le cwd

from gpt import GPTModel
from tokenizer.bpe_tokenizer_simple import BPETokenizerSimple
from generate_text import generate
from utils import text_to_token_ids, token_ids_to_text

model = GPTModel.from_pretrained("ouilyh/moore-lm")
model.eval()
tokenizer = BPETokenizerSimple()

prompt = "Ne y yibeoogo"
ids = generate(
    model=model,
    idx=text_to_token_ids(prompt, tokenizer),
    max_new_tokens=50,
    context_size=512,
    temperature=0.7,
    top_k=40,
)
print(token_ids_to_text(ids, tokenizer))

Limites

Modèle expérimental de petite taille, entraîné sur un corpus limité. Les générations peuvent être incohérentes et ne doivent pas être utilisées en production.

Downloads last month
1,173
Safetensors
Model size
42.1M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support