Neutralize samplers (#59)

* Update sample_preset.yml

Neutralized the samplers.

* Sampling: Fix dynatemp defaults

Default max temp and min temp is 1.0

* Sampling: Fix TFS defaults

Default is 1.0

---------

Co-authored-by: AliCat <86847834+alicat22@users.noreply.github.com>
Co-authored-by: kingbri <bdashore3@proton.me>
This commit is contained in:
AliCat
2024-02-07 22:23:09 -07:00
committed by GitHub
parent 321c9a1ea9
commit bb48f77ca1
3 changed files with 10 additions and 10 deletions

View File

@@ -558,8 +558,8 @@ class ExllamaV2Container:
gen_settings.mirostat = unwrap(kwargs.get("mirostat"), False)
# DynaTemp settings
max_temp = unwrap(kwargs.get("max_temp"), 0.0)
min_temp = unwrap(kwargs.get("min_temp"), 0.0)
max_temp = unwrap(kwargs.get("max_temp"), 1.0)
min_temp = unwrap(kwargs.get("min_temp"), 1.0)
if max_temp > min_temp:
gen_settings.max_temp = max_temp
@@ -574,7 +574,7 @@ class ExllamaV2Container:
# Warn if max/min temp values are > 0
# and if they're less than or equal to each other
if max_temp < min_temp or (
0 not in {min_temp, max_temp} and max_temp == min_temp
1 not in {min_temp, max_temp} and max_temp == min_temp
):
logger.warning(
"Max temp is less than or equal to min temp, skipping DynaTemp."

View File

@@ -64,7 +64,7 @@ class BaseSamplerRequest(BaseModel):
)
tfs: Optional[float] = Field(
default_factory=lambda: get_default_sampler_value("tfs", 0.0)
default_factory=lambda: get_default_sampler_value("tfs", 1.0)
)
frequency_penalty: Optional[float] = Field(
@@ -142,13 +142,13 @@ class BaseSamplerRequest(BaseModel):
)
max_temp: Optional[float] = Field(
default_factory=lambda: get_default_sampler_value("max_temp", 0.0),
default_factory=lambda: get_default_sampler_value("max_temp", 1.0),
validation_alias=AliasChoices("max_temp", "dynatemp_high"),
description="Aliases: dynatemp_high",
)
min_temp: Optional[float] = Field(
default_factory=lambda: get_default_sampler_value("min_temp", 0.0),
default_factory=lambda: get_default_sampler_value("min_temp", 1.0),
validation_alias=AliasChoices("min_temp", "dynatemp_low"),
description="Aliases: dynatemp_low",
)

View File

@@ -31,13 +31,13 @@ temperature_last:
override: false
force: false
min_temp:
override: 0.0
override: 1.0
force: false
max_temp:
override: 0.0
override: 1.0
force: false
temp_exponent:
override: 0.0
override: 1.0
force: false
smoothing_factor:
override: 0.0
@@ -57,7 +57,7 @@ min_p:
override: 0.0
force: false
tfs:
override: 0.0
override: 1.0
force: false
typical:
override: 1.0