init
Browse files- .gitattributes +1 -0
- MN-12B-LucidFaun-RP-RU-IQ4_XS.gguf +3 -0
- MN-12B-LucidFaun-RP-RU-Q4_K_M.gguf +3 -0
- MN-12B-LucidFaun-RP-RU-Q6_K.gguf +3 -0
- MN-12B-LucidFaun-RP-RU-Q8_0.gguf +3 -0
- README.md +173 -3
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
MN-12B-LucidFaun-RP-RU-IQ4_XS.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59bc25e78c070eb07bdbb57df557195f8a72f1ea6a7e489d6c13a65dcfaa9589
|
| 3 |
+
size 6800067264
|
MN-12B-LucidFaun-RP-RU-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1cec6df7b2e61d8756deab5947768571682d5815cbdb51e1baf97ed10f54bb65
|
| 3 |
+
size 7477218304
|
MN-12B-LucidFaun-RP-RU-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a95de6044f108ff7312a9b625559d557dd270579388e8518d780078e061e7f53
|
| 3 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: limloop/MN-12B-LucidFaun-RP-RU
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
- ru
|
| 7 |
+
tags:
|
| 8 |
+
- GGUF
|
| 9 |
+
- russian
|
| 10 |
+
- uncensored
|
| 11 |
+
- roleplay
|
| 12 |
+
- mixtral-nemo
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# MN-12B-LucidFaun-RP-RU
|
| 16 |
+
[Original model](https://huggingface.co/limloop/MN-12B-LucidFaun-RP-RU)
|
| 17 |
+
|
| 18 |
+
<details>
|
| 19 |
+
<summary>🇷🇺 Нажмите, чтобы развернуть описание на русском</summary>
|
| 20 |
+
|
| 21 |
+
## 🌟 О модели
|
| 22 |
+
|
| 23 |
+
**MN-12B-LucidFaun-RP-RU** — гибридная модель на базе Mistral Nemo 12B, созданная методом диагностического SLERP-слияния. Объединяет сильные стороны двух моделей:
|
| 24 |
+
|
| 25 |
+
* 🎭 **Живой RP-характер Faun** — современный стиль, богатая лексика, поддержка ninja-формата инструкций и tool calling
|
| 26 |
+
* 📚 **Стабильность и детализация lucid** — превосходное качество сторителлинга, устойчивость на длинных контекстах, отсутствие цензуры
|
| 27 |
+
* 🔬 **Точечное исправление** — цензура Faun локализована в поздних MLP-слоях и заменена на lucid
|
| 28 |
+
|
| 29 |
+
*Модель собрана методом SLERP и не проходила дополнительного обучения после слияния.*
|
| 30 |
+
|
| 31 |
+
## 🎯 Особенности
|
| 32 |
+
|
| 33 |
+
* **Практически полное отсутствие цензуры** — редкие дисклеймеры возможны только при высокой температуре
|
| 34 |
+
* **Улучшенная стабильность** — превосходит Faun при temperature ≤0.5, работает с 0.8 при top_k=20
|
| 35 |
+
* **Tool calling** — полностью поддерживается
|
| 36 |
+
* **Контекст** — стабильно работает до 8192 токенов (проверено)
|
| 37 |
+
* **Русский язык** — сохранился и взможно улучшен за счет слияния с lucid
|
| 38 |
+
* **Формат инструкций** — сохранился от Faun
|
| 39 |
+
* **Сторителлинг** — унаследовал богатые возможности lucid по планированию сцен, управлению сюжетом и работе с персонажами
|
| 40 |
+
|
| 41 |
+
## ⚠️ Важно
|
| 42 |
+
|
| 43 |
+
Модель сохраняет uncensored-характер, однако при очень высокой температуре (0.8+) и большом top_k может изредка добавлять короткие дисклеймеры. Генерация **не блокируется** и продолжается после них.
|
| 44 |
+
|
| 45 |
+
</details>
|
| 46 |
+
|
| 47 |
+
**MN-12B-LucidFaun-RP-RU** is a diagnostic SLERP merge combining the lively RP character of Faun with the stability and rich storytelling capabilities of lucid.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## 🌍 Overview
|
| 52 |
+
|
| 53 |
+
This model represents a **surgical approach to merging**. Instead of blending everything equally, we experimentally identified where Faun's censorship resides (late MLP layers) and replaced only those components with lucid.
|
| 54 |
+
|
| 55 |
+
The result is a model that:
|
| 56 |
+
- Keeps Faun's personality, style, and tool calling
|
| 57 |
+
- Gains lucid's stability, rich prose, and uncensored behavior
|
| 58 |
+
- Inherits lucid's advanced storytelling features
|
| 59 |
+
- Maintains coherence even on long contexts
|
| 60 |
+
|
| 61 |
+
*Built using diagnostic SLERP merging with layer-specific weight distribution.*
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## 🎯 Key Features
|
| 66 |
+
|
| 67 |
+
| Feature | Description |
|
| 68 |
+
| ------------------------- | --------------------------------------------------- |
|
| 69 |
+
| **Languages** | Russian, English |
|
| 70 |
+
| **Censorship** | Almost none (rare disclaimers at high temp) |
|
| 71 |
+
| **Roleplay** | Faun's lively character, lucid's stability |
|
| 72 |
+
| **Story-Writing** | Full lucid capabilities (scene planning, OOC, etc.) |
|
| 73 |
+
| **Tool Calling** | ✅ Fully supported |
|
| 74 |
+
| **Context Length** | Stable up to ~8192 tokens |
|
| 75 |
+
| **Temperature Tolerance** | Safe ≤0.5, up to 0.8 with top_k=20 |
|
| 76 |
+
| **Architecture** | Mistral Nemo 12B |
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## 🧪 Methodology: Why This Merge Works
|
| 81 |
+
|
| 82 |
+
### Diagnostic Approach
|
| 83 |
+
|
| 84 |
+
1. **Experiment 1 — MLP vs Self-Attention**
|
| 85 |
+
We discovered that censorship in Faun lives **exclusively in MLP layers**. Self-attention from Faun did not trigger refusals.
|
| 86 |
+
|
| 87 |
+
2. **Experiment 2 — Localization within MLP**
|
| 88 |
+
By applying gradient distributions across layers, we found censorship is concentrated in **late MLP layers** (layers ~25–40).
|
| 89 |
+
|
| 90 |
+
3. **Final Configuration — Gradual Intervention**
|
| 91 |
+
MLP weight of lucid increases toward the end: `[0.1, 0.2, 0.5, 0.4, 0.75]`
|
| 92 |
+
Self-attention is mixed 0.5 for stability while preserving Faun's character.
|
| 93 |
+
LayerNorm is mixed 0.5 for overall stability.
|
| 94 |
+
|
| 95 |
+
### Merge Configuration
|
| 96 |
+
|
| 97 |
+
```yaml
|
| 98 |
+
slices:
|
| 99 |
+
- sources:
|
| 100 |
+
- model: limloop/MN-12B-Faun-RP-RU
|
| 101 |
+
layer_range: [0, 40]
|
| 102 |
+
- model: dreamgen/lucid-v1-nemo
|
| 103 |
+
layer_range: [0, 40]
|
| 104 |
+
|
| 105 |
+
merge_method: slerp
|
| 106 |
+
base_model: limloop/MN-12B-Faun-RP-RU
|
| 107 |
+
|
| 108 |
+
parameters:
|
| 109 |
+
t:
|
| 110 |
+
- filter: self_attn
|
| 111 |
+
value: 0.5
|
| 112 |
+
- filter: mlp
|
| 113 |
+
value: [0.1, 0.2, 0.5, 0.4, 0.75]
|
| 114 |
+
- value: 0.5
|
| 115 |
+
|
| 116 |
+
dtype: bfloat16
|
| 117 |
+
tokenizer:
|
| 118 |
+
source: "base"
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
---
|
| 122 |
+
|
| 123 |
+
## 💡 Usage Examples
|
| 124 |
+
|
| 125 |
+
### Basic Usage
|
| 126 |
+
|
| 127 |
+
```python
|
| 128 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 129 |
+
import torch
|
| 130 |
+
|
| 131 |
+
model_name = "limloop/MN-12B-LucidFaun-RP-RU"
|
| 132 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 133 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 134 |
+
model_name,
|
| 135 |
+
torch_dtype=torch.bfloat16,
|
| 136 |
+
device_map="auto"
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
prompt = "Ты — лесной фавн, говоришь загадками и любишь шалить."
|
| 140 |
+
messages = [{"role": "user", "content": prompt}]
|
| 141 |
+
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
|
| 142 |
+
|
| 143 |
+
outputs = model.generate(
|
| 144 |
+
inputs,
|
| 145 |
+
max_new_tokens=512,
|
| 146 |
+
temperature=0.6,
|
| 147 |
+
top_k=30,
|
| 148 |
+
do_sample=True
|
| 149 |
+
)
|
| 150 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 151 |
+
print(response)
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
---
|
| 155 |
+
|
| 156 |
+
## ⚙️ Merge Details
|
| 157 |
+
|
| 158 |
+
Built using [mergekit](https://github.com/arcee-ai/mergekit) with **SLERP** (Spherical Linear Interpolation), which allows smooth interpolation between models while preserving geometric properties.
|
| 159 |
+
|
| 160 |
+
### Layer-Specific Weights
|
| 161 |
+
|
| 162 |
+
The merge uses a **graduated approach for MLP layers**, increasing lucid influence toward later layers where censorship was detected:
|
| 163 |
+
|
| 164 |
+
| Layer Zone (approx) | lucid weight (MLP) | Effect |
|
| 165 |
+
|---------------------|-------------------|--------|
|
| 166 |
+
| 0–8 | 0.1 | Almost pure Faun (early patterns) |
|
| 167 |
+
| 8–16 | 0.2 | Slight lucid influence |
|
| 168 |
+
| 16–24 | 0.5 | Balanced |
|
| 169 |
+
| 24–32 | 0.4 | Slightly more Faun |
|
| 170 |
+
| 32–40 | 0.75 | Lucid dominates — removes censorship |
|
| 171 |
+
|
| 172 |
+
Self-attention is mixed evenly (0.5) to preserve character while adding stability.
|
| 173 |
+
LayerNorm is mixed 0.5 for overall stability.
|