Instructions to use AfricaComputeFund/Monarch-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AfricaComputeFund/Monarch-2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "AfricaComputeFund/Monarch-2") - Notebooks
- Google Colab
- Kaggle
Monarch 2
A partner for your hardest problems.
Monarch 2 is Africa Compute Fund's 9-billion-parameter model adaptation, developed to make capable AI more useful for the work people, businesses, researchers and institutions actually do. It combines a strong general-purpose foundation with additional research on African languages, economic and development data, mathematical reasoning, software, and tool-oriented tasks.
Built for real work. From interpreting country-year economic indicators and reviewing institutional documents to developing software and working across languages, Monarch 2 is intended to be a useful foundation for applications—not a language-only demonstration.
This release is the trained, independently evaluated PEFT LoRA adapter for Qwen3.5-9B. It is not a standalone BF16 merged checkpoint. Load it on top of the exact pinned upstream model. The architecture's text-and-vision capabilities come from Qwen3.5; this adaptation has not been separately validated for improved image or video understanding.
Explore: Launch article · Research & training report · Monarch Chat · Monarch API · Monarch Cloud
Why Monarch 2
Useful intelligence needs more than fluent answers. It must be able to reason over unfamiliar information, work with dates and figures, recognize regional and institutional context, communicate across languages, and connect to the systems where work happens.
The Monarch 2 research programme therefore asks a practical question: can a capable general-purpose model be measurably improved on Africa-relevant and professional tasks without giving up its broader utility?
The current 9B study uses a frozen upstream reference and a source-traceable supervised adaptation. Both were evaluated on the same held-out material. The results show gains on the measured tasks; they do not establish superiority on every language, every institution's data, or all general AI benchmarks.
Built for real work
| Area | Example uses |
|---|---|
| Economics and development | Work with World Development Indicators, country-year comparisons, economic series, units, growth rates, debt, trade and human-development questions. |
| Businesses and markets | Research industries, draft analyses, organize company information and support investment or market-research workflows. |
| Institutions and policy | Search and summarize reports, compare policies, prepare briefs and organize evidence for human review. |
| Research and engineering | Explore technical questions, mathematics and structured research material; assist with programming and documentation. |
| Multilingual products | Build interfaces for English, French, Portuguese and the eight African-language research categories below. |
| Software and workflows | Generate or review code and draft tool-call structures inside a separately governed application. |
These are intended application areas, not individually certified deployment capabilities. For numerical, financial, legal, scientific, medical or public-sector decisions, verify outputs against authoritative data and keep appropriate human oversight.
Research and evaluation
The independent 9B comparison
The experiment adapts a fixed revision of Qwen/Qwen3.5-9B using rank-16, alpha-16 LoRA, completion-only supervision and a bounded, provenance-tracked curriculum. The matched held-out comparison covers 1,885 examples: 1,083 multilingual examples, 677 general/technical examples and 125 World Development Indicators examples. The research report documents the source partitions, scoring and independent expansion of the Swahili and mathematics material.
All 18 measured categories showed lower negative log-likelihood (NLL) for the adaptation than for the unchanged reference. NLL measures how much probability a model assigns to a specified expected continuation (lower is better). A reduction in NLL is not the same as an improvement in task success rate, factual accuracy, safety, or deployment reliability.
Results at a glance
| Evaluation | Unchanged Qwen3.5-9B reference | Monarch 2 adaptation | Interpretation |
|---|---|---|---|
| World Development Indicators, 125 held-out source-grounded questions | 51.2% exact answers (64/125) | 85.6% (107/125) | +34.4 percentage points; 43 additional correct answers on this defined task |
| MMMLU Swahili, 13,937 multiple-choice questions | 43.37% (6,045 correct) | 49.54% (6,904 correct) | +859 correct answers in matched scoring |
| African-language and other language continuation tasks | Reference continuation NLL | Lower in all 11 evaluated language groups | Task-specific NLL reductions of 17.6%–41.7% |
| General and technical continuation tasks | Reference continuation NLL | Lower in all 6 measured categories | Includes coding, math, STEM, conversation and tool-oriented text |
The WDI accuracy and Swahili MMMLU figures above are adapted-model results. They are not general leaderboard scores.
African-language coverage
The eight African-language research categories are Amharic, Hausa, Igbo, Somali, Swahili, Xhosa, Yoruba and Zulu. English, French and Portuguese were also evaluated.
| Language | Held-out examples | Relative NLL reduction |
|---|---|---|
| Hausa | 120 | 40.7% |
| Amharic | 61 | 37.3% |
| Somali | 120 | 29.2% |
| Igbo | 115 | 27.4% |
| Zulu | 120 | 26.2% |
| Xhosa | 39 | 23.0% |
| Swahili | 70 | 18.1% |
| Yoruba | 88 | 17.6% |
| Portuguese | 120 | 41.7% |
| English | 120 | 35.6% |
| French | 110 | 30.7% |
These are matched continuation-loss measurements on specific held-out cohorts, not language-wide accuracy or fluency percentages. The Swahili result also includes separately verified additional material and the MMMLU multiple-choice evaluation noted above.
Technical and general tasks
| Evaluation category | Held-out examples | Relative NLL reduction |
|---|---|---|
| Tool-oriented completions | 120 | 65.3% |
| STEM | 120 | 28.0% |
| Coding | 120 | 25.9% |
| Mathematics | 77 | 22.6% |
| Conversation | 120 | 22.7% |
| Verified mathematics reasoning | 120 | 19.7% |
Important: Tool-call continuation NLL is not a measurement of real-world autonomous agent reliability. Coding continuation NLL is not a pass@1 score. The separately running full frontier benchmark campaign is not represented as complete here.
Economic knowledge: why WDI matters
The World Bank's World Development Indicators organize economic and social development information by indicator, country, year and unit. They include measures of poverty and inequality, population and health, education and work, energy and environment, economic structure, public institutions, finance, trade and global linkages.
Good answers depend on distinguishing, for example, GDP level from GDP growth, current US dollars from real growth, and national totals from per-capita measures. The 85.6% result is confined to the 125-question held-out WDI evaluation. It does not imply the weights contain an always-current copy of the database. For production analysis of live economic series, connect an authoritative data source and cite the returned observations.
Training material and reproducibility
The documented curriculum draws from attributed instruction, language, mathematics and general-retention sources, including Aya, a separately sourced Swahili supplement, historical World Bank WDI observations, NVIDIA Nemotron post-training material, OpenR1 mathematics and a limited UltraChat supplement. Source attribution, frozen splits and held-out identity are recorded in the accompanying report.
This release does not publish the underlying training corpus or held-out questions. Weights, tokenizer/processor assets and a custody manifest are present here; source evidence is available in the report. Dataset licenses and use conditions remain those of their original authors.
The work was developed by Africa Compute Fund, Nairobi, Kenya, using large-scale research compute integrated with the Monarch platform. We acknowledge CINECA, the AI Hub for Sustainable Development, UNDP and the wider programme partners, as well as the upstream model and dataset contributors.
Use the model
What is in this repository?
adapter_model.safetensors— the trained LoRA weights; the uploaded shard was checked against the frozen training-source SHA-256.adapter_config.json— PEFT adapter configuration.- Tokenizer/processor support files for compatible Transformers workflows.
MONARCH2-CUSTODY.json— pinned base revision, scientific lineage, published-file fingerprints and source provenance.- This model card.
Base model: Qwen/Qwen3.5-9B
Pinned base revision: c202236235762e1c871ad0ccb60c8ee5ba337b9a
Adaptation: LoRA (rank 16; alpha 16), supervised fine-tuning
Format: PEFT adapter / Safetensors; not a merged BF16 checkpoint
License: Apache-2.0, retaining upstream attribution
Repository status: Public visibility is controlled by the repository owner.
Python example
Install recent compatible versions of torch, transformers, accelerate, and peft. Qwen3.5 requires Transformers support for its architecture and a hardware/memory configuration appropriate for a 9B multimodal model.
from transformers import AutoModelForImageTextToText, AutoProcessor
from peft import PeftModel
BASE = "Qwen/Qwen3.5-9B"
REVISION = "c202236235762e1c871ad0ccb60c8ee5ba337b9a"
ADAPTER = "AfricaComputeFund/Monarch-2"
base_model = AutoModelForImageTextToText.from_pretrained(
BASE, revision=REVISION, device_map="auto", dtype="auto"
)
processor = AutoProcessor.from_pretrained(BASE, revision=REVISION)
model = PeftModel.from_pretrained(base_model, ADAPTER)
model.eval()
messages = [
{"role": "user", "content": [{"type": "text", "text": "Explain the difference between nominal and real GDP."}]}
]
inputs = processor.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=192, do_sample=False)
print(processor.batch_decode(
outputs[:, inputs["input_ids"].shape[-1]:],
skip_special_tokens=True
)[0])
The example is a loading pattern, not a fresh, version-pinned hardware compatibility certification. For your environment, consult the latest Qwen3.5 upstream instructions and validate the exact runtime versions before deployment.
How this relates to Monarch Chat and the API
The model weights are one component. Monarch Chat, the Monarch API and Monarch Cloud can add retrieval, tools, permissions, voice, applications, monitoring and metered inference. Those capabilities are platform services, not features automatically contained in this adapter.
The absence of a Hugging Face Inference Provider endpoint does not mean the weights are missing. Developers can deploy the base model plus this PEFT adapter on supported infrastructure.
Scope, limitations and responsible use
- Research scope. The research results compare this trained 9B adapter with its unchanged 9B parent under specific frozen protocols; they are not a universal quality or capability guarantee.
- Foundation versus adaptation. Published general-purpose scores for upstream Qwen3.5-9B (e.g., MMLU-Pro, GPQA Diamond and IFEval) belong to the upstream foundation, unless an independent Monarch 2 evaluation explicitly says otherwise. Do not attribute upstream scores to this adapter.
- Current data. The model is not a live data retrieval service. Economic figures, laws, policies, markets and statistics change; refresh and verify information against current sources.
- Languages. Improvement on the measured cohorts does not establish equal coverage for every dialect, orthography, domain or speaker.
- Safety and fairness. As with other generative models, outputs can be incorrect, biased, misleading or unsuitable for consequential use. Apply safety testing, access controls, privacy protections and human review.
- Tool use. An application must validate tool arguments and permissions separately. Lower loss on tool-oriented continuations does not authorize autonomous actions.
- Multimodality. Text/image/video capacities follow the upstream architecture and runtime; the 9B adaptation evaluation reported here is not a visual benchmark.
- Merged checkpoints. This repository's released weights are a LoRA delta. A standalone merged BF16 model requires a separate validated export and is not implied by the presence of this adapter.
- Frontier evaluation. Full adapted-model frontier benchmarking is separate from the completed independent held-out study; any still-pending suites are not represented as passed.
Research and attribution
- Monarch 2 — Introducing Monarch 2: A partner for your hardest problems — launch story, intended uses and adaptation research context.
- Monarch 2 Training Completion Report — training design, source attribution, metric definitions, original tables, provenance and limitations.
- Qwen3.5-9B — upstream model, architecture, license and supported deployment methods.
- Africa Compute Fund — the organization behind Monarch and its associated compute, research and developer platform.
Source lineage: training job 60696161 · independent evaluation 60742163 · held-out expansion 60753718. Consult MONARCH2-CUSTODY.json for the independently hashed weight file.
Publisher: Africa Compute Fund · Nairobi, Kenya · intro@africacomputefund.com
Monarch 2: capable, practical intelligence, grounded in the contexts where people actually work.
- Downloads last month
- -