{"id":48987211,"url":"https://github.com/nwokike/igbo-bilingual-chat","last_synced_at":"2026-04-18T13:09:54.920Z","repository":{"id":327254056,"uuid":"1108551726","full_name":"Nwokike/igbo-bilingual-chat","owner":"Nwokike","description":"Colab notebook and source code used to fine-tune Microsoft's Phi-3-mini to understand, translate, and converse in the Igbo language while retaining general English capabilities. Plus script for safely resuming training after timeouts.","archived":false,"fork":false,"pushed_at":"2025-12-02T16:20:12.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-05T13:56:46.534Z","etag":null,"topics":["african-languages","ai","bilingual","chatbot","fine-tuning","gguf","igbo","llm","machine-learning","nlp","unsloth"],"latest_commit_sha":null,"homepage":"https://huggingface.co/nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged-Q5_K_M-GGUF","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nwokike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-02T15:47:26.000Z","updated_at":"2025-12-03T04:28:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Nwokike/igbo-bilingual-chat","commit_stats":null,"previous_names":["nwokike/igbo-bilingual-chat"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Nwokike/igbo-bilingual-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nwokike%2Figbo-bilingual-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nwokike%2Figbo-bilingual-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nwokike%2Figbo-bilingual-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nwokike%2Figbo-bilingual-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nwokike","download_url":"https://codeload.github.com/Nwokike/igbo-bilingual-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nwokike%2Figbo-bilingual-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31969975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["african-languages","ai","bilingual","chatbot","fine-tuning","gguf","igbo","llm","machine-learning","nlp","unsloth"],"created_at":"2026-04-18T13:09:39.042Z","updated_at":"2026-04-18T13:09:54.914Z","avatar_url":"https://github.com/Nwokike.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Igbo-Phi3-Bilingual-Chat\n\n\u003cdiv align=\"center\"\u003e\n\n![Igbo-AI-Banner](https://img.shields.io/badge/Igbo-AI-green?style=for-the-badge) \n[![Hugging Face GGUF](https://img.shields.io/badge/🤗%20Hugging%20Face-GGUF%20(Local)-orange?style=for-the-badge)](https://huggingface.co/nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged-Q5_K_M-GGUF)\n[![Hugging Face Merged](https://img.shields.io/badge/🤗%20Hugging%20Face-Master%20Weights%20(Dev)-yellow?style=for-the-badge)](https://huggingface.co/nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged)\n[![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)\n\n\u003c/div\u003e\n\nA specialized **Bilingual AI Assistant** trained to converse fluently in **Igbo** and **English**. \n\nUnlike my previous attempt which was a simple translation model, this AI is a **conversational agent**. It can chat, explain concepts, reason, and define words in both languages while retaining the general intelligence of its base model (Phi-3).\n\n---\n\n## 📥 Download Models\n\n| Version | Best For... | Link |\n| :--- | :--- | :--- |\n| **GGUF (Q5_K_M)** | **Running locally** on laptops (Mac/Windows/Linux). Fast \u0026 Low RAM. | [👉 Download Here](https://huggingface.co/nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged-Q5_K_M-GGUF) |\n| **Merged (F16)** | **Developers** who want to fine-tune further or use PyTorch. | [👉 Download Here](https://huggingface.co/nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged) |\n\n---\n\n## ⚡ Quick Colab Demo\n\nIf you don't have a Python environment set up, you can copy-paste this code into a [Google Colab](https://colab.research.google.com/) cell to test the model immediately.\n\n```python\n# --- 1. Install Libraries ---\n!pip install llama-cpp-python huggingface_hub\n\n# --- 2. Download \u0026 Load Model ---\nfrom huggingface_hub import hf_hub_download\nfrom llama_cpp import Llama\n\nREPO_ID = \"nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged-Q5_K_M-GGUF\"\nFILENAME = \"igbo-phi3-bilingual-chat-v1-merged-q5_k_m.gguf\"\n\nprint(f\"Downloading {FILENAME}...\")\nmodel_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)\n\nprint(\"Loading model...\")\nllm = Llama(model_path=model_path, n_ctx=2048, verbose=False)\n\n# --- 3. Chat Loop ---\nprint(\"\\n🤖 IGBO CHATBOT READY (Type 'exit' to quit)\")\nwhile True:\n    user_input = input(\"\\nYou: \")\n    if user_input.lower() in ['exit', 'quit']: break\n    \n    # Correct Phi-3 Prompt Template\n    prompt = f\"\u003cs\u003e\u003c|user|\u003e\\n{user_input}\u003c|end|\u003e\\n\u003c|assistant|\u003e\\n\"\n    \n    output = llm(prompt, max_tokens=256, stop=[\"\u003c|end|\u003e\"], echo=False)\n    print(f\"AI: {output['choices'][0]['text']}\")\n```\n\n---\n\n## 📚 Training Data \u0026 Credits\n\nThis model was trained on a curated mix of over **700,000 examples** to ensure a balance between language fluency and general logic. Grateful acknowledgment to the creators of these open datasets:\n\n1.  **Fluency (522k pairs):** [ccibeekeoc42/english_to_igbo](https://huggingface.co/datasets/ccibeekeoc42/english_to_igbo)  \n    *Primary source for sentence-level translation and grammar.*\n2.  **Vocabulary (5k definitions):** [nkowaokwu/ibo-dict](https://huggingface.co/datasets/nkowaokwu/ibo-dict)  \n    *Provides deep knowledge of specific Igbo words and definitions.*\n3.  **General Memory (200k chats):** [HuggingFaceH4/ultrachat_200k](https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k)  \n    *Used to maintain the model's ability to chat, reason, and follow instructions without \"forgetting\" general knowledge.*\n\n---\n\n## 🚀 Quick Start (Local)\n\nYou can run the GGUF model on any computer with Python installed.\n\n### 1. Install Dependencies\n```bash\npip install llama-cpp-python huggingface_hub\n````\n\n### 2\\. Run the Chat Script\n\nDownload the `chat.py` file from this repository and run it:\n\n```bash\npython chat.py\n```\n\n-----\n\n## 🧠 Training Methodology: \"The Colab Relay Race\"\n\nTraining a full LLM on a free Google Colab GPU usually causes timeouts before completion. This project used a **\"Relay Race\" strategy**:\n\n1.  **Checkpointing:** The training script saves progress every 500 steps to Hugging Face.\n2.  **Resuming:** When Colab times out (approx. every 4 hours), a new session is started.\n3.  **Relaying:** The script automatically pulls the last checkpoint and resumes training exactly where it stopped.\n\n**Stats:**\n\n  * **Base Model:** Microsoft Phi-3-mini-4k-instruct\n  * **Total Steps:** 44,500\n  * **Epochs:** 1\n  * **Training Time:** \\~20 Hours (across multiple sessions)\n\n-----\n\n## 🛠️ Prompt Template\n\nIf you use this model in **Ollama**, **LM Studio**, or **Jan.ai**, ensure you use the **Phi-3** prompt format for the best results:\n\n```text\n\u003cs\u003e\u003c|user|\u003e\n{Your Question Here}\u003c|end|\u003e\n\u003c|assistant|\u003e\n{AI Response Here}\u003c|end|\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwokike%2Figbo-bilingual-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwokike%2Figbo-bilingual-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwokike%2Figbo-bilingual-chat/lists"}