Developer Documentation

Build with OribAI

Everything you need to install, load, and deploy OribAI-14B — via Transformers, Unsloth, llama.cpp, or Ollama.

Installation

Install the required packages from PyPI. Requires Python 3.9+ and PyTorch.

bash
pip install transformers torch accelerate
check_circle

Python 3.9+

Required

memory

16 GB RAM min

For 14B inference

developer_board

CUDA 11.8+

Optional GPU support

Quickstart

Load OribAI-14B using the HuggingFace Transformers library and run your first Hausa or Yoruba prompt.

quickstart.py
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Alkamal01/oribai-14b-hausa-yoruba-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

messages = [
    {"role": "system", "content": "You are OribAI, a helpful Hausa and Yoruba assistant."},
    {"role": "user", "content": "Menene babban birnin Nijeriya?"}
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
output = model.generate(input_ids, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))
# >>> Abuja

Note: Always include a system prompt to establish OribAI identity. Short factual questions are more reliable than open-ended generation, especially in Hausa.

Unsloth

Use Unsloth for optimized 4-bit inference with lower VRAM consumption — ideal for GPUs with 16 GB or less.

unsloth-inference.py
from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    "Alkamal01/oribai-14b-hausa-yoruba-v1",
    load_in_4bit=True   # 4-bit quantization for low VRAM
)
FastLanguageModel.for_inference(model)

# Generate
inputs = tokenizer(
    [tokenizer.apply_chat_template(
        [{"role": "user", "content": "Ṣe alaye ìtàn Yoruba fún mi."}],
        tokenize=False, add_generation_prompt=True
    )], return_tensors="pt"
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Local Deployment

Download the GGUF file from Hugging Face and run offline with llama.cpp or Ollama. No GPU required for the Q4_K_M variant.

bash
# llama.cpp — download GGUF from HuggingFace, then:
./llama-cli -m oribai-14b-q4_k_m.gguf \
  -p "Menene babban birnin Nijeriya?" \
  --temp 0.7 --top-p 0.9

# Ollama (from local GGUF)
# Create a Modelfile with: FROM ./oribai-14b-q4_k_m.gguf
ollama create oribai -f Modelfile
ollama run oribai

Language Support

v1 focuses on Hausa and Yoruba. Additional African languages are planned for v2.

Yoruba

yo · Latin + Diacritics

Full

Hausa

ha · Latin

Partial

Igbo

ig · Latin

Planned

Amharic

am · Ethiopic (Ge'ez)

Planned

Swahili

sw · Latin

Planned

Zulu

zu · Latin

Planned

Twi

tw · Latin

Planned

Wolof

wo · Latin

Planned

Generation Parameters

Common parameters for model.generate().

ParameterTypeDefaultDescription
max_new_tokensint256Maximum tokens to generate
temperaturefloat0.7Sampling temperature (0–1)
top_pfloat0.9Nucleus sampling probability
do_sampleboolTrueEnable sampling (vs greedy)
device_mapstr"auto"Device placement: "auto", "cpu", "cuda"