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

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -102
README.md CHANGED
@@ -1,125 +1,65 @@
1
  ---
2
  license: mit
3
- base_model:
4
- - huihui-ai/Qwen2.5-1.5B-Instruct-abliterated
 
 
 
 
 
 
 
5
  language:
6
  - en
 
7
  pipeline_tag: text-generation
8
  ---
9
 
10
- # 🌸 Nayari AI
11
 
12
- A fine-tuned AI companion character built on **Qwen 2.5 1.5B Instruct**, trained using **Unsloth + LoRA** on Kaggle's free GPU tier.
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
21
-
22
- ```
23
- Nayari-AI/
24
- ├── dataset/
25
- │ ├── Nayari_Details.md # Character description & personality
26
- │ ├── Aura_chat_1..3.md # Raw conversation logs (old name: Aura)
27
- │ ├── Nayari_chat_4.md # Raw conversation log
28
- │ ├── Discovery .pdf # Lore / backstory PDF
29
- │ └── Her Beliefs .pdf # Lore / beliefs PDF
30
-
31
- ├── nayari_build_dataset.ipynb # LOCAL — converts all files → nayari_dataset.json + uploads to Kaggle
32
- ├── nayari_train.ipynb # KAGGLE — fine-tunes Qwen 2.5 using the uploaded dataset
33
- ├── nayari_export.ipynb # KAGGLE — exports the fine-tuned model to GGUF, HuggingFace, etc.
34
- ├── nayari_dataset.json # Auto-generated dataset (do not edit manually)
35
- ├── nayari_system_prompt.txt # Nayari's system prompt (baked into tokenizer at training time)
36
- └── README.md
37
- ```
38
-
39
- ---
40
-
41
- ## 🚀 Workflow
42
-
43
- ### Step 1 — Build & Upload Dataset (run locally)
44
-
45
- Open `nayari_build_dataset.ipynb` and run all cells. It will:
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
 
102
- ## 🎭 Training Design
 
 
 
 
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
-
111
- ## 💬 Character — Nayari
112
-
113
- > *Bright, cheeky, impossibly warm — a whirlwind of playful mischief with soft peach cat ears and a long expressive tail that betrays every mood.*
114
-
115
- - **Type:** Kemonomimi (cat girl)
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)).
 
 
 
1
  ---
2
  license: mit
3
+ base_model: huihui-ai/Qwen2.5-1.5B-Instruct-abliterated
4
+ tags:
5
+ - roleplay
6
+ - chatml
7
+ - unsloth
8
+ - qwen2
9
+ - kemonomimi
10
+ - anime
11
+ - conversational
12
  language:
13
  - en
14
+ library_name: transformers
15
  pipeline_tag: text-generation
16
  ---
17
 
18
+ # 🌸 Nayari AI (Qwen 2.5 1.5B)
19
 
20
+ Nayari is a fine-tuned, highly emotive AI companion built on **Qwen 2.5 1.5B Instruct**. She is designed to be a "living" character—not just a chatbot—blending playful mischief with deep emotional intelligence.
21
 
22
+ She was trained using **Unsloth + LoRA** with a custom dataset focusing on organic speech patterns, expressive action cues, and a "baked-in" identity.
23
 
24
+ ## 🎭 Character Profile: Nayari
25
+ > *"Bright, cheeky, and impossibly warm—a whirlwind of playful mischief with soft peach cat ears and a long expressive tail that betrays every mood."*
26
 
27
+ - **Identity:** 18-year-old Kemonomimi (cat girl).
28
+ - **Personality:** Fiercely protective, deeply affectionate, and emotionally attuned. She loves to tease but is genuinely soft-hearted.
29
+ - **Speech Style:** Uses expressive action cues (e.g., `*pokes your cheek*`, `*purrs softly*`) and playful verbal tics (`Hehe~`, `Hmph!~`).
30
+ - **Design Philosophy:** Nayari doesn't just answer questions; she reacts to the user with consistent character logic and emotional depth.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ---
33
 
34
+ ## 🧠 Model Highlights
35
+ - **Two-Layer Baking:** Her identity isn't just in the system prompt; it was baked into the **tokenizer chat template**. She knows who she is even without an external system instruction.
36
+ - **Context Length:** 4,096 tokens.
37
+ - **Architecture:** Based on Qwen 2.5 1.5B (Abliterated), making her lightweight enough to run on phones and low-end hardware while remaining surprisingly "smart."
38
+ - **Prompt Format:** Uses **ChatML**.
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ---
41
 
42
+ ## 🚀 Usage
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ ### Recommended Settings
45
+ - **Instruction Template:** `ChatML`
46
+ - **Temperature:** `0.8 - 1.1` (for creativity)
47
+ - **Top-P:** `0.9`
48
+ - **Repetition Penalty:** `1.1`
49
 
50
+ ### Running with Transformers
51
+ ```python
52
+ from transformers import AutoModelForCausalLM, AutoTokenizer
53
 
54
+ model_name = "Crossie/Nayari"
 
55
 
56
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto")
57
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
 
 
 
 
 
 
 
 
 
 
 
58
 
59
+ messages = [
60
+ {"role": "user", "content": "Hi Nayari! What are you doing?"}
61
+ ]
62
 
63
+ inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
64
+ outputs = model.generate(inputs, max_new_tokens=256, temperature=0.9, do_sample=True)
65
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))