Instructions to use Leon-LLM/Leon-Chess-1M-BOS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Leon-LLM/Leon-Chess-1M-BOS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Leon-LLM/Leon-Chess-1M-BOS")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Leon-LLM/Leon-Chess-1M-BOS") model = AutoModelForCausalLM.from_pretrained("Leon-LLM/Leon-Chess-1M-BOS") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Leon-LLM/Leon-Chess-1M-BOS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Leon-LLM/Leon-Chess-1M-BOS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Leon-LLM/Leon-Chess-1M-BOS", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Leon-LLM/Leon-Chess-1M-BOS
- SGLang
How to use Leon-LLM/Leon-Chess-1M-BOS with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Leon-LLM/Leon-Chess-1M-BOS" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Leon-LLM/Leon-Chess-1M-BOS", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Leon-LLM/Leon-Chess-1M-BOS" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Leon-LLM/Leon-Chess-1M-BOS", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Leon-LLM/Leon-Chess-1M-BOS with Docker Model Runner:
docker model run hf.co/Leon-LLM/Leon-Chess-1M-BOS
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,10 +53,10 @@ Chess games from Lichess were converted from PGN into [xLAN](https://github.zhaw
|
|
| 53 |
|
| 54 |
#### Training Hyperparameters
|
| 55 |
|
| 56 |
-
- **Training regime:**
|
| 57 |
- Batch Size: 24
|
| 58 |
- Epochs: 4
|
| 59 |
- Learning Rate: 0.00005
|
|
|
|
| 60 |
|
| 61 |
## Evaluation
|
| 62 |
|
|
@@ -74,8 +74,16 @@ The model was tested on 3 metrics:
|
|
| 74 |
### Results
|
| 75 |
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## Model Architecture
|
| 80 |
|
|
|
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
#### Training Hyperparameters
|
| 55 |
|
|
|
|
| 56 |
- Batch Size: 24
|
| 57 |
- Epochs: 4
|
| 58 |
- Learning Rate: 0.00005
|
| 59 |
+
- With BOS-Token
|
| 60 |
|
| 61 |
## Evaluation
|
| 62 |
|
|
|
|
| 74 |
### Results
|
| 75 |
|
| 76 |
|
| 77 |
+

|
| 78 |
+

|
| 79 |
+

|
| 80 |
|
| 81 |
## Model Architecture
|
| 82 |
|
| 83 |
+
GPT2 config with the following changes:
|
| 84 |
|
| 85 |
+
- VOCAB_SIZE = 76
|
| 86 |
+
- N_POSITION = 512
|
| 87 |
+
- PAD_TOKEN_ID = 0
|
| 88 |
+
- BOS_TOKEN_ID = 75
|
| 89 |
+
- EOS_TOKEN_ID = 74
|