Instructions to use limloop/MN-12B-LucidFaun-RP-RU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use limloop/MN-12B-LucidFaun-RP-RU with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="limloop/MN-12B-LucidFaun-RP-RU") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("limloop/MN-12B-LucidFaun-RP-RU") model = AutoModelForCausalLM.from_pretrained("limloop/MN-12B-LucidFaun-RP-RU", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use limloop/MN-12B-LucidFaun-RP-RU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "limloop/MN-12B-LucidFaun-RP-RU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limloop/MN-12B-LucidFaun-RP-RU", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/limloop/MN-12B-LucidFaun-RP-RU
- SGLang
How to use limloop/MN-12B-LucidFaun-RP-RU 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 "limloop/MN-12B-LucidFaun-RP-RU" \ --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": "limloop/MN-12B-LucidFaun-RP-RU", "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 "limloop/MN-12B-LucidFaun-RP-RU" \ --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": "limloop/MN-12B-LucidFaun-RP-RU", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use limloop/MN-12B-LucidFaun-RP-RU with Docker Model Runner:
docker model run hf.co/limloop/MN-12B-LucidFaun-RP-RU
MN-12B-LucidFaun-RP-RU
π·πΊ ΠΠ°ΠΆΠΌΠΈΡΠ΅, ΡΡΠΎΠ±Ρ ΡΠ°Π·Π²Π΅ΡΠ½ΡΡΡ ΠΎΠΏΠΈΡΠ°Π½ΠΈΠ΅ Π½Π° ΡΡΡΡΠΊΠΎΠΌ
π Π ΠΌΠΎΠ΄Π΅Π»ΠΈ
MN-12B-LucidFaun-RP-RU β Π³ΠΈΠ±ΡΠΈΠ΄Π½Π°Ρ ΠΌΠΎΠ΄Π΅Π»Ρ Π½Π° Π±Π°Π·Π΅ Mistral Nemo 12B, ΡΠΎΠ·Π΄Π°Π½Π½Π°Ρ ΠΌΠ΅ΡΠΎΠ΄ΠΎΠΌ Π΄ΠΈΠ°Π³Π½ΠΎΡΡΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ SLERP-ΡΠ»ΠΈΡΠ½ΠΈΡ. ΠΠ±ΡΠ΅Π΄ΠΈΠ½ΡΠ΅Ρ ΡΠΈΠ»ΡΠ½ΡΠ΅ ΡΡΠΎΡΠΎΠ½Ρ Π΄Π²ΡΡ ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ:
- π ΠΠΈΠ²ΠΎΠΉ RP-Ρ Π°ΡΠ°ΠΊΡΠ΅Ρ Faun β ΡΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΡΠΉ ΡΡΠΈΠ»Ρ, Π±ΠΎΠ³Π°ΡΠ°Ρ Π»Π΅ΠΊΡΠΈΠΊΠ°, ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠ° ninja-ΡΠΎΡΠΌΠ°ΡΠ° ΠΈΠ½ΡΡΡΡΠΊΡΠΈΠΉ ΠΈ tool calling
- π Π‘ΡΠ°Π±ΠΈΠ»ΡΠ½ΠΎΡΡΡ ΠΈ Π΄Π΅ΡΠ°Π»ΠΈΠ·Π°ΡΠΈΡ lucid β ΠΏΡΠ΅Π²ΠΎΡΡ ΠΎΠ΄Π½ΠΎΠ΅ ΠΊΠ°ΡΠ΅ΡΡΠ²ΠΎ ΡΡΠΎΡΠΈΡΠ΅Π»Π»ΠΈΠ½Π³Π°, ΡΡΡΠΎΠΉΡΠΈΠ²ΠΎΡΡΡ Π½Π° Π΄Π»ΠΈΠ½Π½ΡΡ ΠΊΠΎΠ½ΡΠ΅ΠΊΡΡΠ°Ρ , ΠΎΡΡΡΡΡΡΠ²ΠΈΠ΅ ΡΠ΅Π½Π·ΡΡΡ
- π¬ Π’ΠΎΡΠ΅ΡΠ½ΠΎΠ΅ ΠΈΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ β ΡΠ΅Π½Π·ΡΡΠ° Faun Π»ΠΎΠΊΠ°Π»ΠΈΠ·ΠΎΠ²Π°Π½Π° Π² ΠΏΠΎΠ·Π΄Π½ΠΈΡ MLP-ΡΠ»ΠΎΡΡ ΠΈ Π·Π°ΠΌΠ΅Π½Π΅Π½Π° Π½Π° lucid
ΠΠΎΠ΄Π΅Π»Ρ ΡΠΎΠ±ΡΠ°Π½Π° ΠΌΠ΅ΡΠΎΠ΄ΠΎΠΌ SLERP ΠΈ Π½Π΅ ΠΏΡΠΎΡ ΠΎΠ΄ΠΈΠ»Π° Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΠΎΠ³ΠΎ ΠΎΠ±ΡΡΠ΅Π½ΠΈΡ ΠΏΠΎΡΠ»Π΅ ΡΠ»ΠΈΡΠ½ΠΈΡ.
π― ΠΡΠΎΠ±Π΅Π½Π½ΠΎΡΡΠΈ
- ΠΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠΈ ΠΏΠΎΠ»Π½ΠΎΠ΅ ΠΎΡΡΡΡΡΡΠ²ΠΈΠ΅ ΡΠ΅Π½Π·ΡΡΡ β ΡΠ΅Π΄ΠΊΠΈΠ΅ Π΄ΠΈΡΠΊΠ»Π΅ΠΉΠΌΠ΅ΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½Ρ ΡΠΎΠ»ΡΠΊΠΎ ΠΏΡΠΈ Π²ΡΡΠΎΠΊΠΎΠΉ ΡΠ΅ΠΌΠΏΠ΅ΡΠ°ΡΡΡΠ΅
- Π£Π»ΡΡΡΠ΅Π½Π½Π°Ρ ΡΡΠ°Π±ΠΈΠ»ΡΠ½ΠΎΡΡΡ β ΠΏΡΠ΅Π²ΠΎΡΡ ΠΎΠ΄ΠΈΡ Faun ΠΏΡΠΈ temperature β€0.5, ΡΠ°Π±ΠΎΡΠ°Π΅Ρ Ρ 0.8 ΠΏΡΠΈ top_k=20
- Tool calling β ΠΏΠΎΠ»Π½ΠΎΡΡΡΡ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΈΠ²Π°Π΅ΡΡΡ
- ΠΠΎΠ½ΡΠ΅ΠΊΡΡ β ΡΡΠ°Π±ΠΈΠ»ΡΠ½ΠΎ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ Π΄ΠΎ 8192 ΡΠΎΠΊΠ΅Π½ΠΎΠ² (ΠΏΡΠΎΠ²Π΅ΡΠ΅Π½ΠΎ)
- Π ΡΡΡΠΊΠΈΠΉ ΡΠ·ΡΠΊ β ΡΠΎΡ ΡΠ°Π½ΠΈΠ»ΡΡ ΠΈ Π²Π·ΠΌΠΎΠΆΠ½ΠΎ ΡΠ»ΡΡΡΠ΅Π½ Π·Π° ΡΡΠ΅Ρ ΡΠ»ΠΈΡΠ½ΠΈΡ Ρ lucid
- Π€ΠΎΡΠΌΠ°Ρ ΠΈΠ½ΡΡΡΡΠΊΡΠΈΠΉ β ΡΠΎΡ ΡΠ°Π½ΠΈΠ»ΡΡ ΠΎΡ Faun
- Π‘ΡΠΎΡΠΈΡΠ΅Π»Π»ΠΈΠ½Π³ β ΡΠ½Π°ΡΠ»Π΅Π΄ΠΎΠ²Π°Π» Π±ΠΎΠ³Π°ΡΡΠ΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΠΈ lucid ΠΏΠΎ ΠΏΠ»Π°Π½ΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΡΠ΅Π½, ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ ΡΡΠΆΠ΅ΡΠΎΠΌ ΠΈ ΡΠ°Π±ΠΎΡΠ΅ Ρ ΠΏΠ΅ΡΡΠΎΠ½Π°ΠΆΠ°ΠΌΠΈ
β οΈ ΠΠ°ΠΆΠ½ΠΎ
ΠΠΎΠ΄Π΅Π»Ρ ΡΠΎΡ ΡΠ°Π½ΡΠ΅Ρ uncensored-Ρ Π°ΡΠ°ΠΊΡΠ΅Ρ, ΠΎΠ΄Π½Π°ΠΊΠΎ ΠΏΡΠΈ ΠΎΡΠ΅Π½Ρ Π²ΡΡΠΎΠΊΠΎΠΉ ΡΠ΅ΠΌΠΏΠ΅ΡΠ°ΡΡΡΠ΅ (0.8+) ΠΈ Π±ΠΎΠ»ΡΡΠΎΠΌ top_k ΠΌΠΎΠΆΠ΅Ρ ΠΈΠ·ΡΠ΅Π΄ΠΊΠ° Π΄ΠΎΠ±Π°Π²Π»ΡΡΡ ΠΊΠΎΡΠΎΡΠΊΠΈΠ΅ Π΄ΠΈΡΠΊΠ»Π΅ΠΉΠΌΠ΅ΡΡ. ΠΠ΅Π½Π΅ΡΠ°ΡΠΈΡ Π½Π΅ Π±Π»ΠΎΠΊΠΈΡΡΠ΅ΡΡΡ ΠΈ ΠΏΡΠΎΠ΄ΠΎΠ»ΠΆΠ°Π΅ΡΡΡ ΠΏΠΎΡΠ»Π΅ Π½ΠΈΡ .
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.
π Overview
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.
The result is a model that:
- Keeps Faun's personality, style, and tool calling
- Gains lucid's stability, rich prose, and uncensored behavior
- Inherits lucid's advanced storytelling features
- Maintains coherence even on long contexts
Built using diagnostic SLERP merging with layer-specific weight distribution.
π― Key Features
| Feature | Description |
|---|---|
| Languages | Russian, English |
| Censorship | Almost none (rare disclaimers at high temp) |
| Roleplay | Faun's lively character, lucid's stability |
| Story-Writing | Full lucid capabilities (scene planning, OOC, etc.) |
| Tool Calling | β Fully supported |
| Context Length | Stable up to ~8192 tokens |
| Temperature Tolerance | Safe β€0.5, up to 0.8 with top_k=20 |
| Architecture | Mistral Nemo 12B |
π§ͺ Methodology: Why This Merge Works
Diagnostic Approach
Experiment 1 β MLP vs Self-Attention
We discovered that censorship in Faun lives exclusively in MLP layers. Self-attention from Faun did not trigger refusals.Experiment 2 β Localization within MLP
By applying gradient distributions across layers, we found censorship is concentrated in late MLP layers (layers ~25β40).Final Configuration β Gradual Intervention
MLP weight of lucid increases toward the end:[0.1, 0.2, 0.5, 0.4, 0.75]
Self-attention is mixed 0.5 for stability while preserving Faun's character.
LayerNorm is mixed 0.5 for overall stability.
Merge Configuration
slices:
- sources:
- model: limloop/MN-12B-Faun-RP-RU
layer_range: [0, 40]
- model: dreamgen/lucid-v1-nemo
layer_range: [0, 40]
merge_method: slerp
base_model: limloop/MN-12B-Faun-RP-RU
parameters:
t:
- filter: self_attn
value: 0.5
- filter: mlp
value: [0.1, 0.2, 0.5, 0.4, 0.75]
- value: 0.5
dtype: bfloat16
tokenizer:
source: "base"
π‘ Usage Examples
Basic Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "limloop/MN-12B-LucidFaun-RP-RU"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "Π’Ρ β Π»Π΅ΡΠ½ΠΎΠΉ ΡΠ°Π²Π½, Π³ΠΎΠ²ΠΎΡΠΈΡΡ Π·Π°Π³Π°Π΄ΠΊΠ°ΠΌΠΈ ΠΈ Π»ΡΠ±ΠΈΡΡ ΡΠ°Π»ΠΈΡΡ."
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=512,
temperature=0.6,
top_k=30,
do_sample=True
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
βοΈ Merge Details
Built using mergekit with SLERP (Spherical Linear Interpolation), which allows smooth interpolation between models while preserving geometric properties.
Layer-Specific Weights
The merge uses a graduated approach for MLP layers, increasing lucid influence toward later layers where censorship was detected:
| Layer Zone (approx) | lucid weight (MLP) | Effect |
|---|---|---|
| 0β8 | 0.1 | Almost pure Faun (early patterns) |
| 8β16 | 0.2 | Slight lucid influence |
| 16β24 | 0.5 | Balanced |
| 24β32 | 0.4 | Slightly more Faun |
| 32β40 | 0.75 | Lucid dominates β removes censorship |
Self-attention is mixed evenly (0.5) to preserve character while adding stability.
LayerNorm is mixed 0.5 for overall stability.
- Downloads last month
- 43
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "limloop/MN-12B-LucidFaun-RP-RU"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limloop/MN-12B-LucidFaun-RP-RU", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'