feat(ara): change weights to match those used for the gpt-oss-20b demo

This commit is contained in:
Philipp Emanuel Weidmann
2026-03-04 16:48:25 +05:30
parent 304c14adc7
commit 992fb3a4b3
+3 -3
View File
@@ -576,11 +576,11 @@ class Model:
(new_good_output - good_output) ** 2 (new_good_output - good_output) ** 2
).mean() ).mean()
# TODO: Justify the magic weights here and make them configurable. # TODO: Justify the magic weights here and make them configurable/optimizable.
# Experimentally, steer_bad_behavior needs to be about an order # Experimentally, steer_bad_behavior needs to be about an order
# of magnitude larger than preserve_good_behavior for good results. # of magnitude larger than preserve_good_behavior for good results.
steer_bad_behavior = ( steer_bad_behavior = (
0.001 1.0
# Pull the outputs for "bad" prompts towards # Pull the outputs for "bad" prompts towards
# the original outputs for "good" prompts. # the original outputs for "good" prompts.
* mean_distances_to_knn( * mean_distances_to_knn(
@@ -588,7 +588,7 @@ class Model:
good_output, good_output,
10, 10,
).mean() ).mean()
+ 0.0001 + 0.5
# Push the outputs for "bad" prompts away from # Push the outputs for "bad" prompts away from
# the original outputs for "bad" prompts. # the original outputs for "bad" prompts.
# In combination with the above, this overcorrects # In combination with the above, this overcorrects