2 1 week ago

This repository contains GGUF versions of the Phi-4-mini-instruct base model and the LoRAfrica adapter, specialized for African History QA

ollama run daniau23/lorafrica_gguf

Models

View all →

Readme

Model Details

Model Description

This model is a quantized GGUF version of a LoRA fine-tuning based on Microsoft’s Phi-4-mini. It is specifically optimized for efficiency and accuracy when answering questions regarding African history, ranging from ancient empires to contemporary social movements.

  • Developed by: Daniel Ihenacho
  • Funded by: Daniel Ihenacho
  • Shared by: Daniel Ihenacho
  • Model type: Text Generation (GGUF)
  • Language(s) (NLP): English
  • License: MIT
  • Finetune Method: Axolotl (LoRA)
  • Quantisation: Llama.cpp

Uses

This model is designed for low-latency inference on consumer hardware

Primary Use Case

  • QA datasets and educational tools focused on African History.

Out-of-Scope Use

  • General-purpose coding or mathematical reasoning (performance may be degraded compared to the base Phi-4).
  • Production environments requiring high-stakes factual guarantees without human oversight.

How to Get Started with the Model

Since this repository contains a separate GGUF base and a GGUF LoRA adapter, you can use them together in llama.cpp without needing to merge them permanently.

Downloading the models

ollama run daniau23/lorafrica_gguf 

NB: For Deeper details refer to the GitHub link

Python Implementation (via llama-cpp-python)

import ollama
model =  "LoRAfrica"
SYSTEM_PROMPT = "You are a helpful AI assistant specialised in African history which gives concise answers to questions asked."
question  = "Briefly detail the significance story of the Igbo god Amadioha?"
temperature  = 0.1
num_predict = 128

messages = [
    {"role": "system", "content": SYSTEM_PROMPT},
    {"role": "user", "content": question}
]

options = {
    "temperature": temperature,
    "num_predict": num_predict
}


response = ollama.chat(
    model=model,
    messages=messages,
    options=options
)
print(response["message"]['content'])
# Example Output
Amadioha is an important deity among the Igbo people, representing justice and morality; he judges disputes between humans before they escalate into violence or war.
In a famous tale from Igboland folklore known as "The Tale of Nri," it was said that when King Eri became too harsh in his rule over Idah land (now part of Nigeria), Amadioha intervened. He sent an emissary to advise the king on how to govern justly and peacefully, thus preventing further conflict.
Amadioha's story underscores themes like justice being a divine mandate for rulers as well as moral guidance within communities; it also reflects
# for streaming tokens generated
stream = ollama.chat(
    model=model,
    messages=messages,
    options=options,
    stream=True
)

for chunk in stream:
    print(chunk["message"]['content'], end="", flush=True   )

Citation

@Model{
Ihenacho2026lorafrica_gguf,
  author    = {Daniel Ihenacho},
  title     = {LoRAfrica_GGUF},
  year      = {2026},
  publisher = {Ollama},
  url       = {https://ollama.com/daniau23/lorafrica_gguf},
}

Model Card Authors

Daniel Ihenacho

Model Card Contact