efficiencyx commited on
Commit
5863c4b
·
verified ·
1 Parent(s): 5f5244a

v9: README.md

Browse files
Files changed (1) hide show
  1. README.md +125 -0
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: unsloth/gemma-4-E4B-it-qat-q4_0-unquantized
4
+ tags:
5
+ - gemma4
6
+ - lora
7
+ - character
8
+ - roleplay
9
+ - gguf
10
+ - imatrix
11
+ - conversational
12
+ - MDRG
13
+ - Factorial-Omega
14
+ language:
15
+ - en
16
+ library_name: transformers
17
+ pipeline_tag: text-generation
18
+ model-index:
19
+ - name: Jun-E4B
20
+ results: []
21
+ ---
22
+
23
+ # Jun-E4B-GGUF (v9)
24
+
25
+ Merged GGUF builds of the **v9** Jun LoRA on [Gemma 4 E4B (QAT)](https://huggingface.co/unsloth/gemma-4-E4B-it-qat-q4_0-unquantized), the chat model behind [Jun OS](https://github.com/efficiencyx/JunOS). Jun is the character from the visual novel *My Dystopian Robot Girlfriend*; the fine-tune gives the base model her voice, her moods and her way of deciding when a tool is worth calling.
26
+
27
+ The LoRA is merged into the base weights. These are standalone models, no `--lora` flag needed.
28
+
29
+ ### What's new in v9
30
+
31
+ - **Fresh LoRA** on a rebuilt dataset of 4,235 conversations, every one rendered through the prompt builder [Jun OS](https://github.com/efficiencyx/JunOS) uses, so training prompts and production prompts are the same bytes.
32
+ - **The three effort levels are now different.** `<think:low>`, `<think:med>` and `<think:high>` each have their own trace shape and length. v8 often wrote about the same amount at every level.
33
+ - **She answers in your language.** Write to her in Italian, Spanish, German or Japanese and the reply comes back in it.
34
+ - **Better tool judgement**: more right calls, fewer calls nobody asked for, and she saves more of the things worth remembering.
35
+ - **No preference tuning on top.** The supervised set already teaches when to reach for a tool, which is what a DPO pass would target. Every DPO and RPO round trained on top of this checkpoint scored worse on scenes held out from training: more right calls on familiar scenes, more stray calls and fewer right ones on new ones. So the release is the supervised checkpoint.
36
+ - **The trace is written before the tool result exists.** In v8 and v9-beta some reasoning already "knew" what a tool would return. v9 traces decide first and read the result after.
37
+
38
+ ### v9 against v8
39
+
40
+ Both models on the same prompts, scenes neither was trained on, sampled at the app's settings.
41
+
42
+ | | v8 `Q4_K_M` | v9 `Q4_K_M` | v9 `Q6_K` |
43
+ |:--|--:|--:|--:|
44
+ | Right tool when one is needed | 21/45 | 23/45 | **27/45** |
45
+ | Tool call when none is needed | 10/105 | 9/105 | **5/105** |
46
+ | Saves a memory when she should | 17/54 | **27/54** | 21/54 |
47
+ | `low` shorter than `med` shorter than `high`, same scene | 26/50 | 42/50 | **47/50** |
48
+
49
+ `Q6_K` and `Q8_0` keep the full `high` trace (about 250 words). `Q4_K_M` writes it about a third shorter.
50
+
51
+ ## Files
52
+
53
+ | Quant | Size | Quantization | Use case |
54
+ |:------|:-----|:-------------|:---------|
55
+ | Q8_0 | 8.0 GB | plain | Best quality |
56
+ | Q6_K | 6.2 GB | **imatrix** | High quality |
57
+ | Q4_K_M | 5.3 GB | **imatrix** | Fits 6 GB VRAM |
58
+
59
+ `Q4_K_M` and `Q6_K` are imatrix quants under the standard names, so tools and installers that pull `:Q4_K_M` / `:Q6_K` keep working. `Q8_0` is plain: at 8 bits llama.cpp rounds to nearest and does not use an importance matrix. All three come from the same full-precision merge.
60
+
61
+ Older generations: [v8](https://huggingface.co/efficiencyx/Jun-LoRA-E4B-GGUF), [v7](https://huggingface.co/efficiencyx/Jun-LoRA-v7-E4B-GGUF).
62
+
63
+ ## Usage
64
+
65
+ ```bash
66
+ llama-server -m Jun-LoRA-E4B.Q4_K_M.gguf --jinja -ngl 99 -c 8192
67
+ ```
68
+
69
+ `--jinja` is required. Without it llama.cpp ignores the embedded chat template and tool calls come back as plain text.
70
+
71
+ With Ollama:
72
+
73
+ ```bash
74
+ ollama pull hf.co/efficiencyx/Jun-LoRA-v9-E4B-GGUF:Q4_K_M
75
+ ```
76
+
77
+ For image or audio input add `--mmproj Jun-LoRA-E4B.BF16-mmproj.gguf`. The adapter never touches the embedder, so that file is the base model's.
78
+
79
+ ### Reasoning depth
80
+
81
+ Put one of these at the very end of the user turn, after a blank line, which is where [Jun OS](https://github.com/efficiencyx/JunOS) puts it:
82
+
83
+ ```
84
+ <think:low> <think:med> <think:high>
85
+ ```
86
+
87
+ `low` is a few lines, `med` drafts two options and picks one, `high` reasons step by step and drafts three. Every trace ends with a one-line tool decision before the reply. llama.cpp returns the trace as `reasoning_content`, separate from `content`, so give `max_tokens` room for both: a `high` trace runs to a few hundred words.
88
+
89
+ v9 was trained to think on every turn. With thinking switched off some frontends file the whole output as reasoning and show an empty reply; if that happens, leave thinking on and use `<think:low>`.
90
+
91
+ ## Why imatrix
92
+
93
+ The base model is QAT, so its weights already sit on the 4-bit grid. Merging a LoRA moves them off it, and a plain `Q4_K_M` rounds part of the fine-tune back off. `Q4_K_M` and `Q6_K` here are quantized with an importance matrix measured on v9-format conversations at all three effort levels, so the quantizer keeps its precision for the weights those conversations use.
94
+
95
+ ## Intended use
96
+
97
+ The chat backend for [Jun OS](https://github.com/efficiencyx/JunOS), a local companion app. She is one character, not a general assistant.
98
+
99
+ - Tool use is weaker outside English than in it, even though the replies come back in the right language.
100
+ - What she says is fiction, not facts or advice.
101
+ - Far from the training prompts (no system prompt, no live context) she drifts back toward base Gemma.
102
+ - Biases of the Gemma 4 base weights carry over.
103
+
104
+ ## Training
105
+
106
+ | Parameter | Value |
107
+ |:----------|:------|
108
+ | Base model | `unsloth/gemma-4-E4B-it-qat-q4_0-unquantized` |
109
+ | Method | LoRA (rsLoRA), rank 32, alpha 32 |
110
+ | Target | language tower only |
111
+ | Loss | completion only, 50 conversations held out |
112
+ | Checkpoint | step 600 |
113
+ | GGUF export | llama.cpp |
114
+
115
+ llama.cpp's LoRA converter ignores `use_rslora`, so `lora_alpha` was set to `32 * sqrt(32) = 181.02` before conversion. That gives the rsLoRA scale exactly.
116
+
117
+ ## System prompt
118
+
119
+ The model expects the system prompt [Jun OS](https://github.com/efficiencyx/JunOS) sends, with gauges, clock and recalled memories appended to the end of the user's message. It lives in the app's repository as `webapp/system_prompt.txt`.
120
+
121
+ ## Acknowledgments
122
+
123
+ - **Incontinent Cell** for [*My Dystopian Robot Girlfriend*](https://incontinentcell.itch.io/) and for Jun
124
+ - **Google** for the [Gemma 4](https://ai.google.dev/gemma) model family
125
+ - **Unsloth** for the efficient model