HaileyStorm commited on
Commit
0fbfa94
·
verified ·
1 Parent(s): 6b2d08d

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

Browse files
chess-gpt-eval-contrastive/mamba_module.py CHANGED
@@ -126,7 +126,7 @@ class MambaPlayer:
126
  tensor_output = output
127
  seq_len = tensor_output.shape[1]
128
  bucket = next(b for b in self.move_buckets if self.move_num <= b)
129
- self.activations_sum[layer_idx][bucket]["current"][:, :8, :] += tensor_output.detach().cpu().numpy()[:, :self.seq_len, :][:, -8:, :]
130
  self.activations_count[layer_idx][bucket]["current"] += 1
131
 
132
  self.hooks.append(layer.register_forward_hook(hook))
@@ -323,9 +323,9 @@ class MambaPlayer:
323
 
324
  def train_linear_probes(self):
325
  def get_lr(it):
326
- warmup_iters = 300 * 43
327
  lr_decay_iters = 5000 * 43
328
- learning_rate = 0.0003
329
  min_lr = 0.00001
330
  # 1) linear warmup for warmup_iters steps
331
  if it < warmup_iters:
 
126
  tensor_output = output
127
  seq_len = tensor_output.shape[1]
128
  bucket = next(b for b in self.move_buckets if self.move_num <= b)
129
+ self.activations_sum[layer_idx][bucket]["current"][:, :8, :] += tensor_output.detach().cpu().numpy()[:, :max(self.seq_len, 8), :][:, -8:, :]
130
  self.activations_count[layer_idx][bucket]["current"] += 1
131
 
132
  self.hooks.append(layer.register_forward_hook(hook))
 
323
 
324
  def train_linear_probes(self):
325
  def get_lr(it):
326
+ warmup_iters = 0 #300 * 43
327
  lr_decay_iters = 5000 * 43
328
+ learning_rate = 0.000265
329
  min_lr = 0.00001
330
  # 1) linear warmup for warmup_iters steps
331
  if it < warmup_iters: