ciskoM's picture
Create README.md
66c11fa verified
|
Raw
History Blame Contribute Delete
3.81 kB
metadata
license: cc-by-nc-4.0
language:
  - wo
  - fr
  - en
base_model: Qwen/Qwen2.5-1.5B-Instruct
pipeline_tag: text-generation
library_name: transformers
tags:
  - wolof
  - senegal
  - translation
  - low-resource
  - qwen2.5
  - unsloth
  - lora

Wolof Qwen2.5-1.5B — conversational + translation (wo · fr · en)

A fine-tune of Qwen2.5-1.5B-Instruct for the Wolof language. It can hold a chat conversation and translate between Wolof ↔ French ↔ English.

Trained with Unsloth (QLoRA, 4-bit) on a single GPU.

Intended use

  • Wolof ⇄ French ⇄ English translation inside a chat interface
  • Experiments and research on low-resource (Wolof) language modelling
  • A base to iterate on with more conversational Wolof data

How to use

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("ciskoM/wolof-qwen-1.5b")
model = AutoModelForCausalLM.from_pretrained("ciskoM/wolof-qwen-1.5b", device_map="auto")

msgs = [{"role": "user", "content": "Translate to Wolof: Good morning, how are you?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=64)[0], skip_special_tokens=True))

GGUF (Ollama / LM Studio / llama.cpp) — see the companion repo ciskoM/wolof-qwen-1.5b-gguf (q4_k_m). With Ollama:

ollama create wolof -f Modelfile   # Modelfile: FROM ./wolof-qwen.Q4_K_M.gguf
ollama run wolof

Example prompts: Translate to Wolof: …, Traduis en wolof : …, What does "Jamm rekk" mean in English?, Nanga def?

Training data

~120k instruction pairs (ShareGPT format), balanced across translation directions plus monolingual Wolof:

Source Content
bilalfaye/english-wolof-french-translation aligned en/wo/fr sentences
galsenai/centralized_wolof_french_translation_data aligned wo/fr sentences
ALMA / DLIR Wolof e-books (13) OCR'd authentic Wolof prose
wolofresources.org PDFs + UDHR Wolof proverbs, tales, vocabulary
Wolof New Testament (bibliamundi) clean verse-numbered scripture

The dataset is ~96% translation pairs; bidirectional pairs (en2wo, wo2en, fr2wo, wo2fr) were generated with varied prompt templates.

Training procedure

  • Base: Qwen/Qwen2.5-1.5B-Instruct, loaded 4-bit
  • LoRA: r=16, alpha=16, dropout=0, on all attention + MLP projections
  • 1 epoch, lr 2e-4, linear schedule, adamw_8bit, seq len 2048
  • Trained on assistant responses only (train_on_responses_only)
  • Tooling: Unsloth + TRL SFTTrainer/SFTConfig

Limitations & honest caveats

  • Translation > conversation. Because the data is overwhelmingly translation pairs, the model is strong at translating but limited at free-flowing Wolof conversation. More conversational Wolof data is the fix, not a bigger model.
  • Wolof is low-resource; expect errors, especially on rare topics, long inputs, and Wolof orthography variants.
  • Some training text came from OCR (scanned PDFs) and subtitle-sourced corpora — there may be noise, odd register, or artifacts.
  • Not safety-tuned; do not use for high-stakes decisions.

Data & licensing note

Model weights derive from Qwen2.5 (Apache-2.0). However, the training data provenance is mixed: the translation corpora are subtitle/film-sourced and the scripture is from a translation that may carry its own copyright. This card is released CC-BY-NC-4.0 as a conservative default. Verify the licenses of the underlying datasets before any commercial use or redistribution.

Acknowledgements

Datasets by bilalfaye and the GalsenAI community; ALMA/DLIR African Language Materials Archive; wolofresources.org; Biblia Mundi. Built with Unsloth.