Instructions to use rovdetection/code-1b-chat-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rovdetection/code-1b-chat-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rovdetection/code-1b-chat-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rovdetection/code-1b-chat-v2") model = AutoModelForCausalLM.from_pretrained("rovdetection/code-1b-chat-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rovdetection/code-1b-chat-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rovdetection/code-1b-chat-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rovdetection/code-1b-chat-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rovdetection/code-1b-chat-v2
- SGLang
How to use rovdetection/code-1b-chat-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 "rovdetection/code-1b-chat-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": "rovdetection/code-1b-chat-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 "rovdetection/code-1b-chat-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": "rovdetection/code-1b-chat-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rovdetection/code-1b-chat-v2 with Docker Model Runner:
docker model run hf.co/rovdetection/code-1b-chat-v2
Training in progress, step 500, checkpoint
Browse files- last-checkpoint/config.json +32 -0
- last-checkpoint/generation_config.json +10 -0
- last-checkpoint/model.safetensors +3 -0
- last-checkpoint/optimizer.pt +3 -0
- last-checkpoint/rng_state.pth +3 -0
- last-checkpoint/scaler.pt +3 -0
- last-checkpoint/scheduler.pt +3 -0
- last-checkpoint/tokenizer.json +0 -0
- last-checkpoint/tokenizer_config.json +17 -0
- last-checkpoint/trainer_state.json +112 -0
- last-checkpoint/training_args.bin +3 -0
last-checkpoint/config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 5632,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 16,
|
| 19 |
+
"num_hidden_layers": 18,
|
| 20 |
+
"num_key_value_heads": 16,
|
| 21 |
+
"pad_token_id": 0,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 10000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": false,
|
| 29 |
+
"transformers_version": "5.9.0",
|
| 30 |
+
"use_cache": false,
|
| 31 |
+
"vocab_size": 50257
|
| 32 |
+
}
|
last-checkpoint/generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 0,
|
| 8 |
+
"transformers_version": "5.9.0",
|
| 9 |
+
"use_cache": true
|
| 10 |
+
}
|
last-checkpoint/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:01f02a6552ebf557c663261cde7e237513b533f9cc549a0a4e441821d246faa3
|
| 3 |
+
size 4523108832
|
last-checkpoint/optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9735805862fcaf445077a15d872c7a340cd7e8ea695d46738281425d99ff7bc1
|
| 3 |
+
size 2911851147
|
last-checkpoint/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:098b29492211804ab324a36f37466821d948280bb74fce4ba895c03f13ecd878
|
| 3 |
+
size 14645
|
last-checkpoint/scaler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f77569c2e850b04af982cc8c1389f1430851448915c593b69e5da36ce05b71d7
|
| 3 |
+
size 1383
|
last-checkpoint/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b61ed96b9f34f057dffa0bad8ef6959040ba1cfe848017506ba05f40fdaea76
|
| 3 |
+
size 1465
|
last-checkpoint/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
last-checkpoint/tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"errors": "replace",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"max_length": 512,
|
| 10 |
+
"model_max_length": 1024,
|
| 11 |
+
"pad_token": "<|endoftext|>",
|
| 12 |
+
"stride": 0,
|
| 13 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 14 |
+
"truncation_side": "right",
|
| 15 |
+
"truncation_strategy": "longest_first",
|
| 16 |
+
"unk_token": "<|endoftext|>"
|
| 17 |
+
}
|
last-checkpoint/trainer_state.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": 500,
|
| 3 |
+
"best_metric": 1.025797724723816,
|
| 4 |
+
"best_model_checkpoint": "./sft-out/checkpoint-500",
|
| 5 |
+
"epoch": 0.8840267418089397,
|
| 6 |
+
"eval_steps": 500,
|
| 7 |
+
"global_step": 500,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.08840267418089397,
|
| 14 |
+
"grad_norm": 2.867945432662964,
|
| 15 |
+
"learning_rate": 9.800000000000001e-06,
|
| 16 |
+
"loss": 1.6486561584472657,
|
| 17 |
+
"step": 50
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"epoch": 0.17680534836178793,
|
| 21 |
+
"grad_norm": 2.9991917610168457,
|
| 22 |
+
"learning_rate": 1.98e-05,
|
| 23 |
+
"loss": 1.33203125,
|
| 24 |
+
"step": 100
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.26520802254268194,
|
| 28 |
+
"grad_norm": 2.570798635482788,
|
| 29 |
+
"learning_rate": 1.9854078984834904e-05,
|
| 30 |
+
"loss": 1.2356742858886718,
|
| 31 |
+
"step": 150
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.35361069672357587,
|
| 35 |
+
"grad_norm": 2.5860543251037598,
|
| 36 |
+
"learning_rate": 1.9408807689542257e-05,
|
| 37 |
+
"loss": 1.2118841552734374,
|
| 38 |
+
"step": 200
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.44201337090446985,
|
| 42 |
+
"grad_norm": 2.117816686630249,
|
| 43 |
+
"learning_rate": 1.8677654533689287e-05,
|
| 44 |
+
"loss": 1.1767095184326173,
|
| 45 |
+
"step": 250
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.5304160450853639,
|
| 49 |
+
"grad_norm": 2.276134729385376,
|
| 50 |
+
"learning_rate": 1.7682835235935236e-05,
|
| 51 |
+
"loss": 1.1405416870117187,
|
| 52 |
+
"step": 300
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"epoch": 0.6188187192662578,
|
| 56 |
+
"grad_norm": 2.2516863346099854,
|
| 57 |
+
"learning_rate": 1.645457687723951e-05,
|
| 58 |
+
"loss": 1.128560562133789,
|
| 59 |
+
"step": 350
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"epoch": 0.7072213934471517,
|
| 63 |
+
"grad_norm": 2.084246873855591,
|
| 64 |
+
"learning_rate": 1.5030199466302354e-05,
|
| 65 |
+
"loss": 1.1079308319091796,
|
| 66 |
+
"step": 400
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"epoch": 0.7956240676280457,
|
| 70 |
+
"grad_norm": 2.195765495300293,
|
| 71 |
+
"learning_rate": 1.3452981989985347e-05,
|
| 72 |
+
"loss": 1.0333491516113282,
|
| 73 |
+
"step": 450
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"epoch": 0.8840267418089397,
|
| 77 |
+
"grad_norm": 2.2488884925842285,
|
| 78 |
+
"learning_rate": 1.1770847403195836e-05,
|
| 79 |
+
"loss": 1.0508524322509765,
|
| 80 |
+
"step": 500
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"epoch": 0.8840267418089397,
|
| 84 |
+
"eval_loss": 1.025797724723816,
|
| 85 |
+
"eval_runtime": 31.5114,
|
| 86 |
+
"eval_samples_per_second": 15.867,
|
| 87 |
+
"eval_steps_per_second": 1.999,
|
| 88 |
+
"step": 500
|
| 89 |
+
}
|
| 90 |
+
],
|
| 91 |
+
"logging_steps": 50,
|
| 92 |
+
"max_steps": 1000,
|
| 93 |
+
"num_input_tokens_seen": 0,
|
| 94 |
+
"num_train_epochs": 2,
|
| 95 |
+
"save_steps": 500,
|
| 96 |
+
"stateful_callbacks": {
|
| 97 |
+
"TrainerControl": {
|
| 98 |
+
"args": {
|
| 99 |
+
"should_epoch_stop": false,
|
| 100 |
+
"should_evaluate": false,
|
| 101 |
+
"should_log": false,
|
| 102 |
+
"should_save": true,
|
| 103 |
+
"should_training_stop": false
|
| 104 |
+
},
|
| 105 |
+
"attributes": {}
|
| 106 |
+
}
|
| 107 |
+
},
|
| 108 |
+
"total_flos": 1.9429307822186496e+16,
|
| 109 |
+
"train_batch_size": 1,
|
| 110 |
+
"trial_name": null,
|
| 111 |
+
"trial_params": null
|
| 112 |
+
}
|
last-checkpoint/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b09d01e394e9508be9f5db421ce912c1e3d19f75d3680c709cd862dd999d76c4
|
| 3 |
+
size 5329
|