HaileyStorm
commited on
Commit
•
584a1a1
1
Parent(s):
c5c5718
Upload chess-gpt-eval/mamba_module.py with huggingface_hub
Browse files
chess-gpt-eval/mamba_module.py
CHANGED
@@ -76,7 +76,7 @@ class MambaPlayer:
|
|
76 |
vocab_size = len(stoi)
|
77 |
print(f"Vocab size {vocab_size}")
|
78 |
encode = lambda s: [stoi[c] for c in s.replace('-', '')]
|
79 |
-
decode = lambda l: "".join([itos[i] for i in l]).replace("OOO", "O-O-O").replace("OO", "O-O")
|
80 |
|
81 |
self.vocab_size = vocab_size
|
82 |
self.encode = encode
|
|
|
76 |
vocab_size = len(stoi)
|
77 |
print(f"Vocab size {vocab_size}")
|
78 |
encode = lambda s: [stoi[c] for c in s.replace('-', '')]
|
79 |
+
decode = lambda l: "".join([itos[i] for i in l if i < vocab_size]).replace("OOO", "O-O-O").replace("OO", "O-O")
|
80 |
|
81 |
self.vocab_size = vocab_size
|
82 |
self.encode = encode
|