Files
kasawa/README.md
ModelHub XC bac490b098 初始化项目,由ModelHub XC社区提供模型
Model: ghananlpcommunity/kasawa
Source: Original Platform
2026-06-16 07:28:18 +08:00

69 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
library_name: transformers
license: cc-by-4.0
datasets:
- ghananlpcommunity/pristine-twi
language:
- tw
- ak
base_model:
- HuggingFaceTB/SmolLM2-135M
---
# Kasawa — SmolLM2-135M Fine-tuned on Twi
**kasawa** is a compact Twi language model capable of generating coherent twi text as casual language model. It should be noted that this model serves as a base model and it has not undergone intruction tuning.
Built on [SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M) and
trained on the [Pristine Twi Dataset](https://huggingface.co/datasets/ghananlpcommunity/pristine-twi)
— ~999k rows of clean, naturally sounding Twi text spanning four styles:
narrative, dialogue, monologue, and storytelling, grounded in real Ghanaian
news topics and named entities.
Try it the yourself in the [demo](https://huggingface.co/spaces/ghananlpcommunity/kasawa).
## Intended Use
This model is released for **research and non-profit use only**. The primary goal
is to lower the barrier for experimentation in the Twi/Akan NLP space —
particularly as a base for instruction-tuned models targeting more advanced tasks
such as summarization, question answering, and dialogue in Twi.
It can also be very useful as a backbone for LLM-based **text-to-speech (TTS)** and **automatic
speech recognition (ASR)** systems, as well as **machine translation (MT)** models
involving Twi.
## Quick Start
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model = AutoModelForCausalLM.from_pretrained(
"ghananlpcommunity/kasawa",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("ghananlpcommunity/kasawa")
gen = pipeline("text-generation", model=model, tokenizer=tokenizer)
prompt = "Ɔpɛnimaa bosome, 2025,"
out = gen(prompt, max_new_tokens=200, do_sample=True, temperature=0.65, top_p=0.9)
print(out[0]["generated_text"])
```
## Training Details
| | |
|---|---|
| Base model | SmolLM2-135M |
| Dataset | Pristine Twi (~999k rows, ~250M tokens) |
| Epochs | ~2 |
| Hardware | 1× 80GB GPU |
## Citation & Community
Created by **Mich-Seth Owusu** for the [Ghana NLP Community](https://huggingface.co/ghananlpcommunity).
If you build on this model, please credit the original work and consider sharing
your results back with the community.
**License:** Research and non-profit use only.