Instructions to use Ephraimmm/pidgin_finetuned_oss_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ephraimmm/pidgin_finetuned_oss_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ephraimmm/pidgin_finetuned_oss_model")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Ephraimmm/pidgin_finetuned_oss_model", dtype="auto") - PEFT
How to use Ephraimmm/pidgin_finetuned_oss_model with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ephraimmm/pidgin_finetuned_oss_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ephraimmm/pidgin_finetuned_oss_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ephraimmm/pidgin_finetuned_oss_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ephraimmm/pidgin_finetuned_oss_model
- SGLang
How to use Ephraimmm/pidgin_finetuned_oss_model with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ephraimmm/pidgin_finetuned_oss_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ephraimmm/pidgin_finetuned_oss_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ephraimmm/pidgin_finetuned_oss_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ephraimmm/pidgin_finetuned_oss_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use Ephraimmm/pidgin_finetuned_oss_model with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ephraimmm/pidgin_finetuned_oss_model to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ephraimmm/pidgin_finetuned_oss_model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ephraimmm/pidgin_finetuned_oss_model to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ephraimmm/pidgin_finetuned_oss_model", max_seq_length=2048, ) - Docker Model Runner
How to use Ephraimmm/pidgin_finetuned_oss_model with Docker Model Runner:
docker model run hf.co/Ephraimmm/pidgin_finetuned_oss_model
pidgin_finetuned_oss_model
Overview
This repository contains a LoRA adapter that fine-tunes unsloth/gpt-oss-20b-unsloth-bnb-4bit โ a 4-bit quantized build of OpenAI's gpt-oss-20b open-weight model โ for Nigerian Pidgin English (Naija Pidgin, ISO 639-3: pcm).
Nigerian Pidgin is spoken by an estimated tens of millions of people across Nigeria and the wider West African diaspora, yet it remains a low-resource language for NLP: large language models are trained overwhelmingly on standard English and other high-resource languages, so they often struggle to generate or understand fluent, natural Pidgin. This project adapts an open-weight LLM towards Pidgin text generation, aiming to make LLM-based tools more accessible and natural for Pidgin-speaking users.
Training Details
| Detail | Value |
|---|---|
| Base model | unsloth/gpt-oss-20b-unsloth-bnb-4bit (gpt-oss-20B, 4-bit quantized) |
| Fine-tuning method | LoRA (parameter-efficient fine-tuning via PEFT) |
LoRA rank (r) |
8 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Task type | Causal LM |
| Training framework | Unsloth (2x faster fine-tuning), Hugging Face transformers, trl, peft |
| License | Apache 2.0 |
According to the original author's notes, the adapter was trained on a dataset of roughly 10,000 examples. Detailed training logs (exact step/epoch counts, loss curves) were not published alongside the adapter and are therefore not restated here.
This repo hosts only the LoRA adapter weights (adapter_model.safetensors + adapter_config.json) โ the base gpt-oss-20b weights must be loaded separately, as shown below.
Intended Use
- Generating conversational text in Nigerian Pidgin English
- Assisting with Pidgin-English translation and localization drafts
- Chatbot / assistant prototypes aimed at Pidgin-speaking users
- Research into low-resource African language adaptation of open-weight LLMs
This model is a research/community fine-tune and has not been evaluated for production or safety-critical use.
How to Use
Option A โ with Unsloth (recommended, matches the training setup):
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="Ephraimmm/pidgin_finetuned_oss_model",
max_seq_length=2048,
dtype=None,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
prompt = "Wetin dey happen for Naija today?"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Option B โ with transformers + peft directly:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "unsloth/gpt-oss-20b-unsloth-bnb-4bit"
adapter_id = "Ephraimmm/pidgin_finetuned_oss_model"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")
model = PeftModel.from_pretrained(base_model, adapter_id)
prompt = "Wetin dey happen for Naija today?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Limitations
- Low-resource target language: Nigerian Pidgin has limited high-quality training data available, and Pidgin usage varies by region and speaker, so output fluency and correctness may be inconsistent.
- No formal benchmark evaluation: no quantitative accuracy, fluency, or benchmark scores are published for this adapter โ outputs should be manually reviewed before use in any downstream application.
- Small adapter, limited training data: the LoRA adapter uses a modest rank (r=8) and was trained on an author-reported ~10k-example dataset, which may limit generalization to topics or phrasing not covered during fine-tuning.
- Inherits base model limitations: as a fine-tune of
gpt-oss-20b, this model inherits the general limitations, potential biases, and safety considerations of the base model. - Requires the base model: this repository only contains LoRA adapter weights; it must be combined with the
unsloth/gpt-oss-20b-unsloth-bnb-4bitbase model to run.
Author
Developed by Ephraimmm.
Model tree for Ephraimmm/pidgin_finetuned_oss_model
Base model
openai/gpt-oss-20b