- Install
pyenv
(SEE https://realpython.com/intro-to-pyenv/) - Setup
pyenv
in$SHELL
pyenv install 3.11.4
pyenv virtualenv 3.11.4 starcoder_py311
pyenv virtualenvs
to listpyenv activate starcoder_py311
pip install -r requirements.txt
- Log in to huggingFace via
huggingface-cli login
OR by manually providing a login token
python main.py --port 8000 --host 0.0.0.0 --pretrained bigcode/starcoderplus
Base code from LucienShui/huggingface-vscode-endpoint-server
starcoder server for huggingface-vscdoe custom endpoint.
Can't handle distributed inference very well yet.
pip install -r requirements.txt
python main.py
Fill http://localhost:8000/api/generate/
into Hugging Face Code > Model ID or Endpoint
in VSCode.
curl -X POST http://localhost:8000/api/generate/ -d '{"inputs": "", "parameters": {"max_new_tokens": 64}}'
# response = {"generated_text": ""}