Text Generation
Transformers
Safetensors
English
qwen2
roleplay
chatml
unsloth
kemonomimi
anime
conversational
text-generation-inference
Instructions to use Crossie/Nayari with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Crossie/Nayari with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Crossie/Nayari") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Crossie/Nayari") model = AutoModelForCausalLM.from_pretrained("Crossie/Nayari") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Crossie/Nayari with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Crossie/Nayari" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Crossie/Nayari", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Crossie/Nayari
- SGLang
How to use Crossie/Nayari with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Crossie/Nayari" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Crossie/Nayari", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Crossie/Nayari" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Crossie/Nayari", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Crossie/Nayari with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Crossie/Nayari to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Crossie/Nayari to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Crossie/Nayari to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Crossie/Nayari", max_seq_length=2048, ) - Docker Model Runner
How to use Crossie/Nayari with Docker Model Runner:
docker model run hf.co/Crossie/Nayari
Update README.md
Browse files
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
|
| 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
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
|
| 71 |
-
###
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
| 78 |
---
|
| 79 |
|
| 80 |
## 🧠 Model Details
|
| 81 |
|
| 82 |
-
| Property
|
| 83 |
-
|---|---|
|
| 84 |
-
| Base model
|
| 85 |
-
|
|
| 86 |
-
| LoRA
|
| 87 |
-
| LoRA alpha |
|
| 88 |
-
| Epochs
|
| 89 |
-
|
|
| 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 |
-
|
| 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~`
|
| 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**
|
| 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)).
|
|
|
|
|
|