DEV.co
Open-Source LLM · anrilombard

mzansilm-125m

MzansiLM is a 125M-parameter decoder-only language model trained on MzansiText, a multilingual corpus covering all eleven official South African languages (Afrikaans, English, Sepedi, Sotho, Swati, Setswana, Tsonga, Venda, Xhosa, Zulu, and Ndebele). It is a research baseline model designed for pretraining, fine-tuning, and evaluation on South African language tasks, not a production chat model.

Source: HuggingFace — huggingface.co/anrilombard/mzansilm-125m
125M
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
176.5k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Developeranrilombard
Parameters125M
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads176.5k
Likes25
Last updated2026-05-19
Sourceanrilombard/mzansilm-125m

What mzansilm-125m is

Decoder-only LlamaForCausalLM architecture with 125M parameters, 30 layers, 512 hidden size, 9 attention heads (3 KV heads), 2048 context length, and flash_attention_2 training. Custom BPE tokenizer with 65536 vocabulary. Requires Transformers 4.52.4+ (Transformers 5.x has validation incompatibility with the explicit head_dim=56 configuration). Available in SafeTensors format.

Quickstart

Run mzansilm-125m locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
from transformers import pipelinepipe = pipeline("text-generation", model="anrilombard/mzansilm-125m")out = pipe("Explain retrieval-augmented generation in one sentence.",           max_new_tokens=128)print(out[0]["generated_text"])

Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.

Deployment

How you'd run it

A typical self-hosted path — open weights, an inference server, your application.

DEV.co builds each layer — from GPU infrastructure to the application.

Best use cases

South African Language NLP Research

Ideal as a reproducible baseline for academic projects targeting Zulu, Xhosa, Setswana, Sepedi, Afrikaans, and other South African languages where pre-existing models are scarce.

Fine-tuning for Downstream Tasks

Suitable foundation for domain-specific adaptation (sentiment analysis, named entity recognition, machine translation) on South African languages via LoRA or full fine-tuning.

Low-Resource Language Modeling

Leverages multilingual training on MzansiText to provide reasonable token representations for low-resource South African languages without requiring billion-parameter models.

Running & fine-tuning it

ESTIMATE: ~500 MB model weights (fp32) to ~250 MB (fp16/bfloat16). Inference on CPU feasible for small batch sizes; GPU (e.g. NVIDIA T4, RTX 3090) recommended for batch processing. Fine-tuning LoRA on 8 GB VRAM plausible; full fine-tuning ~16–24 GB. Verify precision support and actual peak memory empirically.

No explicit LoRA/QLoRA guidance in card. Standard Transformers fine-tuning supported; LoRA feasible given 125M parameter count (smaller adapters). QLoRA quantization plausible but not mentioned. Full fine-tuning on MzansiText or task-specific datasets is primary intended use case per model card.

When to avoid it — and what to weigh

  • Production Chat or Instruction-Following — This is a base language model, not instruction-tuned. It produces raw text continuations, not structured conversations or task-specific responses.
  • Non-South African Language Requirements — Model is optimized for South African languages. Performance on other languages, even English or Afrikaans outside the MzansiText training distribution, is not characterized.
  • Transformers 5.x Compatibility Required — Current version incompatible with Transformers 5.x due to head_dim validation. If your stack mandates Transformers 5, requires manual patching or waiting for upstream fix.
  • High-Throughput Commercial Serving — No evidence of production serving benchmarks, optimization for latency-critical inference, or vLLM/TGI tuning. Research-grade only.

License & commercial use

Apache License 2.0 (OSI-approved permissive license). Allows commercial use, modification, and distribution with attribution and no-liability clause.

Apache 2.0 is a permissive OSI license. Commercial use is permitted provided you include a copy of the license and acknowledge modifications. No gating, no closed-source restrictions. However, intended use is research; no SLA, support, or production guarantees from the developer. Commercial deployment is legally permitted but operationally unsupported.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceUnknown
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceMedium
Security considerations

Standard considerations for open-source transformers: no attestation of input validation, adversarial robustness, or data poisoning defense. Training data (MzansiText corpus) sourced from public/web data; composition and filtering practices not detailed. Recommend security review of downstream fine-tuning data and inference context if handling sensitive South African language content.

Alternatives to consider

Meta Llama 2 / Llama 3 (multilingual variants)

Larger, well-documented, broader language coverage. However, Meta's Llama Community License restricts some commercial use and Llama 2 is now older. Larger memory footprint.

Google mT5 or mBERT

Multilingual encoder-only models with broader pre-training. Better for classification/understanding tasks on South African languages, but not generative text completion.

OpenAI GPT (via API) or other closed-source LLMs

Production-grade, instruction-tuned, supported. No local deployment, higher cost, closed data practices. Not applicable if self-hosted requirement.

Software development agency

Ship mzansilm-125m with senior software developers

Explore self-hosted LLM deployment, custom fine-tuning, or RAG integration for South African language applications. Contact our team to discuss infrastructure, performance tuning, and production readiness.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

mzansilm-125m FAQ

Can I use MzansiLM commercially?
Apache 2.0 license permits commercial use with attribution. However, the model is research-grade with no production SLA or support. Legal use is permitted; operational readiness and liability are your responsibility.
What are the VRAM requirements for inference?
Estimate: ~250–500 MB for model weights (fp16–fp32). Typical inference on CPU is viable; GPU (4–8 GB VRAM) recommended for batch processing. Actual requirements depend on batch size, sequence length, and implementation (Transformers, vLLM, etc.). Test empirically in your environment.
Why does the model fail to load in Transformers 5?
Transformers 5.x rejects the model's LlamaConfig because hidden_size (512) is not divisible by num_attention_heads (9), even though explicit head_dim=56 is in config.json. Workaround: use Transformers 4.52.4+ or patch the validation manually. This is a known upstream limitation.
Is MzansiLM instruction-tuned or chat-optimized?
No. It is a base language model trained for causal language modeling. Outputs are plain text continuations. For instruction-following or chat, fine-tune on instruction-response pairs or use an instruction-tuned model instead.

Software developers & web developers for hire

Need help beyond evaluating mzansilm-125m? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source llms integrations — and maintain them long-term.

Ready to Deploy MzansiLM?

Explore self-hosted LLM deployment, custom fine-tuning, or RAG integration for South African language applications. Contact our team to discuss infrastructure, performance tuning, and production readiness.