Model reference · open weights

AfriqueQwen

LLMs McGill-NLP Text gen 1 build Open weights 1k dl/mo

AfriqueQwen is an open-weight language model from McGill-NLP. AfriqueQwen-4B (BF16) weighs 8.8 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • AfriqueQwen-4B is a 4.0B parameter causal language model developed by McGill-NLP for text generation.
  • It is based on Qwen3-4B-Base and adapted for 20 African languages through continued pre-training on approximately 26B tokens.
  • The model supports a context length of 32,768 tokens and is released under the cc-by-4.0 license.

Summary of the McGill-NLP/AfriqueQwen-4B model card, 2026-10-01

What it is

Released byMcGill-NLP
Released2026-04-20
Parameters4.0B
VRAM8.8 GB for the weights

What it runs on

Memory and cards for AfriqueQwen-4B (BF16)

8.8 GBweights, file size
147 MBcache per 1K tokens
707 MBruntime overhead, at least
32,768 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB1—13K11.6 GB
RTX 4060 Ti 16 GB41all 32K15.4 GB
RTX 3090 24 GB112all 32K23.4 GB
RTX 4090 24 GB112all 32K23.4 GB
RTX 5090 32 GB174all 32K31.0 GB
L40S 48 GB287all 32K44.0 GB
A100 80 GB5614all 32K78.2 GB
H100 80 GB5313all 32K78.1 GB
RTX PRO 6000 Blackwell 96 GB6616all 32K93.8 GB
DGX Spark (GB10) 128 GB unified7719all 32K107 GB
H200 141 GB10225all 32K138 GB
B200 180 GB13433all 32K176 GB
2× RTX 3060 12 GB
tensor parallel
102all 32K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
174all 32K15.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
110.7 GB14.4 GB
515.6 GB33.7 GB
819.2 GB48.2 GB
1628.9 GB86.8 GB
3248.2 GB164 GB
6486.8 GB319 GB

One card, with vLLM's small-card settings.

From the model card

What McGill-NLP says about AfriqueQwen

Read the model card

Model Overview

AfriqueQwen-4B is part of the AfriqueLLM suite, a collection of open language models adapted to 20 African languages through continued pre-training (CPT) on ~26B tokens. This model is based on Qwen/Qwen3-4B-Base and has been specifically adapted for improved performance on African languages while maintaining strong capabilities in high-resource languages.

Our experiments show that Qwen 3 models achieve the best performance among all base models tested, better preserving performance in high-resource languages after CPT and achieving strong results on long-context tasks such as document-level translation.

Key Features

  • Type: Causal Language Model (Base/Pre-trained)
  • Base Model: Qwen 3 4B
  • Parameters: 4B
  • Context Length: 32,768 tokens (native)
  • Training Tokens: ~26B tokens of carefully curated multilingual data

Supported Languages

AfriqueQwen-4B has been adapted for the following 20 African languages:

LanguageCodeFamilyScript
Afrikaansafr_LatnGermanicLatin
Swahiliswh_LatnBantuLatin
Moroccan Arabicary_ArabSemiticArabic
Somalisom_LatnCushiticLatin
Amharicamh_EthiSemiticEthiopic
Egyptian Arabicarz_ArabSemiticArabic
Hausahau_LatnChadicLatin
Kinyarwandakin_LatnBantuLatin
Zuluzul_LatnBantuLatin
Igboibo_LatnVolta-NigerLatin
Plateau Malagasyplt_LatnAustronesianLatin
Xhosaxho_LatnBantuLatin
Shonasna_LatnBantuLatin
Yorubayor_LatnVolta-NigerLatin
Nyanjanya_LatnBantuLatin
Southern Sothosot_LatnBantuLatin
Tigrinyatir_EthiSemiticEthiopic
Tunisian Arabicaeb_ArabSemiticArabic
Oromogaz_LatnCushiticLatin
Tswanatsn_LatnBantuLatin

High-resource languages used for catastrophic forgetting mitigation: English, French, Portuguese, Arabic

Training Data

Our training corpus combines multiple high-quality sources:

  • African Monolingual Data (~22.8B tokens): FineWeb2, WURA, and MADLAD-400
  • Code (~1B tokens): CornStack-Python for reasoning capabilities
  • Mathematics (~1B tokens): FineMath-4+ for mathematical understanding
  • Synthetic Data (~324M tokens): GPT-4.1 translated domain-specific content across 10 domains

We use UniMax sampling to create a balanced distribution, capping high-resource languages at approximately 1B tokens and upsampling lower-resource languages for up to five epochs.

Quickstart

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "McGill-NLP/AfriqueQwen-4B"

# Load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

# Prepare the model input
prompt = "Bawo ni o ṣe n ṣe?"  # Yoruba: "How are you doing?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

# Generate text
generated_ids = model.generate(
    **inputs,
    max_new_tokens=100,
)
output = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
print(output)

Deployment

For deployment, you can use vllm or sglang to create an OpenAI-compatible API endpoint:

vLLM:

vllm serve McGill-NLP/AfriqueQwen-4B

SGLang:

python -m sglang.launch_server --model-path McGill-NLP/AfriqueQwen-4B

Training Details

Hyperparameters

  • Learning Rate: 5e-5 (with warmup and cosine decay)
  • Context Length: 16,384 tokens
  • Optimizer: AdamW
  • Precision: BF16 mixed precision

Infrastructure

Training was conducted using the LLaMA-Factory framework on up to 64 NVIDIA H100 GPUs with:

  • DeepSpeed ZeRO-1/ZeRO-2
  • Flash Attention 3
  • Sequence packing
  • Liger Kernel optimizations

Evaluation

All AfriqueLLM models are evaluated on multiple multilingual benchmarks. FLORES is reported only in the English-to-target direction (eng->xxx):

ModelAfriMGSMAfriMMLUAfriXNLIBelebeleFLORES (eng->xxx)INJONGSIB-200OverallΔ (Δ %)
Gemma3-4B10.2433.8937.7645.7935.3655.5263.5940.31
AfriqueGemma-4B14.8636.7339.6250.5254.9569.2869.2147.88+7.6 (18.8%)
Gemma3-12B25.2148.7644.0168.8444.0973.5379.1754.80
AfriqueGemma-12B32.1449.4744.6068.6565.0476.7975.0858.82+4.0 (7.3%)
Qwen3-4B8.2633.8437.1241.5020.1621.6957.8831.49
AfriqueQwen-4B33.0943.0444.8863.6259.8265.3474.7754.94+23.4 (74.4%)
Qwen3.5-4B20.7938.6340.3655.8232.0659.4374.9646.01
AfriqueQwen3.5-4B30.4743.6641.0566.0163.5575.4679.6657.12+11.1 (24.2%)
AfriqueQwen3.5-4B-ExtendedCM34.1745.2641.9466.4563.7675.9780.5258.30+1.2 (2.1%)
AfriqueQwen3.5-4B-50Langs34.0645.2341.7966.8364.5675.8279.8358.30+0.0 (0.0%)
Qwen3-8B11.2236.5638.2444.6321.1329.4753.0633.47
[AfriqueQwen-8B](https://huggingface.co/Mc

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms