HuggingFaceH4/ultrachat_200k
Viewer • Updated • 515k • 70.7k • 856
How to use nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "translation" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("translation", model="nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged")
model = AutoModelForCausalLM.from_pretrained("nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged", device_map="auto")How to use nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged with Unsloth Studio:
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 nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged to start chatting
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 nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="nwokikeonyeka/Igbo-Phi3-Bilingual-Chat-v1-merged",
max_seq_length=2048,
)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.
To use this model in a Python script using Hugging Face Transformers:
pip install transformers torch accelerate
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)
This model was trained on a robust mix of 700,000+ examples to ensure it can translate accurately while remaining a smart chatbot:
Developed by nwokikeonyeka using the Unsloth library for faster fine-tuning.