Text Generation
Transformers
TensorBoard
Safetensors
opt
Generated from Trainer
text-generation-inference
Instructions to use ccore/getcode-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccore/getcode-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccore/getcode-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccore/getcode-v2") model = AutoModelForCausalLM.from_pretrained("ccore/getcode-v2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccore/getcode-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccore/getcode-v2" # 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-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ccore/getcode-v2
- SGLang
How to use ccore/getcode-v2 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-v2" \ --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-v2", "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-v2" \ --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-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ccore/getcode-v2 with Docker Model Runner:
docker model run hf.co/ccore/getcode-v2
Training in progress, epoch 1, 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 500979600
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a07b7d4a9c1b86f87d485901d5e37ea7b953f9e365829f31dbaea704f076c7bd
|
| 3 |
size 500979600
|
last-checkpoint/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1002078330
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:868dd0dcf987dbe3fc0f6e805629c90bab980bfee1dec1990f93a52eeb7c144f
|
| 3 |
size 1002078330
|
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:759145ece1000f3e66fd124e9d92191400585f54ff12c451de1a4fc9d6ebb688
|
| 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:6602c18a1ebe894c1d51ce5c9cea3744db091c466423f123d4fa8b7754d9378a
|
| 3 |
size 1064
|
last-checkpoint/trainer_state.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"best_metric": 0.9048793911933899,
|
| 3 |
"best_model_checkpoint": "./opt_trained3/checkpoint-1361",
|
| 4 |
-
"epoch": 1.
|
| 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,
|
|
@@ -29,6 +29,27 @@
|
|
| 29 |
"eval_samples_per_second": 50.377,
|
| 30 |
"eval_steps_per_second": 12.595,
|
| 31 |
"step": 1361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
],
|
| 34 |
"logging_steps": 500,
|
|
@@ -43,12 +64,12 @@
|
|
| 43 |
"should_evaluate": false,
|
| 44 |
"should_log": false,
|
| 45 |
"should_save": true,
|
| 46 |
-
"should_training_stop":
|
| 47 |
},
|
| 48 |
"attributes": {}
|
| 49 |
}
|
| 50 |
},
|
| 51 |
-
"total_flos":
|
| 52 |
"train_batch_size": 32,
|
| 53 |
"trial_name": null,
|
| 54 |
"trial_params": null
|
|
|
|
| 1 |
{
|
| 2 |
"best_metric": 0.9048793911933899,
|
| 3 |
"best_model_checkpoint": "./opt_trained3/checkpoint-1361",
|
| 4 |
+
"epoch": 1.99898924928788,
|
| 5 |
"eval_steps": 500,
|
| 6 |
+
"global_step": 2720,
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
|
|
|
| 29 |
"eval_samples_per_second": 50.377,
|
| 30 |
"eval_steps_per_second": 12.595,
|
| 31 |
"step": 1361
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 1.1021777083524764,
|
| 35 |
+
"grad_norm": 1.1806821823120117,
|
| 36 |
+
"learning_rate": 4.195020556092935e-05,
|
| 37 |
+
"loss": 0.9113,
|
| 38 |
+
"step": 1500
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 1.4697234218505928,
|
| 42 |
+
"grad_norm": 1.2350996732711792,
|
| 43 |
+
"learning_rate": 1.631521781767214e-05,
|
| 44 |
+
"loss": 0.907,
|
| 45 |
+
"step": 2000
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 1.837269135348709,
|
| 49 |
+
"grad_norm": 0.9862784147262573,
|
| 50 |
+
"learning_rate": 1.6054963006338742e-06,
|
| 51 |
+
"loss": 0.9047,
|
| 52 |
+
"step": 2500
|
| 53 |
}
|
| 54 |
],
|
| 55 |
"logging_steps": 500,
|
|
|
|
| 64 |
"should_evaluate": false,
|
| 65 |
"should_log": false,
|
| 66 |
"should_save": true,
|
| 67 |
+
"should_training_stop": true
|
| 68 |
},
|
| 69 |
"attributes": {}
|
| 70 |
}
|
| 71 |
},
|
| 72 |
+
"total_flos": 1.37491227277056e+17,
|
| 73 |
"train_batch_size": 32,
|
| 74 |
"trial_name": null,
|
| 75 |
"trial_params": null
|