Instructions to use Maxlegrec/ChessBot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maxlegrec/ChessBot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Maxlegrec/ChessBot", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Maxlegrec/ChessBot", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_chessbot.py
Browse files- modeling_chessbot.py +1 -1
modeling_chessbot.py
CHANGED
|
@@ -631,7 +631,7 @@ class ChessBotModel(ChessBotPreTrainedModel):
|
|
| 631 |
# Map to legal moves
|
| 632 |
legal_move_probs = {}
|
| 633 |
for move in legal_moves:
|
| 634 |
-
idx = policy_index.index(
|
| 635 |
legal_move_probs[move] = probs[idx].item()
|
| 636 |
|
| 637 |
# Select move based on probabilities
|
|
|
|
| 631 |
# Map to legal moves
|
| 632 |
legal_move_probs = {}
|
| 633 |
for move in legal_moves:
|
| 634 |
+
idx = policy_index.index(move)
|
| 635 |
legal_move_probs[move] = probs[idx].item()
|
| 636 |
|
| 637 |
# Select move based on probabilities
|