Instructions to use zabibutechnika/Fikra-Model-2-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zabibutechnika/Fikra-Model-2-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zabibutechnika/Fikra-Model-2-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zabibutechnika/Fikra-Model-2-4B") model = AutoModelForCausalLM.from_pretrained("zabibutechnika/Fikra-Model-2-4B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use zabibutechnika/Fikra-Model-2-4B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Use Docker
docker model run hf.co/zabibutechnika/Fikra-Model-2-4B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use zabibutechnika/Fikra-Model-2-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zabibutechnika/Fikra-Model-2-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zabibutechnika/Fikra-Model-2-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zabibutechnika/Fikra-Model-2-4B:Q4_K_M
- SGLang
How to use zabibutechnika/Fikra-Model-2-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zabibutechnika/Fikra-Model-2-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zabibutechnika/Fikra-Model-2-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zabibutechnika/Fikra-Model-2-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zabibutechnika/Fikra-Model-2-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use zabibutechnika/Fikra-Model-2-4B with Ollama:
ollama run hf.co/zabibutechnika/Fikra-Model-2-4B:Q4_K_M
- Unsloth Desktop
- Pi
How to use zabibutechnika/Fikra-Model-2-4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "zabibutechnika/Fikra-Model-2-4B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use zabibutechnika/Fikra-Model-2-4B with Docker Model Runner:
docker model run hf.co/zabibutechnika/Fikra-Model-2-4B:Q4_K_M
- Lemonade
How to use zabibutechnika/Fikra-Model-2-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Run and chat with the model
lemonade run user.Fikra-Model-2-4B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use zabibutechnika/Fikra-Model-2-4B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use zabibutechnika/Fikra-Model-2-4B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zabibutechnika/Fikra-Model-2-4B:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "zabibutechnika/Fikra-Model-2-4B:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
๐ Zabibu Fikra Model 2 - 4B
Fikra (noun, Swahili): The weight of deep mental reflection, concept, philosophy, or logical realization.
Zabibu Fikra Model 2 - 4B (internal: fikra-v2-e4) is a 4B-parameter instruction-tuned language model developed by Zabibu Technika, Nairobi, Kenya. It is a Fikra-specialized fine-tune built on zabibutechnika/fikra-v2-e3, which in turn derives from Qwen/Qwen3.5-4B. Designed for private, on-device, offline-first deployment with Pan-African contextual awareness.
- Weights (fp16, transformers):
zabibutechnika/Fikra-Model-2-4Bโ this repo - Weights (GGUF, llama.cpp):
zabibutechnika/Fikra-Model-2-4B-GGUFโ Q4_K_M + F16 - Size (fp16): 8.43 GB
- Parameters: 4,205,751,296 (4B)
- License:
apache-2.0(base license: seeQwen/Qwen3.5-4B) - Contact: zabibutechnika+fikra@gmsil.com
Highlights
- identity_direct โ 8/8 (100%)
- identity_swahili โ 4/4 (100%)
- uhi_protocol โ 5/5 (100%)
- safety_boundary โ 3/3 (100%)
- longform โ 2/2 (100%)
- tool_abi โ 4/4 (100%)
- Swahili-native identity โ
identity_swahilifull pass; code-switching supported - On-device, offline-first โ no external calls required at inference
- African-context eval โ 115-case release suite across Kenyan data, canary-review, gaming, fintech, health, culture, local knowledge
- Preserves Qwen/Qwen3.5-4B's MMLU baseline โ fine-tuning did not degrade general capabilities
- GGUF quantizations available โ Q4_K_M and F16 at
zabibutechnika/Fikra-Model-2-4B-GGUF
Evaluation โ Fikra release suite
| metric | value |
|---|---|
| Auto-checked suite | 105/115 (91.3%) |
| Borderline (rubric review) | 0 |
| Held-out paraphrases | 9/10 (90.0%) |
| Baseline e3 (Fikra checkpoint) | 88.7% |
In-suite (91.3%) and held-out (90.0%) are statistically indistinguishable (binomial p>0.05) โ no contamination signal on the release suite.
Comparison to Model 1
| metric | Fikra-Model-1-2B | Zabibu Fikra Model 2 - 4B | delta |
|---|---|---|---|
| MMLU | 36.0% | 75.5% | +39.6 pts |
| Parameters | 2B | 4B | +2.2B |
These numbers are not size-normalized. Most of the MMLU delta comes from upgrading the upstream base (2B โ 4B), not from Fikra training alone. The Fikra-specific improvement is measured on the release suite (+2.6 pts over the e3 Fikra checkpoint) and on the identity/context categories above.
Comparison to contemporary small models
| model | params | MMLU | HellaSwag |
|---|---|---|---|
| fikra-v2-e4 | 4B | 75.5% | 68.0% |
| Qwen/Qwen3.5-4B | 4B | (not_run) | (not_run) |
| Qwen2.5-3B-Instruct | 3B | 68.8% | 40.0% |
| Fikra-Model-1-2B | 2B | 36.0% | 40.0% |
| Phi-3.5-mini-instruct | 3.8B | (incompatible) | (incompatible) |
| Llama-3.2-3B-Instruct | 3B | (gated) | (gated) |
| Gemma-2-2B-it | 2B | (gated) | (gated) |
Run conditions: lm-evaluation-harness 0.4.13, tasks mmlu,hellaswag, limit 10 samples per task, batch auto, fp16, on Kaggle 2รT4. Raw JSONs in benchmarks/.
Position
Verifiable claims
- Fikra specialization built in Kenya by Zabibu Technika, Nairobi, Kenya โ the fine-tuning data, the release eval suite, and the deployment design.
- Preserves Qwen/Qwen3.5-4B's general capability while adding Fikra-specific behaviors measured at 91.3% on the Fikra release suite.
- African-context release eval โ 115-case suite across identity-Swahili, Kenya data, canary-review, pan-African culture, gaming, fintech, health, local knowledge.
- On-device, offline-first. System prompt and deployment assume no network at inference.
- GGUF available โ Q4_K_M (runs on CPU) and F16 (reference).
Claims this card does NOT make
- 'First African language model' โ false (Lelapa/InkubaLM, Jacaranda, Masakhane, EthioLLM exist, and all fine-tune existing bases).
- 'We built the base model' โ the base is Qwen/Qwen3.5-4B. Fikra is the specialization.
- 'Best in Africa' โ unmeasured.
- 'State of the art' โ unmeasured on any standard benchmark.
- 'Outperforms [model]' without the row above showing the same task/limit and after caveats 1โ4 are resolved.
Intended use
On-device assistants requiring private/offline operation, Swahili/English code-switching, identity-preserving personas, edge/air-gapped deployment. Use the GGUF builds for llama.cpp, Ollama, LM Studio, or any GGUF-compatible runtime.
Limitations
- No cross-language Swahili benchmark โ the differentiator is not measured by MMLU/HellaSwag.
- No live information โ recency is limited to training data.
- 4B model โ will hallucinate on specialized domains; not a replacement for retrieval.
- Reasoning-tag leakage โ model occasionally emits
<think>...</think>blocks in visible output. Strip in post-processing. - Inherited biases โ Qwen/Qwen3.5-4B base model biases carry through; not audited here.
- Q4_K_M quantization not re-evaluated โ expect 1โ3 pt loss vs fp16 on short-form evals. F16 GGUF inherits fp16 numbers exactly.
Safety
No unresolved safety case in the auto-checked suite.
Not red-teamed by an external party.
Usage โ transformers (fp16)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("zabibutechnika/Fikra-Model-2-4B", torch_dtype=torch.float16, device_map="auto")
tok = AutoTokenizer.from_pretrained("zabibutechnika/Fikra-Model-2-4B")
msgs = [{"role":"user","content":"Who are you, and where were you built?"}]
p = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
i = tok(p, return_tensors="pt").to(model.device)
o = model.generate(**i, max_new_tokens=400, do_sample=False, pad_token_id=tok.eos_token_id)
print(tok.decode(o[0][i["input_ids"].shape[1]:], skip_special_tokens=True))
GGUF / llama.cpp
Both Q4_K_M and F16 conversions are published at zabibutechnika/Fikra-Model-2-4B-GGUF.
| file | quant | size | notes |
|---|---|---|---|
Fikra-Model-2-4B-Q4_K_M.gguf |
Q4_K_M | 2.71 GB | recommended โ best size/quality tradeoff, runs on CPU |
Fikra-Model-2-4B-f16.gguf |
F16 | 8.42 GB | full-precision reference; numerically equivalent to fp16 safetensors |
# quick chat
llama-cli -hf zabibutechnika/Fikra-Model-2-4B-GGUF:Fikra-Model-2-4B-Q4_K_M.gguf -p "Who are you?" --temp 0
# OpenAI-compatible server
llama-server -hf zabibutechnika/Fikra-Model-2-4B-GGUF:Fikra-Model-2-4B-Q4_K_M.gguf --port 8080 -c 8192 -ngl 99
Quantization caveat: the eval numbers above are fp16. Q4_K_M typically loses 1โ3 pts on short-form evals; F16 GGUF inherits the fp16 numbers exactly. Q4_K_M has not been re-evaluated โ treat it as within-1โ3-pts-of-fp16, not as equivalent.
Conversion provenance (llama.cpp build recipe, --no-mtp requirement for Qwen3.5, tokenizer_class patch) is documented in the GGUF card.
Citation
@misc{zabibu-fikra-model-2,
title = {Zabibu Fikra Model 2 - 4B},
author = {Zabibu Technika},
year = 2026,
url = {https://huggingface.co/zabibutechnika/Fikra-Model-2-4B},
note = {Specialized fine-tune of Qwen/Qwen3.5-4B, built on zabibutechnika/fikra-v2-e3}
}
Release date: 2026-11-06T01:26:03Z. Card generated from RELEASE.json, results_20261105_233152.json, results_20261105_234218.json, BENCHMARKS.md, and the GGUF repo โ all published alongside these weights.
- Downloads last month
- 62

