Free for commercial and non-commercial use, with attribution: credit "Aletheia AI" and keep this notice. Derived from Google Gemma, so the Gemma Terms of Use also apply.
gemma-3-270m-csw (Q8_0 GGUF)
Small and fast model (301M parameters, 514 MB GGUF, runs with llama.cpp on CPU or any GPU) that rewrites text in 37 African languages in two ways: it can code-switch (mix a second language into the base language the way people really talk) and it can rewrite idiomatically (lively, idiom-rich everyday style). It also translates English into the base language. File: csw-rl-q8_0.gguf. The newer, larger model is AletheiaAING/gemma-3-0.8b-csw.
Prompts (one user message, no system prompt; two spaces after the colon)
| Task | You give it | Prompt |
|---|---|---|
eng_hm | English text | <hm> <yor>+<eng>: I will explain the method we use. |
m_hm | text in the base language | <hm> <yor>+<eng>: Èmi yóò ṣàlàyé ọ̀nà tí a ń gbà. |
eng_ood | English text | <ood> <yor>: I will explain the method we use. |
m_ood | text in the base language | <ood> <yor>: Èmi yóò ṣàlàyé ọ̀nà tí a ń gbà. |
hm_ood | already code-switched text | <ood> <yor>+<eng>: Èmi yóò explain ọ̀nà tí a ń gbà. |
| translation | English text | Translate the text to Yoruba: I will explain the method we use. |
hm= human-style mixing of two languages;ood= idiom-rich rewrite. Languages are written as their three-letter code in angle brackets (<yor>), the plain translation prompt uses the language name.+<switch>is required for<hm>and forhm_ood; use only the pairs in the table below, other pairs were not trained.- Decoding: greedy (
temperature 0); for several candidates use temperature 0.7, top-p 0.95. The Gemma chat template is stored in the file, so the server's chat endpoint applies it.
Output
<yor><eng><dev>phrase one | phrase two</dev> text for the code-switch and idiom tasks: the tags name the base (and switch) language, the <dev> block lists the switched phrases or idioms, then the text follows. Show only the text; if there is no <dev> block treat the answer as invalid and sample again. Plain translation answers yor text (language code, then the translation). Stop on <end_of_turn>.
huggingface-cli download AletheiaAING/gemma-3-270m-csw csw-rl-q8_0.gguf --local-dir .
llama-server -m csw-rl-q8_0.gguf --port 8080
curl localhost:8080/v1/chat/completions -H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"<hm> <yor>+<eng>: I will explain the method we use to generate funds for our members."}],"temperature":0,"max_tokens":300}'
Tested output (this file, greedy):
<hm> <yor>+<eng> <yor><eng><dev>explain | make money | members</dev> Èmi yóò explain ọ̀nà tí a ń lò láti make money fún àwọn members wa.
<ood> <hau> <hau><dev>kamar garkuwa | ba ta taba zama gajere ba</dev> Haba abokina, don Allah ka yi haƙuri, wannan aikin zai kare ka kamar garkuwa, ba ta taba zama gajere ba!
Languages and switch languages
| Language | Code | Switch languages (trained pairs) |
|---|---|---|
| Afrikaans | afr | English eng, Zulu zul |
| Amharic | amh | English eng, Arabic ara |
| Bambara | bam | French fra, Wolof wol |
| Cameroon Pidgin | wes | French fra, Ewondo ewo, Duala dua |
| Chichewa (Nyanja) | nya | English eng, Tumbuka tum |
| Ewe | ewe | French fra, English eng |
| Fon | fon | French fra, Yoruba yor |
| Fulah (Fulfulde) | ful | French fra, English eng |
| Ghanaian Pidgin | gpe | Twi twi, Ewe ewe, Ga gaa |
| Hausa | hau | English eng, Arabic ara |
| Igbo | ibo | English eng, Nigerian Pidgin pcm |
| Kikuyu | kik | English eng, Swahili swh |
| Kinyarwanda | kin | French fra, English eng, Swahili swh |
| Kirundi (Rundi) | run | French fra, Swahili swh |
| Kongo | kon | French fra, Lingala lin |
| Lingala | lin | French fra, Kongo kon |
| Luganda | lug | English eng, Swahili swh |
| Luo (Dholuo) | luo | English eng, Swahili swh |
| Malagasy | mlg | French fra, English eng |
| Nigerian Pidgin | pcm | Yoruba yor, Igbo ibo, Hausa hau |
| North Ndebele | nde | English eng, Shona sna |
| Oromo (Afaan Oromoo) | orm | Amharic amh, English eng |
| Sepedi (Northern Sotho) | nso | English eng, Afrikaans afr |
| Sesotho | sot | English eng, Afrikaans afr |
| Setswana | tsn | English eng, Afrikaans afr |
| Shona | sna | English eng, North Ndebele nde |
| Somali | som | Arabic ara, English eng, Italian ita, Amharic amh |
| Swahili | swh | English eng, Arabic ara, Sheng sheng |
| Swati | ssw | English eng, Zulu zul |
| Tigrinya | tir | Amharic amh, English eng |
| Tsonga | tso | English eng, Zulu zul |
| Tumbuka | tum | English eng, Chichewa (Nyanja) nya |
| Twi | twi | English eng, Ghanaian Pidgin gpe |
| Wolof | wol | French fra, Arabic ara |
| Xhosa | xho | English eng, Afrikaans afr |
| Yoruba | yor | English eng, Nigerian Pidgin pcm |
| Zulu | zul | English eng, Afrikaans afr |
Intended use and limitations
- Outputs are machine-generated and not reviewed by native speakers: they can contain unnatural phrasing, invented idioms or proverbs, wrong tone marks and meaning drift. Pidgin outputs keep much English because English words are normal Pidgin.
- Quality varies by language and by pair; low-resource languages are weaker.
- It rewrites, it does not translate faithfully: it can drop or change content and add devices that are not in the source.
- No added safety training; do not use the outputs where correctness matters without human review.