Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/python/py/models/builders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def make_genai_config(self, model_name_or_path, extra_kwargs, out_dir):
}
for key, default_val in defaults.items():
val = getattr(gen_config, key)
if val != default_val:
if val is not None and val != default_val:
setattr(config, key, getattr(gen_config, key))
except:
pass
Expand Down Expand Up @@ -623,8 +623,8 @@ def make_genai_config(self, model_name_or_path, extra_kwargs, out_dir):
else self.past_present_share_buffer,
"repetition_penalty": config.repetition_penalty if hasattr(config, "repetition_penalty") else 1.0,
"temperature": config.temperature if hasattr(config, "temperature") else 1.0,
"top_k": config.top_k if hasattr(config, "top_k") else 50,
"top_p": config.top_p if hasattr(config, "top_p") else 1.0,
"top_k": config.top_k if hasattr(config, "top_k") and config.top_k is not None else 50,
Comment thread
baijumeswani marked this conversation as resolved.
"top_p": config.top_p if hasattr(config, "top_p") and config.top_p is not None else 1.0,
Comment thread
baijumeswani marked this conversation as resolved.
},
}

Expand Down
Loading