Training in progress, epoch 2
Browse files- README.md +3 -3
- added_tokens.json +22 -1
- chat_template.jinja +54 -47
- config.json +38 -38
- merges.txt +0 -0
- model.safetensors +2 -2
- runs/Sep13_20-16-27_6a75134f9ac0/events.out.tfevents.1757794595.6a75134f9ac0.244.1 +3 -0
- runs/Sep13_20-26-40_f848f5abb8d4/events.out.tfevents.1757795214.f848f5abb8d4.177.0 +3 -0
- special_tokens_map.json +17 -19
- tokenizer.json +2 -2
- tokenizer_config.json +0 -0
- training_args.bin +1 -1
- vocab.json +0 -0
README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Code1
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- trl
|
| 8 |
- sft
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Code1
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-0.5B-Instruct
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Code1
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- sft
|
| 8 |
+
- trl
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Code1
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
added_tokens.json
CHANGED
|
@@ -1,3 +1,24 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"</tool_call>": 151658,
|
| 3 |
+
"<tool_call>": 151657,
|
| 4 |
+
"<|box_end|>": 151649,
|
| 5 |
+
"<|box_start|>": 151648,
|
| 6 |
+
"<|endoftext|>": 151643,
|
| 7 |
+
"<|file_sep|>": 151664,
|
| 8 |
+
"<|fim_middle|>": 151660,
|
| 9 |
+
"<|fim_pad|>": 151662,
|
| 10 |
+
"<|fim_prefix|>": 151659,
|
| 11 |
+
"<|fim_suffix|>": 151661,
|
| 12 |
+
"<|im_end|>": 151645,
|
| 13 |
+
"<|im_start|>": 151644,
|
| 14 |
+
"<|image_pad|>": 151655,
|
| 15 |
+
"<|object_ref_end|>": 151647,
|
| 16 |
+
"<|object_ref_start|>": 151646,
|
| 17 |
+
"<|quad_end|>": 151651,
|
| 18 |
+
"<|quad_start|>": 151650,
|
| 19 |
+
"<|repo_name|>": 151663,
|
| 20 |
+
"<|video_pad|>": 151656,
|
| 21 |
+
"<|vision_end|>": 151653,
|
| 22 |
+
"<|vision_pad|>": 151654,
|
| 23 |
+
"<|vision_start|>": 151652
|
| 24 |
}
|
chat_template.jinja
CHANGED
|
@@ -1,47 +1,54 @@
|
|
| 1 |
-
{
|
| 2 |
-
{
|
| 3 |
-
{%- if messages[0]['
|
| 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 |
-
{%-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
config.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
| 1 |
{
|
| 2 |
-
"_sliding_window_pattern": 6,
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
| 6 |
-
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
-
"attn_logit_softcapping": null,
|
| 9 |
-
"bos_token_id": 2,
|
| 10 |
"dtype": "bfloat16",
|
| 11 |
-
"eos_token_id":
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"hidden_activation": "gelu_pytorch_tanh",
|
| 15 |
-
"hidden_size": 640,
|
| 16 |
"initializer_range": 0.02,
|
| 17 |
-
"intermediate_size":
|
| 18 |
"layer_types": [
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"full_attention",
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
-
"full_attention",
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
"
|
| 35 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
"full_attention"
|
| 37 |
],
|
| 38 |
"max_position_embeddings": 32768,
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"
|
| 45 |
"rms_norm_eps": 1e-06,
|
| 46 |
-
"rope_local_base_freq": 10000.0,
|
| 47 |
"rope_scaling": null,
|
| 48 |
"rope_theta": 1000000.0,
|
| 49 |
-
"sliding_window":
|
|
|
|
| 50 |
"transformers_version": "4.56.1",
|
| 51 |
-
"use_bidirectional_attention": false,
|
| 52 |
"use_cache": true,
|
| 53 |
-
"
|
|
|
|
| 54 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
+
"Qwen2ForCausalLM"
|
| 4 |
],
|
|
|
|
| 5 |
"attention_dropout": 0.0,
|
|
|
|
|
|
|
| 6 |
"dtype": "bfloat16",
|
| 7 |
+
"eos_token_id": 151645,
|
| 8 |
+
"hidden_act": "silu",
|
| 9 |
+
"hidden_size": 896,
|
|
|
|
|
|
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 4864,
|
| 12 |
"layer_types": [
|
| 13 |
+
"full_attention",
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
"full_attention"
|
| 37 |
],
|
| 38 |
"max_position_embeddings": 32768,
|
| 39 |
+
"max_window_layers": 21,
|
| 40 |
+
"model_type": "qwen2",
|
| 41 |
+
"num_attention_heads": 14,
|
| 42 |
+
"num_hidden_layers": 24,
|
| 43 |
+
"num_key_value_heads": 2,
|
| 44 |
+
"pad_token_id": 151643,
|
| 45 |
"rms_norm_eps": 1e-06,
|
|
|
|
| 46 |
"rope_scaling": null,
|
| 47 |
"rope_theta": 1000000.0,
|
| 48 |
+
"sliding_window": null,
|
| 49 |
+
"tie_word_embeddings": true,
|
| 50 |
"transformers_version": "4.56.1",
|
|
|
|
| 51 |
"use_cache": true,
|
| 52 |
+
"use_sliding_window": false,
|
| 53 |
+
"vocab_size": 151936
|
| 54 |
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1442ab5bb53f0d7349ade435c92bcc85f151d17b41d9eb24b83e609280d1d4dd
|
| 3 |
+
size 988097824
|
runs/Sep13_20-16-27_6a75134f9ac0/events.out.tfevents.1757794595.6a75134f9ac0.244.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adfbef2b71d5e4afbc4a1b43d810a3da06ee40b2cf9e3f7beece54905f0080ae
|
| 3 |
+
size 40914
|
runs/Sep13_20-26-40_f848f5abb8d4/events.out.tfevents.1757795214.f848f5abb8d4.177.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0740ac2c7e676b541650ed2bb2a256e1e1bf6ef64a7a2129926558a83e65888
|
| 3 |
+
size 66856
|
special_tokens_map.json
CHANGED
|
@@ -1,30 +1,28 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"eos_token": {
|
| 12 |
-
"content": "
|
| 13 |
"lstrip": false,
|
| 14 |
"normalized": false,
|
| 15 |
"rstrip": false,
|
| 16 |
"single_word": false
|
| 17 |
},
|
| 18 |
-
"image_token": "<image_soft_token>",
|
| 19 |
"pad_token": {
|
| 20 |
-
"content": "
|
| 21 |
-
"lstrip": false,
|
| 22 |
-
"normalized": false,
|
| 23 |
-
"rstrip": false,
|
| 24 |
-
"single_word": false
|
| 25 |
-
},
|
| 26 |
-
"unk_token": {
|
| 27 |
-
"content": "<unk>",
|
| 28 |
"lstrip": false,
|
| 29 |
"normalized": false,
|
| 30 |
"rstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
"lstrip": false,
|
| 20 |
"normalized": false,
|
| 21 |
"rstrip": false,
|
| 22 |
"single_word": false
|
| 23 |
},
|
|
|
|
| 24 |
"pad_token": {
|
| 25 |
+
"content": "<|endoftext|>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"lstrip": false,
|
| 27 |
"normalized": false,
|
| 28 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
| 3 |
+
size 11421896
|
tokenizer_config.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6289
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02bb4b3cd253faf0bafe1b8f17c85e126b7fd2f5ca926e75a97e9dfb1791f063
|
| 3 |
size 6289
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|