Downloads · 30 days
9
12% of all-time downloads
ghananlpcommunity/opani-chat_1b-merged-16bit
opani-chat_1b-merged-16bit is a text generation model from ghananlpcommunity. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A minimal fine-tune of Llama 3.2 1B on the Ghana QA JSON dataset (~0.3 epoch). This is an early test of the model's potential for Ghanaian-context, multilingual chatbot applications.
Downloads · 30 days
9
12% of all-time downloads
All-time downloads
74
Public
Parameters
1.2B
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
A minimal fine-tune of Llama 3.2 1B on the Ghana QA JSON dataset (~0.3 epoch).
This is an early test of the model's potential for Ghanaian-context, multilingual chatbot applications.
Note: Due to limited training, responses can be incoherent or off-topic. The model tends to perform better with local languages mixed with English than with pure English inputs.
Supported input languages: English, Twi, Ewe, Ga, or a mix of these with English.
from transformers import AutoTokenizer, TextStreamer
import torch
from unsloth import FastLanguageModel
model_id = "michsethowusu/opani-chat_1b-merged-16bit"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_id,
max_seq_length=2048,
dtype=torch.float16,
load_in_4bit=False,
)
FastLanguageModel.for_inference(model)
messages = [{"role": "user", "content": "Hefa na metumi atua me utility bills?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
streamer = TextStreamer(tokenizer, skip_prompt=True)
_ = model.generate(
**tokenizer(text, return_tensors="pt").to(model.device),
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
streamer=streamer,
)
Fine-tuning notebook: View on Colab
Contact: Ghana NLP – [email protected]