CoolFace
Apppublic

Ephraimmm/Pidgin_0.1

sourceHugging Faceupdated 3mo agoView on Hugging Face
1likes
App README

Nigerian Pidgin Assistant

Overview

This Space is a chat demo for a Nigerian Pidgin English conversational assistant. It loads a 4-bit quantized gemma-3-4b-it base model via Unsloth and applies a LoRA adapter (Ephraimmm/PIDGIN_gemma-3) fine-tuned to respond in Pidgin English, then serves the model through a simple Gradio chat interface with streaming text generation.

Features

  • —Pidgin English chat — a system prompt instructs the model to reply only in Nigerian Pidgin (e.g. "I de o, how you de").
  • —Streaming responses — uses TextIteratorStreamer with a background generation thread so tokens can be produced incrementally.
  • —Conversation history — chat turns are kept in-session and displayed in a gr.Chatbot component.
  • —Save & download transcript — a "Save Conversation" button writes the chat history to a timestamped file that can be downloaded from the UI.

Tech Stack

  • —Gradio (Blocks UI) for the web interface
  • —Unsloth (FastLanguageModel) for fast, memory-efficient loading of the 4-bit quantized base model
  • —Base model: unsloth/gemma-3-4b-it-unsloth-bnb-4bit
  • —Fine-tuned adapter: Ephraimmm/PIDGIN_gemma-3 (PEFT/LoRA), loaded with peft.PeftModel
  • —Transformers for tokenization, chat templating, and streaming generation
  • —PyTorch for inference (CUDA if available, falling back to CPU)

This Space is an early ("0.1") demo build: the app is a single script with no batching, authentication, or conversation persistence beyond a local text file, and generation parameters are hard-coded. It's best understood as a functional proof of concept for the underlying Pidgin fine-tune rather than a production interface.

Author

Built by Ephraimmm