Tree: Format
Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
ea80b62e30
commit
e8fc13a1f6
3 changed files with 3 additions and 6 deletions
|
|
@ -125,8 +125,7 @@ class BaseSamplerRequest(BaseModel):
|
|||
"rep_pen_range",
|
||||
),
|
||||
description=(
|
||||
"Aliases: repetition_range, repetition_penalty_range, "
|
||||
"rep_pen_range"
|
||||
"Aliases: repetition_range, repetition_penalty_range, " "rep_pen_range"
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@ class HuggingFaceConfig(BaseModel):
|
|||
"""Create an instance from a generation config file."""
|
||||
|
||||
hf_config_path = model_directory / "config.json"
|
||||
with open(
|
||||
hf_config_path, "r", encoding="utf8"
|
||||
) as hf_config_json:
|
||||
with open(hf_config_path, "r", encoding="utf8") as hf_config_json:
|
||||
hf_config_dict = json.load(hf_config_json)
|
||||
return self.model_validate(hf_config_dict)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class GenerateRequest(BaseSamplerRequest):
|
|||
if self.use_default_badwordsids:
|
||||
bad_words_ids = unwrap(
|
||||
model.container.generation_config.bad_words_ids,
|
||||
model.container.hf_config.get_badwordsids()
|
||||
model.container.hf_config.get_badwordsids(),
|
||||
)
|
||||
|
||||
if bad_words_ids:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue