HaileyStorm commited on
Commit
5238925
·
verified ·
1 Parent(s): 7878a45

Update chess-gpt-eval-contrastive/mamba_module.py

Browse files
chess-gpt-eval-contrastive/mamba_module.py CHANGED
@@ -97,7 +97,8 @@ class MambaPlayer:
97
  self.move_num = 0
98
  self.hooks = []
99
  self.max_seq_len = 1536
100
- self.move_buckets = [10, 20, 30, 40, float('inf')]
 
101
 
102
  if update_contrastive or update_linear:
103
  self.activations_sum = {}
@@ -329,7 +330,8 @@ class MambaPlayer:
329
  self.linear_optimizers[layer_idx][probe_type].zero_grad()
330
  loss.backward()
331
  self.linear_optimizers[layer_idx][probe_type].step()
332
- wandb.log({f"{probe_type}/layer_{layer_idx}_{bucket}_loss": loss.item()})
 
333
 
334
  # Reset linear_probe_targets after training
335
  self.linear_probe_targets = {i: {bucket: {'q_value': [], 'q_value_delta': [], 'material_balance': []} for bucket in self.move_buckets} for i in self.linear_probes}
 
97
  self.move_num = 0
98
  self.hooks = []
99
  self.max_seq_len = 1536
100
+ #self.move_buckets = [10, 20, 30, 40, float('inf')]
101
+ self.move_buckets = [float('inf')]
102
 
103
  if update_contrastive or update_linear:
104
  self.activations_sum = {}
 
330
  self.linear_optimizers[layer_idx][probe_type].zero_grad()
331
  loss.backward()
332
  self.linear_optimizers[layer_idx][probe_type].step()
333
+ #wandb.log({f"{probe_type}/layer_{layer_idx}_{bucket}_loss": loss.item()})
334
+ wandb.log({f"{probe_type}/layer_{layer_idx}_loss": loss.item()})
335
 
336
  # Reset linear_probe_targets after training
337
  self.linear_probe_targets = {i: {bucket: {'q_value': [], 'q_value_delta': [], 'material_balance': []} for bucket in self.move_buckets} for i in self.linear_probes}