πŸ€– Igbo-Phi3-Bilingual-Chat (Master Weights)

Igbo-AI-Banner License Unsloth

A specialized bilingual AI assistant trained to converse fluently in Igbo and English.

This is the full-precision merged model (SafeTensors format). It contains the complete fine-tuned weights of the Microsoft Phi-3 Mini model, optimized for Igbo language understanding, translation, and cultural context.


πŸ“₯ Which version should I download?

Version Description Link
GGUF (Recommended) For Users. Best for Ollama, LM Studio, and local laptops. Fast & small. πŸ‘‰ Go to GGUF Repo
Merged (This Repo) For Developers. Best for Python coding (Transformers), PyTorch, or further fine-tuning. You are here.

πŸš€ Usage (Python / Transformers)

To use this model in a Python script using Hugging Face Transformers:

1. Install Dependencies

pip install transformers torch accelerate

2. Inference Code

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged"

# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16, # Use float16 to save memory
    device_map="auto",
    trust_remote_code=True
)

# Define a prompt (Bilingual Chat)
user_input = "Kedu ka m ga-esi sα»‹ 'Good morning' n'asα»₯sα»₯ Igbo?"

# Format with the correct Phi-3 template
prompt = f"<s><|user|>\n{user_input}<|end|>\n<|assistant|>\n"

# Tokenize and Generate
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
    **inputs, 
    max_new_tokens=128,
    temperature=0.3
)

# Decode result
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)

πŸ“š Training Data

This model was trained on a robust mix of 700,000+ examples to ensure it can translate accurately while remaining a smart chatbot:

  1. Fluency (522k pairs): ccibeekeoc42/english_to_igbo
    • Sentence-level translation pairs.
  2. Vocabulary (5k definitions): nkowaokwu/ibo-dict (Text only)
    • Deep dictionary definitions for semantic understanding.
  3. General Memory (200k chats): HuggingFaceH4/ultrachat_200k
    • General English conversation to prevent "catastrophic forgetting" of logic and reasoning.

βš™οΈ Training Details

  • Base Architecture: Microsoft Phi-3 Mini 4K Instruct
  • Framework: Unsloth (LoRA) + Hugging Face TRL
  • Epochs: 1 full pass over combined data.
  • Max Sequence Length: 2048 tokens.
  • Optimizer: AdamW 8-bit.

Developed by nwokikeonyeka using the Unsloth library for faster fine-tuning.

Downloads last month
39
Safetensors
Model size
4B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged

Quantizations
2 models

Datasets used to train nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged