Instructions to use Maxlegrec/ChessLC0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maxlegrec/ChessLC0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Maxlegrec/ChessLC0", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Maxlegrec/ChessLC0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -44,7 +44,7 @@ move_history = [
|
|
| 44 |
]
|
| 45 |
|
| 46 |
# Sample move from policy
|
| 47 |
-
move = model.
|
| 48 |
print(f"Policy-based move: {move}")
|
| 49 |
|
| 50 |
# Get the best move using value analysis
|
|
@@ -57,7 +57,7 @@ position_value = model.get_position_value(move_history, device=device)
|
|
| 57 |
print(f"Position value [black_win, draw, white_win]: {position_value}")
|
| 58 |
|
| 59 |
# Get move probabilities
|
| 60 |
-
probs = model.
|
| 61 |
top_moves = sorted(probs.items(), key=lambda x: x[1], reverse=True)[:5]
|
| 62 |
print("Top 5 moves:")
|
| 63 |
for move, prob in top_moves:
|
|
|
|
| 44 |
]
|
| 45 |
|
| 46 |
# Sample move from policy
|
| 47 |
+
move = model.get_move_from_history(move_history, T=0.1, device=device)
|
| 48 |
print(f"Policy-based move: {move}")
|
| 49 |
|
| 50 |
# Get the best move using value analysis
|
|
|
|
| 57 |
print(f"Position value [black_win, draw, white_win]: {position_value}")
|
| 58 |
|
| 59 |
# Get move probabilities
|
| 60 |
+
probs = model.get_move_from_history(move_history, T=1, device=device, return_probs=True)
|
| 61 |
top_moves = sorted(probs.items(), key=lambda x: x[1], reverse=True)[:5]
|
| 62 |
print("Top 5 moves:")
|
| 63 |
for move, prob in top_moves:
|