Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- lora_adapters/README.md +2 -2
- lora_adapters/adapter_config.json +8 -6
- lora_adapters/adapter_model.safetensors +2 -2
- metrics.json +11 -11
- pruning_masks.pt +2 -2
- tokenizer/chat_template.jinja +54 -0
- tokenizer/tokenizer.json +0 -0
- tokenizer/tokenizer_config.json +21 -4
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
lora_adapters/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
-
- base_model:adapter:
|
| 7 |
- lora
|
| 8 |
- transformers
|
| 9 |
---
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-1.5B
|
| 3 |
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
+
- base_model:adapter:Qwen/Qwen2.5-1.5B
|
| 7 |
- lora
|
| 8 |
- transformers
|
| 9 |
---
|
lora_adapters/adapter_config.json
CHANGED
|
@@ -3,20 +3,20 @@
|
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
"auto_mapping": null,
|
| 6 |
-
"base_model_name_or_path": "
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
"ensure_weight_tying": false,
|
| 10 |
"eva_config": null,
|
| 11 |
"exclude_modules": null,
|
| 12 |
-
"fan_in_fan_out":
|
| 13 |
"inference_mode": true,
|
| 14 |
"init_lora_weights": true,
|
| 15 |
"layer_replication": null,
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
| 18 |
"loftq_config": {},
|
| 19 |
-
"lora_alpha":
|
| 20 |
"lora_bias": false,
|
| 21 |
"lora_dropout": 0.05,
|
| 22 |
"megatron_config": null,
|
|
@@ -25,12 +25,14 @@
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
-
"r":
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"
|
| 33 |
-
"
|
|
|
|
|
|
|
| 34 |
],
|
| 35 |
"target_parameters": null,
|
| 36 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen2.5-1.5B",
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
"ensure_weight_tying": false,
|
| 10 |
"eva_config": null,
|
| 11 |
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
"inference_mode": true,
|
| 14 |
"init_lora_weights": true,
|
| 15 |
"layer_replication": null,
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
| 18 |
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 32,
|
| 20 |
"lora_bias": false,
|
| 21 |
"lora_dropout": 0.05,
|
| 22 |
"megatron_config": null,
|
|
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
+
"r": 16,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
+
"q_proj",
|
| 33 |
+
"k_proj",
|
| 34 |
+
"o_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
],
|
| 37 |
"target_parameters": null,
|
| 38 |
"task_type": "CAUSAL_LM",
|
lora_adapters/adapter_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:f7c20167a6c0fe886a2bab780d10e7364d7486699ca52841e79ad6d774d5f693
|
| 3 |
+
size 17462432
|
metrics.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
{
|
| 2 |
"history": {
|
| 3 |
"phase1_loss": [
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
],
|
| 8 |
"phase2_loss": [
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
],
|
| 13 |
"phase3_loss": [
|
| 14 |
-
|
| 15 |
-
0.
|
| 16 |
-
0.
|
| 17 |
],
|
| 18 |
"phase4_loss": [
|
| 19 |
-
|
| 20 |
-
|
| 21 |
]
|
| 22 |
},
|
| 23 |
"config": {},
|
|
|
|
| 1 |
{
|
| 2 |
"history": {
|
| 3 |
"phase1_loss": [
|
| 4 |
+
1.0353418778181076,
|
| 5 |
+
0.9768576472997665,
|
| 6 |
+
0.9658585922718048
|
| 7 |
],
|
| 8 |
"phase2_loss": [
|
| 9 |
+
0.7075292477607728,
|
| 10 |
+
0.5668660184542338,
|
| 11 |
+
0.5553368124167124
|
| 12 |
],
|
| 13 |
"phase3_loss": [
|
| 14 |
+
0.5523252527713776,
|
| 15 |
+
0.33545919140179953,
|
| 16 |
+
0.3325609523455302
|
| 17 |
],
|
| 18 |
"phase4_loss": [
|
| 19 |
+
0.6675908669829369,
|
| 20 |
+
0.19798015129566193
|
| 21 |
]
|
| 22 |
},
|
| 23 |
"config": {},
|
pruning_masks.pt
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:2d94d1357570919d7e4dda5adf2bb41399c85a908ecd5193321673dc6529eb14
|
| 3 |
+
size 17515274
|
tokenizer/chat_template.jinja
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- '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 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 %}
|
tokenizer/tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/tokenizer_config.json
CHANGED
|
@@ -1,12 +1,29 @@
|
|
| 1 |
{
|
| 2 |
"add_prefix_space": false,
|
| 3 |
"backend": "tokenizers",
|
| 4 |
-
"bos_token":
|
|
|
|
| 5 |
"eos_token": "<|endoftext|>",
|
| 6 |
"errors": "replace",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"is_local": false,
|
| 8 |
-
"model_max_length":
|
| 9 |
"pad_token": "<|endoftext|>",
|
| 10 |
-
"
|
| 11 |
-
"
|
|
|
|
| 12 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"add_prefix_space": false,
|
| 3 |
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
"eos_token": "<|endoftext|>",
|
| 7 |
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
"is_local": false,
|
| 24 |
+
"model_max_length": 131072,
|
| 25 |
"pad_token": "<|endoftext|>",
|
| 26 |
+
"split_special_tokens": false,
|
| 27 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 28 |
+
"unk_token": null
|
| 29 |
}
|