Instructions to use ccore/getcode-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccore/getcode-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccore/getcode-v3")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccore/getcode-v3") model = AutoModelForCausalLM.from_pretrained("ccore/getcode-v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccore/getcode-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccore/getcode-v3" # 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-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ccore/getcode-v3
- SGLang
How to use ccore/getcode-v3 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-v3" \ --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-v3", "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-v3" \ --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-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ccore/getcode-v3 with Docker Model Runner:
docker model run hf.co/ccore/getcode-v3
File size: 1,862 Bytes
11243bc | 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 | {
"best_metric": 0.9037830233573914,
"best_model_checkpoint": "./opt_trained3/checkpoint-2643",
"epoch": 1.0,
"eval_steps": 500,
"global_step": 2643,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.18917896329928113,
"grad_norm": 14.101566314697266,
"learning_rate": 9.784324123011948e-05,
"loss": 0.9633,
"step": 500
},
{
"epoch": 0.37835792659856227,
"grad_norm": 6.891010761260986,
"learning_rate": 9.14928228350961e-05,
"loss": 0.908,
"step": 1000
},
{
"epoch": 0.5675368898978433,
"grad_norm": 11.300192832946777,
"learning_rate": 8.150526293753795e-05,
"loss": 0.9047,
"step": 1500
},
{
"epoch": 0.7567158531971245,
"grad_norm": 5.797523021697998,
"learning_rate": 6.875604231051344e-05,
"loss": 0.9013,
"step": 2000
},
{
"epoch": 0.9458948164964056,
"grad_norm": 9.209771156311035,
"learning_rate": 5.4362720963179184e-05,
"loss": 0.9028,
"step": 2500
},
{
"epoch": 1.0,
"eval_loss": 0.9037830233573914,
"eval_runtime": 1653.9704,
"eval_samples_per_second": 19.886,
"eval_steps_per_second": 4.972,
"step": 2643
}
],
"logging_steps": 500,
"max_steps": 5286,
"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": false
},
"attributes": {}
}
},
"total_flos": 2.0851212666249216e+17,
"train_batch_size": 14,
"trial_name": null,
"trial_params": null
}
|