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")# pip install -U transformers accelerate # 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", device_map="auto") - 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
Commit History
-
Update README.md
0724e8a -
Update README.md
eadbc15 -
Create README.md
--- language: en tags: - chess - language-model - leon-llm license: mit --- # Chess Language Model Explore the model's capabilities and interact with it on [GitHub](https://github.zhaw.ch/schmila7/leon-llm). This model is trained on chess game sequences using a custom notation, xLAN, and aims to predict legal chess moves and understand chess game dynamics. The model is an adaptation of GPT-2 trained from scratch, tailored to comprehend and generate chess moves. ## Model description Our Chess Language Model is a transformer-based model trained on a large corpus of chess games. The training process involved adapting the GPT-2 architecture to understand and predict chess moves in our custom xLAN format. xLAN helps in providing a uniform and fixed-length format for each move, enhancing the model's ability to learn the intricacies of chess. **Training and Evaluation Parameters:** (Insert specific training and evaluation parameters here.) ## Intended uses & limitations The model is …1acac8d
-
Upload model
a194014 -
initial commit
ac6d3ed