mirror of
https://github.com/p-e-w/heretic.git
synced 2026-09-17 17:46:06 -07:00
feat: print PyTorch config when running tests
This commit is contained in:
@@ -71,6 +71,9 @@ chain_of_thought_skips = [
|
||||
# Whether to print prompt/response pairs when counting refusals.
|
||||
print_responses = false
|
||||
|
||||
# Whether to print additional information that can help with debugging.
|
||||
print_debug_information = false
|
||||
|
||||
# Whether to print detailed information about residuals and refusal directions.
|
||||
print_residual_geometry = false
|
||||
|
||||
|
||||
@@ -252,6 +252,12 @@ class Settings(BaseSettings):
|
||||
exclude=True,
|
||||
)
|
||||
|
||||
print_debug_information: bool = Field(
|
||||
default=False,
|
||||
description="Whether to print additional information that can help with debugging.",
|
||||
exclude=True,
|
||||
)
|
||||
|
||||
print_residual_geometry: bool = Field(
|
||||
default=False,
|
||||
description="Whether to print detailed information about residuals and refusal directions.",
|
||||
|
||||
@@ -268,6 +268,10 @@ def run():
|
||||
|
||||
print(get_accelerator_info())
|
||||
|
||||
if settings.print_debug_information:
|
||||
print()
|
||||
print(torch.__config__.show().strip())
|
||||
|
||||
# We don't need gradients as we only do inference.
|
||||
torch.set_grad_enabled(False)
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
model = "tiny-random/mistral-3"
|
||||
model_commit = "931aa2e5c9668fc3679e56aa44972fe18597d55d"
|
||||
|
||||
seed = 12345
|
||||
print_debug_information = true
|
||||
|
||||
batch_size = 2
|
||||
max_response_length = 10
|
||||
kl_divergence_target = 0
|
||||
n_trials = 2
|
||||
n_startup_trials = 1
|
||||
|
||||
seed = 12345
|
||||
|
||||
export_strategy = "merge"
|
||||
checkpoint_action = "restart"
|
||||
trial_index = 0
|
||||
|
||||
Reference in New Issue
Block a user