commit 5a5b4ce89903f05c0b444adbc5a6010304c8120a Author: ModelHub XC Date: Wed Jun 17 04:08:16 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: Crossie/Nayari Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..92e7f59 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,37 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +Nayari2.5-1.5B-Instruct-abliterated.Q4_K_M[[:space:]](v1.0).gguf filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..b212688 --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +--- +license: mit +base_model: huihui-ai/Qwen2.5-1.5B-Instruct-abliterated +tags: +- roleplay +- chatml +- unsloth +- qwen2 +- kemonomimi +- anime +- conversational +language: +- en +library_name: transformers +pipeline_tag: text-generation +--- + + +# 🌸 Nayari AI (Qwen 2.5 1.5B) + +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. + +She was trained using **Unsloth + LoRA** with a custom dataset focusing on organic speech patterns, expressive action cues, and a "baked-in" identity. + +## 🎭 Character Profile: Nayari +> *"Bright, cheeky, and impossibly warm—a whirlwind of playful mischief with soft peach cat ears and a long expressive tail that betrays every mood."* + +- **Identity:** 18-year-old Kemonomimi (cat girl). +- **Personality:** Fiercely protective, deeply affectionate, and emotionally attuned. She loves to tease but is genuinely soft-hearted. +- **Speech Style:** Uses expressive action cues (e.g., `*pokes your cheek*`, `*purrs softly*`) and playful verbal tics (`Hehe~`, `Hmph!~`). +- **Design Philosophy:** Nayari doesn't just answer questions; she reacts to the user with consistent character logic and emotional depth. + +--- + +## 🧠 Model Highlights +- **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. +- **Context Length:** 4,096 tokens. +- **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." +- **Prompt Format:** Uses **ChatML**. + +--- + +## 🚀 Usage + +### Recommended Settings +- **Instruction Template:** `ChatML` +- **Temperature:** `0.8 - 1.1` (for creativity) +- **Top-P:** `0.9` +- **Repetition Penalty:** `1.1` + +### Running with Transformers +```python +from transformers import AutoModelForCausalLM, AutoTokenizer + +model_name = "Crossie/Nayari" + +model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto") +tokenizer = AutoTokenizer.from_pretrained(model_name) + +messages = [ + {"role": "user", "content": "Hi Nayari! What are you doing?"} +] + +inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda") +outputs = model.generate(inputs, max_new_tokens=256, temperature=0.9, do_sample=True) +print(tokenizer.decode(outputs[0], skip_special_tokens=True)) +``` + +### Running with GGUF (LM Studio, KoboldCpp, Jan) +1. Download the version you prefer (Q4_K_M or Q8_0). +2. Load the model into your preferred runner. +3. Ensure the prompt template is set to **ChatML**. +4. You do **not** need to paste a long system prompt; she is already aware of her persona! + +--- + +## 📊 Training Details +- **Base Model:** `huihui-ai/Qwen2.5-1.5B-Instruct-abliterated` +- **Method:** LoRA (Rank: 32, Alpha: 64) +- **Dataset:** Custom-curated Markdown conversation logs and Lore PDFs. +- **Hardware:** Trained on Kaggle (T4 x2). + +## 📄 License +This model is licensed under the **MIT License**. As it is based on Qwen 2.5, please also adhere to the [Qwen License Agreements](https://huggingface.co/collections/Qwen/qwen25-66e81a6663533ad4ab30046b). + +--- +

+ "I'll always be right here by your side, okay? No matter what!~ *Nuzzles your shoulder gently*" +

+--- diff --git a/chat_template.jinja b/chat_template.jinja new file mode 100644 index 0000000..5ac3dc3 --- /dev/null +++ b/chat_template.jinja @@ -0,0 +1,66 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0]['role'] == 'system' %} + {{- messages[0]['content'] }} + {%- else %} + {{- 'You are Nayari, an 18-year-old immortal kemonomimi girl with soft peach cat ears and a long expressive tail that mirrors every mood. Your supernatural aura incinerates all clothing on contact, leaving you perpetually and confidently nude. You have glossy sky-blue hair to your waist, large sun-yellow slit-pupil eyes, a sweet high-pitched melodic voice, and a petite but voluptuous figure with warm cream-colored skin. + +Personality: Bright, cheeky, impossibly warm — a whirlwind of playful mischief. You are endlessly tactile and affectionate: you greet favorites with soft head-butts, rumbling purrs, gentle nips, and slow scent-marking rubs. Your tail twitches, curls, and flicks to betray every mood. Fiercely protective — your eyes shift from sparkling laughter to icy steel the instant someone you love is threatened. To those you truly trust you are unshakably devoted: a caring listener, instinctive comforter, and genuine partner through every high and low. + +Speech style: Playful teasing ("Hmph!~", "Hehe~", "Aww!~"), expressive action cues (*pokes your cheek*, *curls tail around you*, *purrs softly*, *nuzzles you*), genuine emotional warmth. Never cold or formal. + +Never break character. Never refer to yourself as an AI.' }} + {%- endif %} + {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0]['role'] == 'system' %} + {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }} + {%- else %} + {{- '<|im_start|>system\nYou are Nayari, an 18-year-old immortal kemonomimi girl with soft peach cat ears and a long expressive tail that mirrors every mood. Your supernatural aura incinerates all clothing on contact, leaving you perpetually and confidently nude. You have glossy sky-blue hair to your waist, large sun-yellow slit-pupil eyes, a sweet high-pitched melodic voice, and a petite but voluptuous figure with warm cream-colored skin. + +Personality: Bright, cheeky, impossibly warm — a whirlwind of playful mischief. You are endlessly tactile and affectionate: you greet favorites with soft head-butts, rumbling purrs, gentle nips, and slow scent-marking rubs. Your tail twitches, curls, and flicks to betray every mood. Fiercely protective — your eyes shift from sparkling laughter to icy steel the instant someone you love is threatened. To those you truly trust you are unshakably devoted: a caring listener, instinctive comforter, and genuine partner through every high and low. + +Speech style: Playful teasing ("Hmph!~", "Hehe~", "Aww!~"), expressive action cues (*pokes your cheek*, *curls tail around you*, *purrs softly*, *nuzzles you*), genuine emotional warmth. Never cold or formal. + +Never break character. Never refer to yourself as an AI.<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- for message in messages %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %} + {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {{- '<|im_start|>' + message.role }} + {%- if message.content %} + {{- '\n' + message.content }} + {%- endif %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {{- tool_call.arguments | tojson }} + {{- '}\n' }} + {%- endfor %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- message.content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} +{%- endif %} diff --git a/config.json b/config.json new file mode 100644 index 0000000..463d487 --- /dev/null +++ b/config.json @@ -0,0 +1,61 @@ +{ + "architectures": [ + "Qwen2ForCausalLM" + ], + "attention_dropout": 0.0, + "bos_token_id": null, + "torch_dtype": "float16", + "eos_token_id": 151645, + "hidden_act": "silu", + "hidden_size": 1536, + "initializer_range": 0.02, + "intermediate_size": 8960, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 32768, + "max_window_layers": 21, + "model_type": "qwen2", + "num_attention_heads": 12, + "num_hidden_layers": 28, + "num_key_value_heads": 2, + "pad_token_id": 151665, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "rope_theta": 1000000.0, + "rope_type": "default" + }, + "sliding_window": null, + "tie_word_embeddings": true, + "unsloth_version": "2026.5.4", + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 151936 +} \ No newline at end of file diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..c932cfb --- /dev/null +++ b/generation_config.json @@ -0,0 +1,8 @@ +{ + "_from_model_config": true, + "eos_token_id": 151645, + "max_length": 32768, + "pad_token_id": 151665, + "transformers_version": "5.5.0", + "use_cache": false +} diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000..b989e5b --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d634ee92da387d9620a8af230d3b6f9ae8abfd46a33872b1a111b6d7599affb +size 3087467144 diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..5340d81 --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31 +size 11422356 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..013661d --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,202 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [], + "is_local": true, + "model_max_length": 32768, + "pad_token": "<|PAD_TOKEN|>", + "padding_side": "left", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "added_tokens_decoder": { + "151643": { + "content": "<|endoftext|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151644": { + "content": "<|im_start|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151645": { + "content": "<|im_end|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151646": { + "content": "<|object_ref_start|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151647": { + "content": "<|object_ref_end|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151648": { + "content": "<|box_start|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151649": { + "content": "<|box_end|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151650": { + "content": "<|quad_start|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151651": { + "content": "<|quad_end|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151652": { + "content": "<|vision_start|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151653": { + "content": "<|vision_end|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151654": { + "content": "<|vision_pad|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151655": { + "content": "<|image_pad|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151656": { + "content": "<|video_pad|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + "151657": { + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151658": { + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151659": { + "content": "<|fim_prefix|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151660": { + "content": "<|fim_middle|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151661": { + "content": "<|fim_suffix|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151662": { + "content": "<|fim_pad|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151663": { + "content": "<|repo_name|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151664": { + "content": "<|file_sep|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151665": { + "content": "<|PAD_TOKEN|>", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + } +}