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 2, 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:91fd7fef7c913bb40166ed36edd2f41fccb334c604d8ad710dd729958231a38c
|
| 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:e44bc94aa5951947f3a443e56090b2942fbbc3833f1851ba62e08e0d0b08ab9b
|
| 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:8d138cfe3a4adf21f048848ee35837c9a757a0a3616ff7adbb45b69aac247435
|
| 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:8e5a8207eb085bcd0143e42fa68c8c3ba984241f8e091d2d1b847c4f98e5ec17
|
| 3 |
size 1064
|
last-checkpoint/trainer_state.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"best_metric": 0.344450980424881,
|
| 3 |
"best_model_checkpoint": "./opt_trained2/checkpoint-803",
|
| 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,
|
|
@@ -22,6 +22,28 @@
|
|
| 22 |
"eval_samples_per_second": 10.457,
|
| 23 |
"eval_steps_per_second": 2.614,
|
| 24 |
"step": 803
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
],
|
| 27 |
"logging_steps": 500,
|
|
@@ -41,7 +63,7 @@
|
|
| 41 |
"attributes": {}
|
| 42 |
}
|
| 43 |
},
|
| 44 |
-
"total_flos":
|
| 45 |
"train_batch_size": 4,
|
| 46 |
"trial_name": null,
|
| 47 |
"trial_params": null
|
|
|
|
| 1 |
{
|
| 2 |
"best_metric": 0.344450980424881,
|
| 3 |
"best_model_checkpoint": "./opt_trained2/checkpoint-803",
|
| 4 |
+
"epoch": 2.0,
|
| 5 |
"eval_steps": 500,
|
| 6 |
+
"global_step": 1606,
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
|
|
|
| 22 |
"eval_samples_per_second": 10.457,
|
| 23 |
"eval_steps_per_second": 2.614,
|
| 24 |
"step": 803
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 1.2453300124533002,
|
| 28 |
+
"grad_norm": 1.1673122644424438,
|
| 29 |
+
"learning_rate": 0.000375093399750934,
|
| 30 |
+
"loss": 2.6965,
|
| 31 |
+
"step": 1000
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 1.86799501867995,
|
| 35 |
+
"grad_norm": 0.7170485258102417,
|
| 36 |
+
"learning_rate": 0.000362640099626401,
|
| 37 |
+
"loss": 2.5469,
|
| 38 |
+
"step": 1500
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 2.0,
|
| 42 |
+
"eval_loss": 0.3459263741970062,
|
| 43 |
+
"eval_runtime": 272.8846,
|
| 44 |
+
"eval_samples_per_second": 10.466,
|
| 45 |
+
"eval_steps_per_second": 2.616,
|
| 46 |
+
"step": 1606
|
| 47 |
}
|
| 48 |
],
|
| 49 |
"logging_steps": 500,
|
|
|
|
| 63 |
"attributes": {}
|
| 64 |
}
|
| 65 |
},
|
| 66 |
+
"total_flos": 6.257442833136e+16,
|
| 67 |
"train_batch_size": 4,
|
| 68 |
"trial_name": null,
|
| 69 |
"trial_params": null
|