Instructions to use IgnacioDM/llama-chess-cot1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IgnacioDM/llama-chess-cot1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IgnacioDM/llama-chess-cot1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("IgnacioDM/llama-chess-cot1") model = AutoModelForCausalLM.from_pretrained("IgnacioDM/llama-chess-cot1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IgnacioDM/llama-chess-cot1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IgnacioDM/llama-chess-cot1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IgnacioDM/llama-chess-cot1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IgnacioDM/llama-chess-cot1
- SGLang
How to use IgnacioDM/llama-chess-cot1 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 "IgnacioDM/llama-chess-cot1" \ --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": "IgnacioDM/llama-chess-cot1", "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 "IgnacioDM/llama-chess-cot1" \ --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": "IgnacioDM/llama-chess-cot1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IgnacioDM/llama-chess-cot1 with Docker Model Runner:
docker model run hf.co/IgnacioDM/llama-chess-cot1
Buggy and undertrained. Do not use.
Prompt format
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Evaluate the chess position (JSON)
### Input:
{"PGN":"1. Nf3 c5 2. g3 Nc6 3. Bg2 g6 4. d3 Bg7 5. O-O d5 6. Nbd2 e6 7. e4 Nge7 8. exd5 Nxd5 9. Re1 O-O 10. Nc4 b6 11. a4 Bb7 12. h4 Rc8 13. h5 Qc7 14. h6 Bh8 15. c3 Rcd8 16. Qe2 Rfe8 17. Nh2 e5 18. Ng4 f5 19. Nge3 Nxe3 20. Nxe3 Ne7 21. Bxb7 Qxb7 22. a5 Nd5 23. axb6 axb6 24. Nc4 e4 25. Bg5 Bf6 26. Bxf6 Nxf6 27. dxe4 Rxe4 28. Qf1 b5 29. Ne5 Qd5 30. Nf3 Rxe1","FEN":"3r2k1/7p/5npP/1ppq1p2/8/2P2NP1/1P3P2/R3rQK1 w - - 0 31"}
Example response
### Response:
{"board":" +------------------------+\n 8 | . . . r . . k . |\n 7 | . . . . . . . p |\n 6 | . . . . . n p P |\n 5 | . p p q . p . . |\n 4 | . . . . . . . . |\n 3 | . . P . . N P . |\n 2 | . P . . . P . . |\n 1 | R . . . r Q K . |\n +------------------------+\n a b c d e f g h","legalMoves":["c4","Nd4","Ne5","Ng5","Nh4","Nh2","Nd2","g4","b3","b4","Ra2","Ra3","Ra4","Ra5","Ra6","Ra7","Ra8","Rb1","Rc1","Rd1","Qe2","Qd3","Qc4+","Qxb5","Qg2","Qh3","Qxe1","Kg2","Kh2"],"bestLines":["31. Qxe1 Re8 32. Qf1 -0.6","31. Nd4 Rxf1+ 32. Kxf1 -7.5","31. Ra8 Rxf1+ 32. Kxf1 -7.9"],"bestMove":"Qxe1"}
- Downloads last month
- 13