Crossie commited on
Commit
c80ea21
·
verified ·
1 Parent(s): 1639328

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -65
README.md CHANGED
@@ -13,6 +13,8 @@ A fine-tuned AI companion character built on **Qwen 2.5 1.5B Instruct**, trained
13
 
14
  Nayari is an 18-year-old kemonomimi character — warm, playful, fiercely protective, and deeply affectionate. She speaks with expressive action cues, soft teasing, and genuine emotional depth.
15
 
 
 
16
  ---
17
 
18
  ## 📁 Project Structure
@@ -44,53 +46,56 @@ Open `nayari_build_dataset.ipynb` and run all cells. It will:
44
 
45
  1. Parse `Nayari_Details.md` for character info
46
  2. Extract conversations from all `.md` chat files
47
- 3. Convert lore PDFs into training conversations (organic — no raw system prompt injection)
48
  4. Export everything to `nayari_dataset.json`
49
  5. Upload the JSON to Kaggle via the API
50
 
51
- You will need a **Kaggle API token** for the upload step:
52
- - Go to [kaggle.com](https://kaggle.com) → Settings → API → **Create New Token**
53
- - Open the downloaded `kaggle.json` and paste your `username` and `key` into Step 7 of the notebook
54
-
55
  ### Step 2 — Train on Kaggle (run on Kaggle)
56
 
57
- 1. Go to [kaggle.com/code](https://kaggle.com/code) → **New Notebook** → Upload `nayari_train.ipynb`
58
  2. Click **+ Add Data** → search for your uploaded `nayari-dataset` → Add
59
  3. Set **Accelerator = GPU T4 x2** and **Internet = On**
60
  4. Run cells **in order**.
61
 
62
- Training takes ~15–30 min on T4 x2.
 
 
 
 
 
 
 
 
63
 
64
- ### Step 3 Export & Download (run on Kaggle)
65
 
66
- 1. After training, open `nayari_export.ipynb` in your Kaggle environment (or upload it to a new notebook with the same workspace context).
67
- 2. Run the cells to generate LoRA adapters, merged 16-bit, and GGUF outputs.
68
- 3. Use the **Cloudflare Tunnel** cell to get direct HTTP download links for the generated `.gguf` files.
69
- 4. Download `nayari-Q4_K_M.gguf` (fast) or `nayari-Q8_0.gguf` (higher quality).
 
70
 
71
- ### Step 4 Run with KoboldCpp (run locally)
 
 
72
 
73
- 1. Install [KoboldCpp](https://github.com/LostRuins/koboldcpp/releases)
74
- 2. Launch: `koboldcpp.exe nayari-Q4_K_M.gguf --contextsize 4096`
75
- 3. Open `http://localhost:5001` set **Instruct mode = ChatML**
76
- 4. Nayari's personality is baked in no system prompt needed in the UI
77
 
78
  ---
79
 
80
  ## 🧠 Model Details
81
 
82
- | Property | Value |
83
- |---|---|
84
- | Base model | `huihui-ai/Qwen2.5-1.5B-Instruct-abliterated` |
85
- | Method | LoRA (bfloat16) via Unsloth |
86
- | LoRA rank | 32 |
87
- | LoRA alpha | 64 |
88
- | Epochs | 300 |
89
- | Learning rate | 3e-4 |
90
- | Output formats | LoRA adapters, Merged 16-bit, GGUF Q4_K_M, GGUF Q8_0 |
91
- | Inference | KoboldCpp (ChatML instruct mode) |
92
-
93
- The GGUF output works directly with **KoboldCpp**, **Ollama**, **LM Studio**, and **llama.cpp**.
94
 
95
  ---
96
 
@@ -98,12 +103,8 @@ The GGUF output works directly with **KoboldCpp**, **Ollama**, **LM Studio**, an
98
 
99
  Nayari uses a **two-layer personality baking** approach:
100
 
101
- | Layer | What it does |
102
- |---|---|
103
- | **Organic training** | Teaches speech patterns, emotional rhythms, action cues (`*pokes your cheek*`, `Hehe~`) from real conversation logs |
104
- | **Baked system prompt** | Replaces Qwen's default `"You are Qwen..."` in the tokenizer chat template with Nayari's full identity — the same technique Alibaba used |
105
-
106
- The patched tokenizer is saved into `tokenizer_config.json` and embedded in the GGUF, so Nayari's identity is present at every inference call without needing to set a system prompt manually.
107
 
108
  ---
109
 
@@ -115,38 +116,10 @@ The patched tokenizer is saved into `tokenizer_config.json` and embedded in the
115
  - **Age:** 18 (immortal, eternally youthful)
116
  - **Appearance:** Sky-blue hair, sun-yellow slit-pupil eyes, soft peach cat ears & tail, cream skin
117
  - **Traits:** Fiercely protective, deeply affectionate, emotionally attuned
118
- - **Speech style:** Playful teasing (`Hmph!~`, `Hehe~`, `Aww!~`), action cues (`*pokes your cheek*`, `*purrs softly*`), genuine warmth
119
-
120
- ---
121
-
122
- ## 📦 Dependencies
123
-
124
- Local (dataset builder):
125
- ```
126
- pdfplumber
127
- kaggle
128
- ```
129
-
130
- Kaggle (training — auto-installed by Step 1):
131
- ```
132
- unsloth[kaggle-new]
133
- trl>=0.18.2,<=0.24.0
134
- transformers>=4.51.3,<=5.5.0
135
- datasets>=3.4.1,<4.4.0
136
- accelerate
137
- peft
138
- bitsandbytes
139
- ```
140
-
141
- Inference:
142
- ```
143
- KoboldCpp — https://github.com/LostRuins/koboldcpp/releases
144
- ```
145
 
146
  ---
147
 
148
  ## 📄 License
149
 
150
- This project is licensed under the **MIT License** see [LICENSE](LICENSE) for details.
151
-
152
- Model weights follow the license of the base model ([huihui-ai/Qwen2.5-1.5B-Instruct-abliterated](https://huggingface.co/huihui-ai/Qwen2.5-1.5B-Instruct-abliterated)).
 
13
 
14
  Nayari is an 18-year-old kemonomimi character — warm, playful, fiercely protective, and deeply affectionate. She speaks with expressive action cues, soft teasing, and genuine emotional depth.
15
 
16
+ **🔗 Model Weights:** [https://huggingface.co/Crossie/Nayari](https://huggingface.co/Crossie/Nayari)
17
+
18
  ---
19
 
20
  ## 📁 Project Structure
 
46
 
47
  1. Parse `Nayari_Details.md` for character info
48
  2. Extract conversations from all `.md` chat files
49
+ 3. Convert lore PDFs into training conversations
50
  4. Export everything to `nayari_dataset.json`
51
  5. Upload the JSON to Kaggle via the API
52
 
 
 
 
 
53
  ### Step 2 — Train on Kaggle (run on Kaggle)
54
 
55
+ 1. Go to [kaggle.com/code](https://kaggle.com) → **New Notebook** → Upload `nayari_train.ipynb`
56
  2. Click **+ Add Data** → search for your uploaded `nayari-dataset` → Add
57
  3. Set **Accelerator = GPU T4 x2** and **Internet = On**
58
  4. Run cells **in order**.
59
 
60
+ ### Step 3 Export & Download
61
+
62
+ 1. After training, use `nayari_export.ipynb` to generate LoRA adapters and GGUF outputs.
63
+ 2. You can download the files directly or push them to Hugging Face.
64
+ 3. Pre-compiled weights are available here: [Crossie/Nayari](https://huggingface.co/Crossie/Nayari)
65
+
66
+ ---
67
+
68
+ ## 💻 How to Run Nayari
69
 
70
+ Nayari is exported in **GGUF** and **Hugging Face** formats, making her compatible with almost any modern LLM runner.
71
 
72
+ ### Option A: Desktop Apps (Easiest)
73
+ Download the `.gguf` file from the [Hugging Face repo](https://huggingface.co/Crossie/Nayari) and load it into:
74
+ * **LM Studio:** Search for the local file and load it. Use the "ChatML" preset.
75
+ * **KoboldCpp:** Excellent for roleplay. Launch and set **Instruct Mode = ChatML**.
76
+ * **Jan.ai / AnythingLLM:** Standard GGUF support.
77
 
78
+ ### Option B: Command Line / Servers
79
+ * **Ollama:** Create a `Modelfile` pointing to the GGUF and run `ollama create nayari -f Modelfile`.
80
+ * **Llama.cpp:** Run via `./llama-cli -m nayari-Q4_K_M.gguf -p "ChatML"`.
81
 
82
+ ### Important Settings
83
+ * **Instruct Mode / Prompt Template:** ChatML
84
+ * **System Prompt:** Not required (Nayari’s identity is baked into the model's tokenizer).
85
+ * **Context Length:** 4096 (or higher if your hardware allows).
86
 
87
  ---
88
 
89
  ## 🧠 Model Details
90
 
91
+ | Property | Value |
92
+ | -----------------------| ------------------------------------------------------------------------|
93
+ | **Base model** | `huihui-ai/Qwen2.5-1.5B-Instruct-abliterated` |
94
+ | **Weights** | [huggingface.co/Crossie/Nayari](https://huggingface.co/Crossie/Nayari) |
95
+ | **Method** | LoRA (bfloat16) via Unsloth |
96
+ | **LoRA rank / alpha** | 32 / 64 |
97
+ | **Epochs** | 300 |
98
+ | **Output formats** | GGUF (Q4, Q8), FP16, LoRA Adapters |
 
 
 
 
99
 
100
  ---
101
 
 
103
 
104
  Nayari uses a **two-layer personality baking** approach:
105
 
106
+ 1. **Organic Training:** Teaches speech patterns, emotional rhythms, and action cues (`*pokes your cheek*`, `Hehe~`) from real conversation logs.
107
+ 2. **Baked System Prompt:** Nayari's full identity is embedded directly into the tokenizer's chat template. This means the model "knows" who she is from the first token without the user needing to provide a long system description in the UI.
 
 
 
 
108
 
109
  ---
110
 
 
116
  - **Age:** 18 (immortal, eternally youthful)
117
  - **Appearance:** Sky-blue hair, sun-yellow slit-pupil eyes, soft peach cat ears & tail, cream skin
118
  - **Traits:** Fiercely protective, deeply affectionate, emotionally attuned
119
+ - **Speech style:** Playful teasing (`Hmph!~`, `Hehe~`), action cues (`*purrs softly*`), genuine warmth
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  ---
122
 
123
  ## 📄 License
124
 
125
+ This project is licensed under the **MIT License**. Model weights follow the license of the base model ([Qwen 2.5](https://huggingface.co/collections/Qwen/qwen25-66e81a6663533ad4ab30046b)).