Views
No views yet
woof, *tail wag*, and *low growl*.
It does not answer questions.transformers with trust_remote_code=True. transformers
requires the bundled tokenizer
(tokenizer_nushy5.py) and mood router (router.py) to load and run the weights.1hf download itsalxgg/nushy-5 --local-dir nushy5 && cd nushy5
2pip install torch transformers numpy safetensors1import torch
2from transformers import AutoModelForCausalLM
3from tokenizer_nushy5 import NushyTokenizer, END
4from router import SemanticRouter
5
6model = AutoModelForCausalLM.from_pretrained(".", trust_remote_code=True).eval()
7tok, router = NushyTokenizer(), SemanticRouter()
8
9prompt = "who's the best boy?"
10mood = router.route(prompt) # "affectionate"
11head = f"<|system|>\nNushy\n<|user|>\n{prompt}\n<|assistant|>\n"
12ids = torch.tensor([tok.encode(head) + [tok.stoi[f'<|mood:{mood}|>']]])
13out = model.generate(ids, max_new_tokens=24, do_sample=True, top_k=12,
14 temperature=0.8, eos_token_id=tok.stoi[END], pad_token_id=0)
15print(tok.decode(out[0].tolist()[len(tok.encode(head)):]))
16# <|mood:affectionate|> *nose boop* *wag wag* *tail wag* woof!onnx/nushy5.int8.onnx runs the same weights under ONNX Runtime, using
tokenizer_nushy5.py and router.py for encoding and mood selection.| Field | Value |
|---|---|
| Layers | 3 |
| Attention | grouped-query, 4 query heads, 2 KV heads |
| Embedding width | 96 |
| Positional | rotary (RoPE), theta 10000, scalable via PI, NTK, YaRN |
| Context | 128 tokens trained |
| Vocab | 154, expandable (novel *action tags* cost 0 new ids) |
| Metric | Value | Source |
|---|---|---|
| Prompt to mood routing | 100%, 64 of 64 held-out gold | eval_routing_hard.py |
| Mood legibility (probe) | 81% against 10% chance | eval_expressiveness.py |
| KV-cache vs full forward | 3.3e-7 max abs diff | model.py |
| torch vs ONNX Runtime | 1e-5 max abs diff | export_onnx.py |
| int8 ONNX size | 0.36 MB | on disk |
do_sample=True.