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.
pip install transformers torch accelerate
Python 3.9+
Required
16 GB RAM min
For 14B inference
CUDA 11.8+
Optional GPU support
Quickstart
Load OribAI-14B using the HuggingFace Transformers library and run your first Hausa or Yoruba prompt.
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))
# >>> AbujaNote: 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.
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.
# 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
Hausa
ha · Latin
Igbo
ig · Latin
Amharic
am · Ethiopic (Ge'ez)
Swahili
sw · Latin
Zulu
zu · Latin
Twi
tw · Latin
Wolof
wo · Latin
Generation Parameters
Common parameters for model.generate().
| Parameter | Type | Default | Description |
|---|---|---|---|
| max_new_tokens | int | 256 | Maximum tokens to generate |
| temperature | float | 0.7 | Sampling temperature (0–1) |
| top_p | float | 0.9 | Nucleus sampling probability |
| do_sample | bool | True | Enable sampling (vs greedy) |
| device_map | str | "auto" | Device placement: "auto", "cpu", "cuda" |