DryBase

DryBase is the exponent base of the DRY penalty growth formula. It determines how quickly the penalty ramps up as a repeated phrase extends. DryBase only has effect when DryMultiplier is enabled (positive).

Quick reference

Type float
Default 1.75
Range > 1.0; typical 1.52.5
Category Phrase-level repetition penalty
Field on SamplerParameters.DryBase

What it does

The DRY penalty applied to a token that would extend a repeated match is:

penalty = DryMultiplier × DryBase^(match_length - DryAllowedLength)

Larger DryBase means the penalty grows faster. A 5-token match with DryBase = 1.75 produces 1.75^5 ≈ 16 multiplied by DryMultiplier; at DryBase = 2.5 the same match yields 2.5^5 ≈ 98.

  • DryBase = 1.5 — gentle growth; long repeats punished but not extremely.
  • DryBase = 1.75 (default) — balanced; the value recommended by the original DRY paper.
  • DryBase = 2.0+ — rapid growth; even medium-length repeats are heavily penalized.

When to change it

Scenario Value
Default 1.75
Gentle phrase anti-repetition 1.5
Aggressive (model keeps finding ways to repeat) 2.02.5

Most workloads leave DryBase alone and tune DryMultiplier and DryAllowedLength. Change DryBase as a last resort if the standard combination does not stop repeats.

Example

var preset = new Qwen25Preset();
preset.SamplerParameters.DryMultiplier = 0.8f;
preset.SamplerParameters.DryBase = 2.0f;    // faster growth
preset.SamplerParameters.DryAllowedLength = 2;

using var api = AsposeLLMApi.Create(preset);

Interactions

What’s next