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")# pip install -U transformers accelerate # 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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Training in progress, epoch 1
Browse files
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 498813948
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b12302e603dcecde49d4be4b668d0f36482b23b20bec65da56bb721fc5508336
|
| 3 |
size 498813948
|
runs/Jul26_17-19-46_30aead859e7a/events.out.tfevents.1722014387.30aead859e7a.53813.2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e50f0c55470e8317c56560c928a565a8057229366cdd905a694537314cd1a1b7
|
| 3 |
+
size 5407
|
runs/Jul26_17-29-13_30aead859e7a/events.out.tfevents.1722014954.30aead859e7a.53813.3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61611242a6cdbcdbabbb969dd14f83edd4ffc9f5562c45052604efa2fdd35c48
|
| 3 |
+
size 5059
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c63e64576549df8ac6dd7cfd5063324309b17aa0470e25f17ff207a0c85ea682
|
| 3 |
size 5304
|