Fix: model.layers instead of model.model.layers (validated working)
Browse files
README.md
CHANGED
|
@@ -130,7 +130,7 @@ model = AutoModel.from_pretrained("faisalmumtaz/codecompass-embed", trust_remote
|
|
| 130 |
tokenizer = AutoTokenizer.from_pretrained("faisalmumtaz/codecompass-embed")
|
| 131 |
|
| 132 |
# CRITICAL: Enable bidirectional attention for embeddings
|
| 133 |
-
for layer in model.
|
| 134 |
layer.self_attn.is_causal = False
|
| 135 |
|
| 136 |
model.eval()
|
|
|
|
| 130 |
tokenizer = AutoTokenizer.from_pretrained("faisalmumtaz/codecompass-embed")
|
| 131 |
|
| 132 |
# CRITICAL: Enable bidirectional attention for embeddings
|
| 133 |
+
for layer in model.layers:
|
| 134 |
layer.self_attn.is_causal = False
|
| 135 |
|
| 136 |
model.eval()
|