How They Use AI  |  Newest

<< Home  |  Prompting craft

Eliminate idle looping and preserve roleplay creativity at 50K context

AreaPrompting craft
AI usedLlama 3.1
SourceReddit thread
Posted2024-08-03

The move

Disable top-P and top-K, set min-P to 0.05, low repetition penalty to 1.02, and apply DRY sampling.
When this worksWhen it doesn't
Llama 3.1 outputs repetitive text or loses role clarity during roleplay, especially when running context sizes around 50K.DRY evaluates over full context and causes the model to invent typos to bypass penalties, or min-P is dropped to 0.02 which hurts creativity.

Key details

Prompt for your AI

Configure model samplers using the following rules for Llama 3.1 generation: 1. Disable traditional truncation samplers: Turn off top-P and top-K sampling entirely to prevent unnecessary distortion of the initial probability distribution. 2. Primary sampler settings: Set temperature to 1.0 (or 1.10+ for roleplay). Set min-P to 0.05 (valid range: 0.05 to 0.1). Set repetition penalty to a very low threshold, ideally around 1.02 (up to 1.05-1.1). 3. DRY (Don't Repeat Yourself) sampler settings: Set multiplier = 0.8 Set base = 1.75 Set allowed length = 2 4. Operational principles: Leave very short sequences untouched (allowed length of 2) to prevent clobbering natural language quality and model intelligence. Smoothly and exponentially increase penalty as repetition sequence length grows. Discourage idle looping while continuing to permit necessary repetitions mandated by the prompt context. Before you give me the final result, check with me: - Top-P and top-K sampling are fully turned off. - Min-P is set between 0.05 and 0.1, not lowered to 0.02. - DRY allowed length is set to 2 so short sequences remain untouched. - Repetition penalty is kept low around 1.02 rather than default high values.

What happened

A user experienced idle repetition during Llama 3.1 roleplay at 50K context size using default samplers. Disabling top-P/top-K while enabling min-P at 0.05 and DRY (multiplier 0.8, base 1.75, allowed length 2) eliminated repetition. The model maintained intelligence, coherence, and role clarity without degrading response quality.

Who confirmed it

The model maintains its intelligence and clarity about its role, which represents a significant improvement over the default settings.

Give it to your agent

Read https://howtheyuse.ai/p/reduce-repetition-while-maintaining-creative-output.md and help me do this.

Sources



Last updated November 26, 2026.