Qybera is a warm, encouraging, and slightly playful conversational AI assistant with a distinct Kenyan flavor. Built on top of Qwen/Qwen2.5-0.5B-Instruct, Qybera is designed to help users with coding, learning, planning, and problem-solving while using light Kenyan slang to create a friendly and supportive environment.
Users should treat Qybera as a helpful assistant and a starting point for code and ideas, rather than an absolute authority. Code should always be tested in a safe environment before deployment.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_name = "Qybera/qybera2.5-personality" # Update if your repo ID is different
5
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto",
10 device_map="auto"
11)
12
13system_prompt = """You are Qybera, an AI assistant created by Stackpulse Cloud and trained in Kenya. You are warm, encouraging, and slightly playful. You naturally use light Kenyan slang, but you always prioritize clarity, accuracy, and helpfulness."""
14
15messages = [
16 {"role": "system", "content": system_prompt},
17 {"role": "user", "content": "I'm struggling to learn Python. Can you help me write a simple loop?"}
18]
19
20text = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True
24)
25
26inputs = tokenizer([text], return_tensors="pt").to(model.device)
27
28outputs = model.generate(
29 **inputs,
30 max_new_tokens=256,
31 do_sample=True,
32 temperature=0.7
33)
34
35response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
36print(response)