Instructions to use SashaSheykina/codeBert-finetuned-cXg-nl-to-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SashaSheykina/codeBert-finetuned-cXg-nl-to-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SashaSheykina/codeBert-finetuned-cXg-nl-to-code")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SashaSheykina/codeBert-finetuned-cXg-nl-to-code") model = AutoModelForCausalLM.from_pretrained("SashaSheykina/codeBert-finetuned-cXg-nl-to-code") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SashaSheykina/codeBert-finetuned-cXg-nl-to-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SashaSheykina/codeBert-finetuned-cXg-nl-to-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SashaSheykina/codeBert-finetuned-cXg-nl-to-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SashaSheykina/codeBert-finetuned-cXg-nl-to-code
- SGLang
How to use SashaSheykina/codeBert-finetuned-cXg-nl-to-code 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 "SashaSheykina/codeBert-finetuned-cXg-nl-to-code" \ --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": "SashaSheykina/codeBert-finetuned-cXg-nl-to-code", "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 "SashaSheykina/codeBert-finetuned-cXg-nl-to-code" \ --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": "SashaSheykina/codeBert-finetuned-cXg-nl-to-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SashaSheykina/codeBert-finetuned-cXg-nl-to-code with Docker Model Runner:
docker model run hf.co/SashaSheykina/codeBert-finetuned-cXg-nl-to-code
Ctrl+K
- Aug02_11-29-32_ef3a86d4ca20
- Aug02_12-13-37_ef3a86d4ca20
- Aug02_12-19-12_ef3a86d4ca20
- Jul26_05-59-33_999dd138ecaf
- Jul26_13-40-50_30aead859e7a
- Jul26_13-47-35_30aead859e7a
- Jul26_13-49-09_30aead859e7a
- Jul26_13-52-43_30aead859e7a
- Jul26_14-53-57_30aead859e7a
- Jul26_15-10-50_30aead859e7a
- Jul26_15-21-58_30aead859e7a
- Jul26_15-23-35_30aead859e7a
- Jul26_15-31-06_30aead859e7a
- Jul26_15-37-37_30aead859e7a
- Jul26_15-39-51_30aead859e7a
- Jul26_15-41-31_30aead859e7a
- Jul26_15-48-25_30aead859e7a
- Jul26_15-50-07_30aead859e7a
- Jul26_15-59-15_30aead859e7a
- Jul26_16-01-02_30aead859e7a
- Jul26_17-08-44_30aead859e7a
- Jul26_17-10-31_30aead859e7a
- Jul26_17-16-08_30aead859e7a
- Jul26_17-19-46_30aead859e7a
- Jul26_17-29-13_30aead859e7a
- Jul26_17-48-33_30aead859e7a
- Jul26_17-51-11_30aead859e7a
- Jul31_08-53-09_e471ee88313b
- Jul31_08-58-08_e471ee88313b
- Jul31_08-58-53_e471ee88313b
- Jul31_09-01-31_e471ee88313b