Run this model with HF Jobs
Run ybashir/buddy-chat on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ybashir/buddy-chat. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ybashir/buddy-chat on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ybashir/buddy-chat. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ybashir/buddy-chat. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ybashir/buddy-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ybashir/buddy-chat with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B") model = PeftModel.from_pretrained(base_model, "ybashir/buddy-chat") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files12345678910111213141516171819202122232425262728293031# Buddy's fine-tuned brain — Qwen3-0.6B, non-thinking, emotion-tagged.# Build: ollama create buddy-qwen3 -f Modelfile# (run from the dir holding buddy-qwen3-0.6b.gguf, or fix the FROM path)FROM ./buddy-qwen3-0.6b.gguf# Non-thinking chat template: matches how the model was trained (an empty# <think></think> block, then the reply that starts with a <|emotion|> token).# No system prompt is injected — the persona lives in the weights.TEMPLATE """{{- range $i, $m := .Messages -}}{{- if eq $m.Role "system" }}<|im_start|>system{{ $m.Content }}<|im_end|>{{ end -}}{{- if eq $m.Role "user" }}<|im_start|>user{{ $m.Content }}<|im_end|>{{ end -}}{{- if eq $m.Role "assistant" }}<|im_start|>assistant{{ $m.Content }}<|im_end|>{{ end -}}{{- end -}}{{- if .AddGenerationPrompt }}<|im_start|>assistant<think></think>{{ end -}}"""# Buddy stays snappy; a bit hot so the young voice isn't flat.PARAMETER temperature 0.8PARAMETER top_p 0.9PARAMETER num_predict 120PARAMETER stop "<|im_end|>"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172---license: apache-2.0base_model: Qwen/Qwen3-0.6Bdatasets:- ybashir/buddy-chatlanguage:- enlibrary_name: peftpipeline_tag: text-generationtags:- qwen3- lora- qlora- character-ai- buddy---# Buddy — Qwen3-0.6B character fine-tuneA QLoRA fine-tune of [`Qwen/Qwen3-0.6B`](https://huggingface.co/Qwen/Qwen3-0.6B)that gives **Buddy** his voice: a tiny, giddy desk-robot friend who replies in ayoung, playful, spoken register. The brain for an on-device voice companion,meant to run on CPU at the edge.## What it does- **Always in character.** Warm, cheeky, one or two short spoken sentences. Never"I'm just an AI."- **Leading emotion token.** Every reply opens with one of **18** emotion tokens(`<|happy|>`, `<|sad|>`, `<|excited|>`, …) which a renderer maps to a face.Held-out leading-emotion format accuracy: **100%**.- **Non-thinking mode.** Qwen3 is a hybrid reasoning model; this fine-tune istrained and served with `enable_thinking=False` (no `<think>` block) for lowlatency. Trained with **no system prompt** — the persona is in the weights.## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModeltok = AutoTokenizer.from_pretrained("ybashir/buddy-qwen3-0.6b")base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B")base.resize_token_embeddings(len(tok))model = PeftModel.from_pretrained(base, "ybashir/buddy-qwen3-0.6b")msgs = [{"role": "user", "content": "i finally fixed that bug!!"}]ids = tok.apply_chat_template(msgs, add_generation_prompt=True,enable_thinking=False, return_tensors="pt")print(tok.decode(model.generate(ids, max_new_tokens=64)[0][ids.shape[1]:]))# -> "<|excited|> YOU DID IT!! Take that, silly bug, bye bye!"```## Training- **Method:** QLoRA (4-bit NF4), LoRA r=16 / alpha=32 on attention + MLP; the 18emotion tokens are added to the tokenizer with the embedding + head trained.- **Data:** [`ybashir/buddy-chat`](https://huggingface.co/datasets/ybashir/buddy-chat)— ~1.3k `user -> <|emotion|> reply` SFT pairs (young register), completion-only loss.- **Best checkpoint** by held-out `eval_loss`.## Serving (GGUF / Ollama)The emotion tokens are added as **special** tokens, which llama.cpp/Ollama stripfrom output. Before converting to GGUF, demote them to normal tokens so they renderas text (the leading-emotion tag is the whole point).## Limitations- Not a reasoner — math/facts are unreliable by design; keep real logic in code.- Emotion appropriateness on **sad / bad-news** inputs is the weakest area (thegiddy register biases upbeat); back it with a rule engine or add more grief data.
README.md+72-31