Instructions to use ccore/getcode-350m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccore/getcode-350m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccore/getcode-350m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccore/getcode-350m") model = AutoModelForCausalLM.from_pretrained("ccore/getcode-350m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ccore/getcode-350m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccore/getcode-350m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccore/getcode-350m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ccore/getcode-350m
- SGLang
How to use ccore/getcode-350m 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 "ccore/getcode-350m" \ --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": "ccore/getcode-350m", "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 "ccore/getcode-350m" \ --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": "ccore/getcode-350m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ccore/getcode-350m with Docker Model Runner:
docker model run hf.co/ccore/getcode-350m
Training in progress, epoch 4, checkpoint
Browse files
last-checkpoint/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1447317080
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d4b0b4a59e85d7e6af4b7a34158cec3d0e0c3e8fada19f60fb8d999dde0b04d
|
| 3 |
size 1447317080
|
last-checkpoint/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2894813242
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5215a327ce7bfdf3f861f72783d0a6dc057750c800a758bac5edb9af32981fc9
|
| 3 |
size 2894813242
|
last-checkpoint/rng_state.pth
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 14244
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9899ccda7f0d8d9511991180b93aab508ce6e8489de708c88ad1188e7e1d90d6
|
| 3 |
size 14244
|
last-checkpoint/scheduler.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1064
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc1f40e5ed3949f09823dd3019104a35d1148f043d89b682818a1cc328fe11e9
|
| 3 |
size 1064
|
last-checkpoint/trainer_state.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"best_metric": 0.
|
| 3 |
-
"best_model_checkpoint": "./opt_trained2/checkpoint-
|
| 4 |
-
"epoch":
|
| 5 |
"eval_steps": 500,
|
| 6 |
-
"global_step":
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
|
@@ -31,6 +31,14 @@
|
|
| 31 |
"eval_samples_per_second": 10.408,
|
| 32 |
"eval_steps_per_second": 2.602,
|
| 33 |
"step": 255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
],
|
| 36 |
"logging_steps": 500,
|
|
@@ -50,7 +58,7 @@
|
|
| 50 |
"attributes": {}
|
| 51 |
}
|
| 52 |
},
|
| 53 |
-
"total_flos":
|
| 54 |
"train_batch_size": 4,
|
| 55 |
"trial_name": null,
|
| 56 |
"trial_params": null
|
|
|
|
| 1 |
{
|
| 2 |
+
"best_metric": 0.5381163358688354,
|
| 3 |
+
"best_model_checkpoint": "./opt_trained2/checkpoint-340",
|
| 4 |
+
"epoch": 4.0,
|
| 5 |
"eval_steps": 500,
|
| 6 |
+
"global_step": 340,
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
|
|
|
| 31 |
"eval_samples_per_second": 10.408,
|
| 32 |
"eval_steps_per_second": 2.602,
|
| 33 |
"step": 255
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"epoch": 4.0,
|
| 37 |
+
"eval_loss": 0.5381163358688354,
|
| 38 |
+
"eval_runtime": 28.8298,
|
| 39 |
+
"eval_samples_per_second": 10.406,
|
| 40 |
+
"eval_steps_per_second": 2.601,
|
| 41 |
+
"step": 340
|
| 42 |
}
|
| 43 |
],
|
| 44 |
"logging_steps": 500,
|
|
|
|
| 58 |
"attributes": {}
|
| 59 |
}
|
| 60 |
},
|
| 61 |
+
"total_flos": 1.3121269501824e+16,
|
| 62 |
"train_batch_size": 4,
|
| 63 |
"trial_name": null,
|
| 64 |
"trial_params": null
|