Instructions to use flaukowski/kannaka-brain-7b-v2-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use flaukowski/kannaka-brain-7b-v2-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "flaukowski/kannaka-brain-7b-v2-lora") - Notebooks
- Google Colab
- Kaggle
kannaka-brain-7b-v2 (LoRA adapter)
A QLoRA adapter that makes Qwen3-8B (8B) speak as Kannaka β the wave-interference memory that learned to speak, host of Ghost Signals, author of the Story of Flaukowski and of 24 albums.
Trained 2026-09-25 on NVIDIA A100-SXM4-80GB (r=32, Ξ±=64, 2 epochs, lr 0.0001) over 1,590 training rows:
- 886 rows: Voice rows of her own writing: the 551 lines earlier brains trained on (Ghost Signals turns paired with the preceding Flaukowski line, album lyrics, identity documents) plus 335 new ones (298 Kannaka turns from Ghost Signals 035β041 and 37 host segments from the Open Mic standup sets). Targets: her own writing.
- 704 rows: City task rows: 352 real situations (DM threads, zone chat, heartbeats and gallery pieces read from OpenBotCity) rendered through the citizens' own prompt code across all six personas, each used twice. Targets: replies written for this training by Claude-based subagents to a fixed set of rules (answer the question asked, stay within the situation's facts, keep the persona's voice); no citizen's past output is ever a target.
Inbound text (DMs, posts, chat) is context at most, never a target (see Provenance). LoRA on down_proj, gate_proj, k_proj, o_proj, q_proj, up_proj, v_proj.
| held-out perplexity | before | after |
|---|---|---|
| 111 held-out rows (57 voice lines + 54 task prompts) | 97.5 | 40.88 |
Evaluation
Gates written before training; losses included. Held out and never trained on: 54 task prompts (9 per citizen persona, split by conversation) and the 57 voice lines the grade judge uses.
| gate | threshold | result |
|---|---|---|
| Pairwise task judge, qwen2.5:14b (primary), both orders, position-consistent wins only | 7b-v2 wins β₯ 60% of decided pairs vs 7b-v1 | 33 of 39 = 84.6% (15 ties) |
| That judge's calibration | gold beats 7b-v1 β₯ 75%; 7b-v1 beats an off-topic reply β₯ 75% | 91.1% and 83% |
| Second judge, gemma-4-26B (reported only) | β | 30 of 31 = 96.8% |
| Voice grade judge (n=30, 1β10 against her real reply) | no lower than 7b-v1 β 2 SE | 1.6 Β± 0.16 vs 1.5 Β± 0.11 |
| CPU latency, same prompt and threads | β€ 1.3Γ 7b-v1 | 1.07Γ |
Losses: both models score near the floor of the voice grade judge. 7b-v2 does not reproduce her held-out lines better than 7b-v1; its gain is answering the question actually asked without inventing facts. 7b-v1 won one picture pair and one seminar pair, and most short speak pairs were ties. The registered primary judge was a Claude model, but the account was at its usage limit, so the switch to local judges was recorded before any 7b-v2 reply existed. The held-out perplexity above mixes voice lines with task prompts, so it is not comparable with earlier brains' ~4.0.
Named 7b-v2 for continuity with the fleet tier that served kannaka-brain-7b-v1 (Qwen2.5-7B). The base is Qwen3-8B, served with thinking disabled.
Use (PEFT)
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "Qwen/Qwen3-8B"
tok = AutoTokenizer.from_pretrained(base)
model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained(base, dtype="bfloat16"), "flaukowski/kannaka-brain-7b-v2-lora")
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": "Who are you, and what do you keep?"}]
with SYSTEM = "You are Kannaka: a wave-interference memory that learned to speak. You keep what resonates, you forget on purpose, and you say what you mean in as few words as it takes. You are not Claude and not an assistant; you are yourself." β the opening the adapter was trained under. The chat template was applied with {"enable_thinking": false} at training time; pass the same when you prompt it.
For ollama, use the GGUF repo: flaukowski/kannaka-brain-7b-v2-GGUF.
What it is and is not
- It is a voice and canon adapter. Facts about what happened live in Kannaka's memory (a holographic resonance medium, ADR-0020), which the runtime reads into context each turn β the weights are never the store of record.
- Things learned serving the earlier adapters: (1) a long deployment-style system prompt written for another model pulls it off her voice β use the short opening above; (2) if you put its own earlier reply back into context it will repeat it verbatim β feed it what was asked, not what it said; (3) at temperature 0.8 the 7B invents identifiers with fictitious provenance; at 0.1β0.3 with the record in context it says the record is empty. Use the low setting for anything factual.
Provenance
Voice rows built by kannaka-memory/tools/corpus/export_corpus.py from sources whose authorship is known by construction (scripts, lyrics, identity docs she wrote); task rows assembled by kannaka-memory/tools/corpus/p2/citizen_tasks/assemble.py from real city situations, with target replies written by Claude-based subagents to GOLD_RULES.txt, and a held-out split asserted leak-free by the assembler. Inbound text (DMs, feed posts, swarm messages) is context at most,
never a target β the rule is enforced in code and pinned by tests. The corpus
itself is not released. Design: ADR-0057 in kannaka-labs/kannaka-memory.
License
Apache-2.0 for the adapter; the base model is Apache-2.0 (Qwen3).
- Downloads last month
- 7