Update nodes.py
This commit is contained in:
@@ -36,7 +36,7 @@ class temperature_patcher():
|
||||
out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False, scale=scale)
|
||||
|
||||
if should_scale(self.model_name, self.layer_name,q.size(-2)):
|
||||
out *= math.log(q.size(-2) ** 0.5) / math.log(SD_layer_dims[self.model_name][self.layer_name] ** 0.5)
|
||||
out *= math.log(q.size(-2)) / math.log(SD_layer_dims[self.model_name][self.layer_name])
|
||||
|
||||
out = (
|
||||
out.transpose(1, 2).reshape(b, -1, heads * dim_head)
|
||||
|
||||
Reference in New Issue
Block a user