Instructions to use yp-edu/gpt2-stockfish-debug with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yp-edu/gpt2-stockfish-debug with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yp-edu/gpt2-stockfish-debug")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yp-edu/gpt2-stockfish-debug") model = AutoModelForCausalLM.from_pretrained("yp-edu/gpt2-stockfish-debug", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yp-edu/gpt2-stockfish-debug with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yp-edu/gpt2-stockfish-debug" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yp-edu/gpt2-stockfish-debug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yp-edu/gpt2-stockfish-debug
- SGLang
How to use yp-edu/gpt2-stockfish-debug 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 "yp-edu/gpt2-stockfish-debug" \ --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": "yp-edu/gpt2-stockfish-debug", "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 "yp-edu/gpt2-stockfish-debug" \ --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": "yp-edu/gpt2-stockfish-debug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yp-edu/gpt2-stockfish-debug with Docker Model Runner:
docker model run hf.co/yp-edu/gpt2-stockfish-debug
Commit History
-
Update README.md
Verified signatureb9c9401
-
Update README.md
Verified signaturec187fbe
-
Update README.md
Verified signature3cfaba5 -
Update README.md
Verified signature329e823 -
Update README.md
Verified signature330f9e7 -
Update README.md
Verified signature3907677 -
Added tokenizer files from gpt2
Verified signaturedaf0339 -
Update README.md
Verified signature315b9b8 -
Added model files
Verified signature3422e7f -
Update README.md
Verified signaturef6abe6d -
Update README.md
Verified signature82bd166 -
Update README.md
Verified signature27166aa -
Update README.md
Verified signaturecd7ba99 -
Create README.md
Verified signatureb3f4ed7 -
initial commit
Verified signatureeffcb21