Text Generation
Transformers
Safetensors
Wolof
French
English
qwen2
wolof
senegal
translation
low-resource
qwen2.5
unsloth
lora
conversational
text-generation-inference
Instructions to use ciskoM/wolof-qwen-1.5b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ciskoM/wolof-qwen-1.5b-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ciskoM/wolof-qwen-1.5b-gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("ciskoM/wolof-qwen-1.5b-gguf") model = AutoModelForMultimodalLM.from_pretrained("ciskoM/wolof-qwen-1.5b-gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ciskoM/wolof-qwen-1.5b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ciskoM/wolof-qwen-1.5b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciskoM/wolof-qwen-1.5b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ciskoM/wolof-qwen-1.5b-gguf
- SGLang
How to use ciskoM/wolof-qwen-1.5b-gguf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ciskoM/wolof-qwen-1.5b-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciskoM/wolof-qwen-1.5b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ciskoM/wolof-qwen-1.5b-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciskoM/wolof-qwen-1.5b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use ciskoM/wolof-qwen-1.5b-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ciskoM/wolof-qwen-1.5b-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ciskoM/wolof-qwen-1.5b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ciskoM/wolof-qwen-1.5b-gguf to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ciskoM/wolof-qwen-1.5b-gguf", max_seq_length=2048, ) - Docker Model Runner
How to use ciskoM/wolof-qwen-1.5b-gguf with Docker Model Runner:
docker model run hf.co/ciskoM/wolof-qwen-1.5b-gguf
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
language:
|
| 4 |
+
- wo
|
| 5 |
+
- fr
|
| 6 |
+
- en
|
| 7 |
+
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
library_name: transformers
|
| 10 |
+
tags:
|
| 11 |
+
- wolof
|
| 12 |
+
- senegal
|
| 13 |
+
- translation
|
| 14 |
+
- low-resource
|
| 15 |
+
- qwen2.5
|
| 16 |
+
- unsloth
|
| 17 |
+
- lora
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Wolof Qwen2.5-1.5B — conversational + translation (wo · fr · en)
|
| 21 |
+
|
| 22 |
+
A fine-tune of **Qwen2.5-1.5B-Instruct** for the **Wolof** language. It can hold a
|
| 23 |
+
chat conversation and translate between **Wolof ↔ French ↔ English**.
|
| 24 |
+
|
| 25 |
+
Trained with [Unsloth](https://github.com/unslothai/unsloth) (QLoRA, 4-bit) on a
|
| 26 |
+
single GPU.
|
| 27 |
+
|
| 28 |
+
## Intended use
|
| 29 |
+
|
| 30 |
+
- Wolof ⇄ French ⇄ English translation inside a chat interface
|
| 31 |
+
- Experiments and research on low-resource (Wolof) language modelling
|
| 32 |
+
- A base to iterate on with more conversational Wolof data
|
| 33 |
+
|
| 34 |
+
## How to use
|
| 35 |
+
|
| 36 |
+
**Transformers**
|
| 37 |
+
```python
|
| 38 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 39 |
+
|
| 40 |
+
tok = AutoTokenizer.from_pretrained("ciskoM/wolof-qwen-1.5b")
|
| 41 |
+
model = AutoModelForCausalLM.from_pretrained("ciskoM/wolof-qwen-1.5b", device_map="auto")
|
| 42 |
+
|
| 43 |
+
msgs = [{"role": "user", "content": "Translate to Wolof: Good morning, how are you?"}]
|
| 44 |
+
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 45 |
+
print(tok.decode(model.generate(ids, max_new_tokens=64)[0], skip_special_tokens=True))
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
**GGUF (Ollama / LM Studio / llama.cpp)** — see the companion repo
|
| 49 |
+
`ciskoM/wolof-qwen-1.5b-gguf` (q4_k_m). With Ollama:
|
| 50 |
+
```bash
|
| 51 |
+
ollama create wolof -f Modelfile # Modelfile: FROM ./wolof-qwen.Q4_K_M.gguf
|
| 52 |
+
ollama run wolof
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Example prompts: `Translate to Wolof: …`, `Traduis en wolof : …`,
|
| 56 |
+
`What does "Jamm rekk" mean in English?`, `Nanga def?`
|
| 57 |
+
|
| 58 |
+
## Training data
|
| 59 |
+
|
| 60 |
+
~120k instruction pairs (ShareGPT format), balanced across translation
|
| 61 |
+
directions plus monolingual Wolof:
|
| 62 |
+
|
| 63 |
+
| Source | Content |
|
| 64 |
+
|---|---|
|
| 65 |
+
| `bilalfaye/english-wolof-french-translation` | aligned en/wo/fr sentences |
|
| 66 |
+
| `galsenai/centralized_wolof_french_translation_data` | aligned wo/fr sentences |
|
| 67 |
+
| ALMA / DLIR Wolof e-books (13) | OCR'd authentic Wolof prose |
|
| 68 |
+
| wolofresources.org PDFs + UDHR Wolof | proverbs, tales, vocabulary |
|
| 69 |
+
| Wolof New Testament (bibliamundi) | clean verse-numbered scripture |
|
| 70 |
+
|
| 71 |
+
The dataset is ~96% translation pairs; bidirectional pairs (en2wo, wo2en,
|
| 72 |
+
fr2wo, wo2fr) were generated with varied prompt templates.
|
| 73 |
+
|
| 74 |
+
## Training procedure
|
| 75 |
+
|
| 76 |
+
- Base: `Qwen/Qwen2.5-1.5B-Instruct`, loaded 4-bit
|
| 77 |
+
- LoRA: r=16, alpha=16, dropout=0, on all attention + MLP projections
|
| 78 |
+
- 1 epoch, lr 2e-4, linear schedule, adamw_8bit, seq len 2048
|
| 79 |
+
- Trained on assistant responses only (`train_on_responses_only`)
|
| 80 |
+
- Tooling: Unsloth + TRL `SFTTrainer`/`SFTConfig`
|
| 81 |
+
|
| 82 |
+
## Limitations & honest caveats
|
| 83 |
+
|
| 84 |
+
- **Translation > conversation.** Because the data is overwhelmingly translation
|
| 85 |
+
pairs, the model is strong at translating but **limited at free-flowing Wolof
|
| 86 |
+
conversation**. More conversational Wolof data is the fix, not a bigger model.
|
| 87 |
+
- Wolof is low-resource; expect errors, especially on rare topics, long inputs,
|
| 88 |
+
and Wolof orthography variants.
|
| 89 |
+
- Some training text came from OCR (scanned PDFs) and subtitle-sourced corpora —
|
| 90 |
+
there may be noise, odd register, or artifacts.
|
| 91 |
+
- Not safety-tuned; do not use for high-stakes decisions.
|
| 92 |
+
|
| 93 |
+
## Data & licensing note
|
| 94 |
+
|
| 95 |
+
Model weights derive from Qwen2.5 (Apache-2.0). However, the **training data
|
| 96 |
+
provenance is mixed**: the translation corpora are subtitle/film-sourced and the
|
| 97 |
+
scripture is from a translation that may carry its own copyright. This card is
|
| 98 |
+
released **CC-BY-NC-4.0** as a conservative default. **Verify the licenses of the
|
| 99 |
+
underlying datasets before any commercial use or redistribution.**
|
| 100 |
+
|
| 101 |
+
## Acknowledgements
|
| 102 |
+
|
| 103 |
+
Datasets by bilalfaye and the GalsenAI community; ALMA/DLIR African Language
|
| 104 |
+
Materials Archive; wolofresources.org; Biblia Mundi. Built with Unsloth.
|