Views
No views yet
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-7B-Instruct |
| Method | QLoRA (4-bit NF4, double quantization) |
| LoRA Rank | r=16, alpha=16, dropout=0.05 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Training Data | 290 bilingual samples (hand-crafted + synthetic) |
| Epochs | 3 |
| Final Loss | 1.3724 |
| Training Time | 68.9 minutes on Kaggle P100 |
| Trainable Params | ~160M / 7.6B (2.1%) |
| Budget | $0 (free Kaggle GPU) |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5# Load base + adapter
6base = AutoModelForCausalLM.from_pretrained(
7 "Qwen/Qwen2.5-7B-Instruct",
8 torch_dtype=torch.float16,
9 device_map="auto",
10)
11model = PeftModel.from_pretrained(base, "Haubaa/SANU-AI-7B-v0.1")
12tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
13
14# Chat with SANU
15messages = [
16 {"role": "system", "content": "You are SANU AI, Nepal's first agentic AI assistant."},
17 {"role": "user", "content": "bro NEPSE ma invest garna ke garne?"}
18]
19text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
20inputs = tokenizer(text, return_tensors="pt").to(model.device)
21
22output = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
23print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))| Category | Samples | Description |
|---|---|---|
| SANU Identity | 20+ | "Who are you?" in Nepali/English |
| Nepal Knowledge | 40+ | Tax, NEPSE, government, geography |
| Children/Education | 15 | ABCs, counting, stories, animals |
| Family/Parenting | 7 | Screen time, pregnancy, teen safety |
| Professional | 6 | Doctor, engineer, lawyer, teacher |
| Emotional Support | 9 | Depression, crisis, migrant workers |
| Citizen Lifecycle | 17 | Baby to elderly, farmer to IT professional |
| Diverse Citizens | 16 | Dalit, deaf, LGBTQ+, orphan, journalist |
| Viral/Funny | 8 | Momo debates, traffic, NEPSE memes |
| Multi-language | 8 | Maithili, Newari, Tamang, Sherpa, etc. |
| Agentic/Tool Use | 30+ | Function calling, multi-step reasoning |
| Synthetic (API) | 100+ | Generated via Groq API |
| Phase | Status | Goal |
|---|---|---|
| Phase 1 — Lite | Complete | 290 samples, GGUF on Ollama |
| Phase 2 — Core | Next | 10K+ samples, improved accuracy |
| Phase 3 — Pro | Planned | 50K+ samples, tool calling, RAG |
| Phase 4 — Enterprise | Planned | Multi-modal, voice, deployment |