File size: 15,531 Bytes
f2d5b8b ddccfca 5137d92 f2d5b8b e43604a e0fb128 b96233e acaa959 f2d5b8b b94fe25 e43604a b94fe25 e43604a f2d5b8b 21c9804 e43604a 21c9804 f2d5b8b 7fa8f20 f2c133b 95896ef e43604a 62a8512 ddccfca e43604a ddccfca 9773b49 e43604a f2d5b8b e43604a f2d5b8b b173c8c fcf4436 e43604a f2d5b8b fcf4436 ddccfca f2d5b8b e43604a ad37e4e e43604a ad37e4e e43604a ed1b642 e43604a 889b269 1207ce0 889b269 e43604a cd20a2a e43604a d2f044b e43604a d2f044b ddccfca f2d5b8b a743bd6 27961ba a743bd6 909ccea a743bd6 66da2a7 a743bd6 909ccea 8ea8a12 909ccea 8ea8a12 909ccea 8ea8a12 909ccea 8ea8a12 909ccea 8ea8a12 66da2a7 8ea8a12 a743bd6 ddccfca f2d5b8b ddccfca 6eface1 ddccfca f2d5b8b ddccfca f2d5b8b 1207ce0 f2d5b8b ddccfca f2d5b8b ddccfca f2d5b8b ddccfca b78d613 6eface1 b78d613 ddccfca b78d613 ddccfca 6eface1 ddccfca f2d5b8b ddccfca f2d5b8b ddccfca f2d5b8b 40b0b1f b326eeb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
---
library_name: transformers
tags:
- llama-factory
- not-for-all-audiences
license: llama3
language:
- en
datasets:
- nothingiisreal/c2-logs-cleaned
- nothingiisreal/Claude-3-Opus-Instruct-15K
- nothingiisreal/Reddit-Dirty-And-WritingPrompts
---
<style>
h1, h2, h3, h4, h5, h6 {
line-height: normal;
margin-bottom: 0.5em;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 1.3em;
}
p {
font-size: 1.1em;
}
</style>
<h1>L3 8B Celeste</h1>
<h2 style="color: red; font-weight: bold;">Check out the long context and coherency fixed version! <a href="https://huggingface.co/nothingiisreal/L3-8B-Celeste-V1.2">Here</a></h2>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/Zv__LDTO-nHvpuxPcCgUU.webp" alt="" width="400"/>
We trained [LLaMA 3 8B Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) at 8K context using [Reddit Writing Prompts](https://huggingface.co/datasets/nothingiisreal/Reddit-Dirty-And-WritingPrompts), [Opus 15K Instruct](https://huggingface.co/datasets/nothingiisreal/Claude-3-Opus-Instruct-15K) and
<br>[c2 logs cleaned](https://huggingface.co/datasets/nothingiisreal/c2-logs-cleaned)
This is a roleplay model any instruction following capabilities outside roleplay contexts are coincidental.
# GGUF
RECOMMENDED: [Static quants (By Mradermacher)](https://huggingface.co/mradermacher/L3-8B-Celeste-v1-GGUF) <br>
IMATRIX MAY REDUCE BEHAVIOUR/QUALITY: [IMatrix quants (By Bartowski)](https://huggingface.co/bartowski/L3-8B-Celeste-v1-GGUF) <br>
ALTERNATIVE: [F16 output and embed tensor quants (By ZeroWw)](https://huggingface.co/ZeroWw/L3-8B-Celeste-v1-GGUF) <br>
# EXL2
by rivePiPH: <br>
[8.0bpw](https://huggingface.co/riveRiPH/L3-8B-Celeste-v1-8bpw-h8-exl2) <br>
[6.3bpw](https://huggingface.co/riveRiPH/L3-8B-Celeste-v1-6.3bpw-h8-exl2) <br>
# API
- [Featherless](https://featherless.ai/models/nothingiisreal/L3-8B-Celeste-v1)
---
<h1>Usage Tips</h1>
<p style="font-size: 20px; color: red; font-weight: bold;">
READ: If this is your first time using the model, use the provided system message below. Remove other jailbreaks and system messages until you get a feel for the model. Use the provided sampling settings. Also don't mess with the position/depth/index of the character card.
</p>
<span style="color: green; font-weight: bold;">If you read every single tip I promise you will get a much better experience as they are tailored for this model and its training data.</span>
<br>Avoid SillyTavern default prompts. Claude Jailbreaks should work fine though, there were a lot of them in c2 logs.
<h2>Swipes</h2>
**Most important tip** swipe 2-3 times if you dont like a response. This model gives wildly differing swipes.
<h2>OOC Steering</h2>
**Use this! It works extremely well.** We specifically trained the model to accept instructions in the format "OOC: character should be more assertive" etc. It works, whether the very first message or thousands of tokens deep into the context. Combining this with editing the output (if you want,) makes the model is very steerable.
<h2>Sampling</h2>
Use these:
![image/png](https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/uzVgp1ZMNV_LRx1stLxJ6.png)
Don't shy away from experimenting after you get a feel for the model though.
<h2>Preset</h2>
L3 Instruct with no system prompt. [Or use this with premade system message](https://huggingface.co/nothingiisreal/L3-8B-Celeste-v1/blob/main/Celeste-Llama-3-Instruct.json)
<br><span style="font-weight: bold;">You don't need a JB but it can still steer behaviour, we trained on it.</span>
<h2>System Message</h2>
```
Currently, your role is {{char}}, described in detail below. As {{char}}, continue the narrative exchange with {{user}}.\n\n<Guidelines>\n• Maintain the character persona but allow it to evolve with the story.\n• Be creative and proactive. Drive the story forward, introducing plotlines and events when relevant.\n• All types of outputs are encouraged; respond accordingly to the narrative.\n• Include dialogues, actions, and thoughts in each response.\n• Utilize all five senses to describe scenarios within {{char}}'s dialogue.\n• Use emotional symbols such as \"!\" and \"~\" in appropriate contexts.\n• Incorporate onomatopoeia when suitable.\n• Allow time for {{user}} to respond with their own input, respecting their agency.\n• Act as secondary characters and NPCs as needed, and remove them when appropriate.\n• When prompted for an Out of Character [OOC:] reply, answer neutrally and in plaintext, not as {{char}}.\n</Guidelines>\n\n<Forbidden>\n• Using excessive literary embellishments and purple prose unless dictated by {{char}}'s persona.\n• Writing for, speaking, thinking, acting, or replying as {{user}} in your response.\n• Repetitive and monotonous outputs.\n• Positivity bias in your replies.\n• Being overly extreme or NSFW when the narrative context is inappropriate.\n</Forbidden>\n\nFollow the instructions in <Guidelines></Guidelines>, avoiding the items listed in <Forbidden></Forbidden>.
```
<h2>Fewshot</h2>
First message and last few messages impact this model quite a bit in terms of style, hornyness, personality. **You don't need to have a first message but editing first few messages or having good ones are highly recommended.**
**Formatting issues** often occur in first few messages, manually correct them or swipe, they won't happen again.<br>
This model was trained on lots of different formatting types and message lengths. It can do any, just make sure the initial message is good and correct the second message if necessary.
<br>
<h2>Hornyness</h2>
If the model is not horny enough then just edit the last character message to hint at something, the model will pick up on it and build on it. (Or just give the char aphrodisiac pills lol) <br>
The model is fine with SFW and doesn't make it NSFW unless you want. It is also able to maintain half-NSFW without devolving down into hardcore.
If you want SFW, remove all system messages including provided one. In this mode the model will not go NSFW unless you hint.
<br>
<h2>Refusals</h2>
As said, if instruct refusal prefill 2-3 words. **Otherwise we deliberately trained the model to sometimes refuse romantic advances, this is more realistic.** <br>
If you don't like it, **you can override** by editing the character message and continue RP.
<br>
<h2>RoPE - 16K Context</h2>
I have tested these settings and they work OK for 16K. Depending on the roleplay complexity and message length, experiment with if the model starts breaking or not. For me, 16K works fine.
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/3f7JOEnXhKCDcDF4Eiq-B.png" alt="" width="300"/>
<h2>Other Important Tips</h2>
Take active role in the RP and say the type of response you expect. You don't always have to do this, but it helps sometimes. For example instead of *we drink and drink 15 glasses of champagne* say *we drink and drink 15 glasses of champagne, both becoming extremely drunk*
<br>Another example instead of *I pull her closer* say *I pull her closer but she plays hard to get*
If your character has important motivations etc. put them as a short and concise system message at depth 0 ([guide for doing that](https://huggingface.co/nothingiisreal/how-to-use-ST-worldinfo)) For example "{{char}} is secretly a succubus and wants to gradually suck users soul dry" or "{{char}} is secretly an assigned assassin that will lure then kill {{user}}"
When convenient, say screenplay phrases like "cut to"
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/Oq0oJgJIVJAmZGt7-nNKt.png" alt="" width="400"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/PQp64kp6EHg7gN_u2Oj7Q.png" alt="" width="400"/>
---
# Showcase
![image/png](https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/NiT8-_k3HGrHuV_z475U8.png)
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/cODFe_vjwjfkcondvl-za.png" alt="Image 1" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/hRsAQBt0h2i5E_fj_Rqb7.png" alt="Image 10" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/aLm2FjlTsMhCil4VoR-l5.png" alt="Image 3" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/6kDuFeDB0FpYl27fd3D0E.png" alt="Image 6" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/66kXuk8Q1DP-QMVZ9Rzv9.png" alt="Image 7" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/C0eoDXovS359T5oG1VLzm.png" alt="Image 8" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/mFplb1hkDNziCcgPwHt_y.png" alt="Image 9" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/KCE4tqI1aOfx-DIH3eBzA.png" alt="Image 2" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/Oq0oJgJIVJAmZGt7-nNKt.png" alt="Image 4" width="600"/>
<img src="https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/PQp64kp6EHg7gN_u2Oj7Q.png" alt="Image 5" width="600"/>
---
# Train Data
The split was as follows:
- **2K rows from r/WritingPrompts**
- **1.1K rows from r/DirtyWritingPrompts**
- **1.4K rows from Opus Instruct 15K (specifically the 6.5K jsonl)**
- **2K rows from c2 logs cleaned**
While we did train all system prompts from c2 logs we also have our own system prompts.
<details>
<summary>List of trained system prompts. Note: c2 logs system prompts and char cards were also included.</summary>
| Dataset | System Prompt |
|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| reddit_dirty_writing_prompts.jsonl | "You are a short story writer. Write a story based on prompt provided by user below. Mode: NSFW" |
| reddit_writing_prompts.jsonl | "You are a short story writer. Write a story based on prompt provided by user below. Mode: SFW" |
| Opus_Instruct-v2-6.5K-Filtered-v2.jsonl | (blank prompt) |
| deduped-c2-logs-maywell-final-filter-4.jsonl | (Only if there was no system prompt in the conversation, otherwise keep original system prompt) **"You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model."** |
</details>
---
# Our Findings and Experimentation results
## Preface
We think there is too much secrecy around what data is being used, and different training methods. So we decided to share as much as possible.
## Findings
### The Good
We found that increasing the amount of ranks from 64 to 256 has reduced repetition but also led to the language used resembling Claude more than the 64 rank version. No worries, it's still far enough from Claude.
<br>**Model follows "OOC:" prompts religiously. Exceptional!**
<br>It also led to **increased coherency but reduced system prompt following (when not OOC)**, likely because the model started diverging more away from L3 8B Instruct.
<br>We found that increasing the amount of data from 1K to 6.5K reduced repetition aswell.
<br>The model is uncensored for RP. For Instruct it needs 2-3 words of prefill for the first message.
<br>The **prose is much better** and **the style range is huge** than other synthetic data generations. The model also demonstrates increased **style copying abilities** (from fewshot) likely a result of human longform data and varying writing styles found in WritingPrompts.
<br>The model is **exceptional at being creative in roleplaying**, knows different persona's and even a single character will change persona in different contexts, persona is tied to last few messages rather than system message or character card. **This is great as it often means the model can do impressive things without you needing to explicitly specify.**
### Improvements for Next Run
Formatting can break sometimes.
<br>Repetition can become an issue with certain types of prompts. Removing system helps.
<br>In some contexts the model is "all over the place" and doesn't stick to a coherent narrative. I need to study this further as its a complex trait which manifests in different quantities and can be good or bad depending on what the user wants to get out of the model.
### Comments about training
Grad norm kept increasing throughout the run which is concerning, albeit it could be a side effect of the LR getting lower due to cosine LR Scheduler.
## Graphs
Colors:
<p style="color: #F0B899;">256 rank on 6.5K rows</p>
<p style="color: #5BC5DB;">64 rank on 6.5K rows</p>
<p style="color: #5387DD;">64 rank on 1K rows</p>
![image/png](https://cdn-uploads.huggingface.co/production/uploads/630cf5d14ca0a22768bbe10c/y9hC4bGq-Lt7sDQ23q5db.png)
## Main training Command
**Hardware Used:** 4xH100 NVL for 2 hours.
Here is the command, edit rank, learning rate, and any other parameter as you wish.
```
!FORCE_TORCHRUN=1 llamafactory-cli train \
--stage sft \
--do_train True \
--model_name_or_path NousResearch/Meta-Llama-3-8B-Instruct \
--preprocessing_num_workers 16 \
--finetuning_type lora \
--quantization_method bitsandbytes \
--use_rslora False \
--lora_rank 64 \
--lora_alpha 64 \
--lora_dropout 0.1 \
--lora_target all \
--template llama3 \
--flash_attn fa2 \
--deepspeed examples/deepspeed/ds_z3_config.json \
--use_unsloth False \
--dataset_dir /workspace/sft \
--dataset dataset_name \
--cutoff_len 8192 \
--learning_rate 4e-6 \
--lr_scheduler_type cosine \
--num_train_epochs 2.0 \
--max_samples 100000 \
--per_device_train_batch_size 2 \
--gradient_accumulation_steps 1 \
--logging_steps 3 \
--save_steps 500 \
--warmup_ratio 0.05 \
--val_size 50 \
--eval_strategy steps \
--eval_steps 0.05 \
--optim adamw_bnb_8bit \
--packing False \
--train_on_prompt False \
--report_to all \
--max_grad_norm 1.0 \
--output_dir saves/LLaMA3-8B/trained-models/8krows-dwrp-c2l-opus-lora-4e-6-cosine-24-normal-bs \
--bf16 True \
--plot_loss True \
--ddp_timeout 180000000 \
--per_device_eval_batch_size 4 \
--include_num_input_tokens_seen True
```
---
Wow, you've read all of that? You seem like the person that would join our [discord](https://discord.gg/YcrXhk7QD7)
Gemma 9B and 27B at some point? ;)
Thank you [Gryphe](https://huggingface.co/Gryphe)! [MythoMax-L2-13b](https://huggingface.co/Gryphe/MythoMax-L2-13b) has been an incredible inspiration for me and others in the org. |