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", device_map="auto") - 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
File size: 2,089 Bytes
e5e7b3f bf1642b 534e371 e5e7b3f 534e371 e5e7b3f d0a9627 e5e7b3f d0a9627 e5e7b3f d0a9627 e5e7b3f d0a9627 e5e7b3f d0a9627 e5e7b3f 534e371 bf1642b e5e7b3f 534e371 e5e7b3f 534e371 e5e7b3f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | {
"best_metric": 0.8979436755180359,
"best_model_checkpoint": "./opt_trained3/checkpoint-2720",
"epoch": 1.99898924928788,
"eval_steps": 500,
"global_step": 2720,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.3675457134981163,
"grad_norm": 1.3510414361953735,
"learning_rate": 9.189154158168292e-05,
"loss": 0.9069,
"step": 500
},
{
"epoch": 0.7350914269962326,
"grad_norm": 1.1864418983459473,
"learning_rate": 7.019605024359474e-05,
"loss": 0.9081,
"step": 1000
},
{
"epoch": 1.0,
"eval_loss": 0.9017300605773926,
"eval_runtime": 764.7068,
"eval_samples_per_second": 50.601,
"eval_steps_per_second": 12.651,
"step": 1361
},
{
"epoch": 1.1021777083524764,
"grad_norm": 1.2064156532287598,
"learning_rate": 4.195020556092935e-05,
"loss": 0.8997,
"step": 1500
},
{
"epoch": 1.4697234218505928,
"grad_norm": 1.2276240587234497,
"learning_rate": 1.631521781767214e-05,
"loss": 0.8969,
"step": 2000
},
{
"epoch": 1.837269135348709,
"grad_norm": 1.193297266960144,
"learning_rate": 1.6054963006338742e-06,
"loss": 0.8947,
"step": 2500
},
{
"epoch": 1.99898924928788,
"eval_loss": 0.8979436755180359,
"eval_runtime": 761.1017,
"eval_samples_per_second": 50.841,
"eval_steps_per_second": 12.711,
"step": 2720
}
],
"logging_steps": 500,
"max_steps": 2720,
"num_input_tokens_seen": 0,
"num_train_epochs": 2,
"save_steps": 500,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 1.37491227277056e+17,
"train_batch_size": 32,
"trial_name": null,
"trial_params": null
}
|