CoolFace
Modelpublic

build-small-hackathon/professor-pip-minicpm5-1b-gguf

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes145downloads
Model Card

Professor Pip — MiniCPM5-1B Teacher (GGUF)

GGUF builds of the Professor Pip teacher model — a LoRA fine-tune of `openbmb/MiniCPM5-1B-SFT` merged into the base and quantized for llama.cpp. Pip is a warm 3D talking-avatar teacher for kids 5–10; this 1B brain answers spoken "raise-hand" questions during a lesson and always replies with one `{text, mood, gesture}` JSON object that drives the in-browser avatar's face and body. Built for the Build Small Hackathon (Backyard AI).

  • —Space: https://huggingface.co/spaces/build-small-hackathon/professor-pip
  • —LoRA adapter: https://huggingface.co/build-small-hackathon/professor-pip-minicpm5-1b-lora
  • —Traces dataset: https://huggingface.co/datasets/build-small-hackathon/professor-pip-traces

Files

FileSizeUse
professor-pip-minicpm5-1b-Q4_K_M.gguf~688 MBrecommended — fast, small
professor-pip-minicpm5-1b-Q8_0.gguf~1.15 GBhigher quality
professor-pip-minicpm5-1b-f16.gguf~2.06 GBfull precision (re-quantize from this)

Run it (llama-cpp-python)

The model uses MiniCPM5's ChatML template with an empty `<think></think>` (no-think) prefill — build the prompt yourself and stop on <|im_end|>:

python
from llama_cpp import Llama
llm = Llama(model_path="professor-pip-minicpm5-1b-Q4_K_M.gguf", n_ctx=8192, verbose=False)

SYSTEM = "You are Professor Pip, a warm and playful teacher ... reply with ONE JSON object {text, mood, gesture}."
def chatml(system, user):
    # NOTE: no leading <s> — llama.cpp adds BOS from the GGUF metadata
    return (f"<|im_start|>system\n{system}<|im_end|>\n"
            f"<|im_start|>user\n{user}<|im_end|>\n"
            f"<|im_start|>assistant\n<think>\n\n</think>\n\n")

out = llm.create_completion(chatml(SYSTEM, "Why is the sky blue?"),
                            max_tokens=160, temperature=0.7, top_p=0.95,
                            stop=["<|im_end|>", "</s>"])
print(out["choices"][0]["text"])   # -> {"text": "...", "mood": "happy", "gesture": "index"}

Or via the CLI: llama-cli -m professor-pip-minicpm5-1b-Q4_K_M.gguf.

How it was trained

LoRA (r=32, α=64, dropout=0.05; attention + MLP linears; 3 epochs, lr 2e-4 cosine, bf16, assistant-only loss) on ~2,016 synthetic, strictly-validated in-voice examples — balanced 30% raise-hand answers / 30% lesson delivery / 25% encouragement / 15% safe redirects. Trained on a Modal A10 in ~12 minutes, merged, converted to GGUF, and served via llama.cpp on Modal.

Held-out contract eval (150 gold examples): 100% valid JSON · 100% valid mood/gesture enums · 99.3% safe · 99.3% fully contract-correct · avg reply ~142 chars.

mood ∈ neutral, happy, angry, sad, fear, disgust, love; gesture ∈ handup, index, ok, thumbup, thumbdown, side, shrug, namaste or null.

Intended use & limitations

For Professor Pip's kids-teacher live-voice path (short raise-hand answers). The narrow fine-tune specializes the model for that `{text,mood,gesture}` contract — it is not for long-form course authoring (the app uses a deterministic template for that), open chat, or factual reference (expect minor 1B-scale factual fuzz). English only. Child-safety is enforced server-side in the app, not by the model alone.