Training in progress, epoch 1
Browse files- README.md +6 -6
- adapter_config.json +14 -6
- adapter_model.safetensors +1 -1
- chat_template.jinja +87 -0
- tokenizer.json +28 -6
- tokenizer_config.json +1 -1
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/mistral-7b-v0.3-bnb-4bit
|
| 3 |
library_name: transformers
|
| 4 |
model_name: sft_best_simplification
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- trl
|
| 8 |
- unsloth
|
|
|
|
| 9 |
- sft
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for sft_best_simplification
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [unsloth/mistral-7b-v0.3-bnb-4bit](https://huggingface.co/unsloth/mistral-7b-v0.3-bnb-4bit).
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
@@ -28,7 +28,7 @@ print(output["generated_text"])
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/ioakeime-aristotle-university-of-thessaloniki/sft_best_simplification/runs/
|
| 32 |
|
| 33 |
|
| 34 |
This model was trained with SFT.
|
|
@@ -36,9 +36,9 @@ This model was trained with SFT.
|
|
| 36 |
### Framework versions
|
| 37 |
|
| 38 |
- TRL: 0.23.0
|
| 39 |
-
- Transformers: 4.
|
| 40 |
- Pytorch: 2.8.0
|
| 41 |
-
- Datasets: 3.
|
| 42 |
- Tokenizers: 0.22.1
|
| 43 |
|
| 44 |
## Citations
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: unsloth/mistral-7b-instruct-v0.3-bnb-4bit
|
| 3 |
library_name: transformers
|
| 4 |
model_name: sft_best_simplification
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- unsloth
|
| 8 |
+
- trl
|
| 9 |
- sft
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for sft_best_simplification
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [unsloth/mistral-7b-instruct-v0.3-bnb-4bit](https://huggingface.co/unsloth/mistral-7b-instruct-v0.3-bnb-4bit).
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/ioakeime-aristotle-university-of-thessaloniki/sft_best_simplification/runs/9amgp9pe)
|
| 32 |
|
| 33 |
|
| 34 |
This model was trained with SFT.
|
|
|
|
| 36 |
### Framework versions
|
| 37 |
|
| 38 |
- TRL: 0.23.0
|
| 39 |
+
- Transformers: 4.57.1
|
| 40 |
- Pytorch: 2.8.0
|
| 41 |
+
- Datasets: 4.3.0
|
| 42 |
- Tokenizers: 0.22.1
|
| 43 |
|
| 44 |
## Citations
|
adapter_config.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"alpha_pattern": {},
|
| 3 |
-
"
|
| 4 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
|
|
|
| 7 |
"eva_config": null,
|
| 8 |
"exclude_modules": null,
|
| 9 |
"fan_in_fan_out": false,
|
|
@@ -20,18 +27,19 @@
|
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
"modules_to_save": null,
|
| 22 |
"peft_type": "LORA",
|
|
|
|
| 23 |
"qalora_group_size": 16,
|
| 24 |
"r": 16,
|
| 25 |
"rank_pattern": {},
|
| 26 |
"revision": null,
|
| 27 |
"target_modules": [
|
| 28 |
-
"gate_proj",
|
| 29 |
"o_proj",
|
| 30 |
-
"
|
| 31 |
-
"up_proj",
|
| 32 |
"v_proj",
|
| 33 |
"k_proj",
|
| 34 |
-
"
|
|
|
|
|
|
|
| 35 |
],
|
| 36 |
"target_parameters": null,
|
| 37 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 1 |
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": {
|
| 6 |
+
"base_model_class": "MistralForCausalLM",
|
| 7 |
+
"parent_library": "transformers.models.mistral.modeling_mistral",
|
| 8 |
+
"unsloth_fixed": true
|
| 9 |
+
},
|
| 10 |
+
"base_model_name_or_path": "unsloth/mistral-7b-instruct-v0.3-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
+
"ensure_weight_tying": false,
|
| 14 |
"eva_config": null,
|
| 15 |
"exclude_modules": null,
|
| 16 |
"fan_in_fan_out": false,
|
|
|
|
| 27 |
"megatron_core": "megatron.core",
|
| 28 |
"modules_to_save": null,
|
| 29 |
"peft_type": "LORA",
|
| 30 |
+
"peft_version": "0.18.0",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
"r": 16,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
|
|
|
| 36 |
"o_proj",
|
| 37 |
+
"down_proj",
|
|
|
|
| 38 |
"v_proj",
|
| 39 |
"k_proj",
|
| 40 |
+
"q_proj",
|
| 41 |
+
"gate_proj",
|
| 42 |
+
"up_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 167832240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8264ef51349540391c8791d34755db267ace4ed3577d90965629495a6ee8544
|
| 3 |
size 167832240
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if messages[0]["role"] == "system" %}
|
| 2 |
+
{%- set system_message = messages[0]["content"] %}
|
| 3 |
+
{%- set loop_messages = messages[1:] %}
|
| 4 |
+
{%- else %}
|
| 5 |
+
{%- set loop_messages = messages %}
|
| 6 |
+
{%- endif %}
|
| 7 |
+
{%- if not tools is defined %}
|
| 8 |
+
{%- set tools = none %}
|
| 9 |
+
{%- endif %}
|
| 10 |
+
{%- set user_messages = loop_messages | selectattr("role", "equalto", "user") | list %}
|
| 11 |
+
|
| 12 |
+
{#- This block checks for alternating user/assistant messages, skipping tool calling messages #}
|
| 13 |
+
{%- set ns = namespace() %}
|
| 14 |
+
{%- set ns.index = 0 %}
|
| 15 |
+
{%- for message in loop_messages %}
|
| 16 |
+
{%- if not (message.role == "tool" or message.role == "tool_results" or (message.tool_calls is defined and message.tool_calls is not none)) %}
|
| 17 |
+
{%- if (message["role"] == "user") != (ns.index % 2 == 0) %}
|
| 18 |
+
{{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- set ns.index = ns.index + 1 %}
|
| 21 |
+
{%- endif %}
|
| 22 |
+
{%- endfor %}
|
| 23 |
+
|
| 24 |
+
{{- bos_token }}
|
| 25 |
+
{%- for message in loop_messages %}
|
| 26 |
+
{%- if message["role"] == "user" %}
|
| 27 |
+
{%- if tools is not none and (message == user_messages[-1]) %}
|
| 28 |
+
{{- "[AVAILABLE_TOOLS] [" }}
|
| 29 |
+
{%- for tool in tools %}
|
| 30 |
+
{%- set tool = tool.function %}
|
| 31 |
+
{{- '{"type": "function", "function": {' }}
|
| 32 |
+
{%- for key, val in tool.items() if key != "return" %}
|
| 33 |
+
{%- if val is string %}
|
| 34 |
+
{{- '"' + key + '": "' + val + '"' }}
|
| 35 |
+
{%- else %}
|
| 36 |
+
{{- '"' + key + '": ' + val|tojson }}
|
| 37 |
+
{%- endif %}
|
| 38 |
+
{%- if not loop.last %}
|
| 39 |
+
{{- ", " }}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- endfor %}
|
| 42 |
+
{{- "}}" }}
|
| 43 |
+
{%- if not loop.last %}
|
| 44 |
+
{{- ", " }}
|
| 45 |
+
{%- else %}
|
| 46 |
+
{{- "]" }}
|
| 47 |
+
{%- endif %}
|
| 48 |
+
{%- endfor %}
|
| 49 |
+
{{- "[/AVAILABLE_TOOLS]" }}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- if loop.last and system_message is defined %}
|
| 52 |
+
{{- "[INST] " + system_message + "\n\n" + message["content"] + "[/INST]" }}
|
| 53 |
+
{%- else %}
|
| 54 |
+
{{- "[INST] " + message["content"] + "[/INST]" }}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- elif message.tool_calls is defined and message.tool_calls is not none %}
|
| 57 |
+
{{- "[TOOL_CALLS] [" }}
|
| 58 |
+
{%- for tool_call in message.tool_calls %}
|
| 59 |
+
{%- set out = tool_call.function|tojson %}
|
| 60 |
+
{{- out[:-1] }}
|
| 61 |
+
{%- if not tool_call.id is defined or tool_call.id|length != 9 %}
|
| 62 |
+
{{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
|
| 63 |
+
{%- endif %}
|
| 64 |
+
{{- ', "id": "' + tool_call.id + '"}' }}
|
| 65 |
+
{%- if not loop.last %}
|
| 66 |
+
{{- ", " }}
|
| 67 |
+
{%- else %}
|
| 68 |
+
{{- "]" + eos_token }}
|
| 69 |
+
{%- endif %}
|
| 70 |
+
{%- endfor %}
|
| 71 |
+
{%- elif message["role"] == "assistant" %}
|
| 72 |
+
{{- " " + message["content"]|trim + eos_token}}
|
| 73 |
+
{%- elif message["role"] == "tool_results" or message["role"] == "tool" %}
|
| 74 |
+
{%- if message.content is defined and message.content.content is defined %}
|
| 75 |
+
{%- set content = message.content.content %}
|
| 76 |
+
{%- else %}
|
| 77 |
+
{%- set content = message.content %}
|
| 78 |
+
{%- endif %}
|
| 79 |
+
{{- '[TOOL_RESULTS] {"content": ' + content|string + ", " }}
|
| 80 |
+
{%- if not message.tool_call_id is defined or message.tool_call_id|length != 9 %}
|
| 81 |
+
{{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
|
| 82 |
+
{%- endif %}
|
| 83 |
+
{{- '"call_id": "' + message.tool_call_id + '"}[/TOOL_RESULTS]' }}
|
| 84 |
+
{%- else %}
|
| 85 |
+
{{- raise_exception("Only user and assistant roles are supported, with the exception of an initial optional system message!") }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- endfor %}
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 8192,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
@@ -6969,6 +6964,12 @@
|
|
| 6969 |
"id": "A",
|
| 6970 |
"type_id": 0
|
| 6971 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6972 |
}
|
| 6973 |
],
|
| 6974 |
"pair": [
|
|
@@ -6984,6 +6985,12 @@
|
|
| 6984 |
"type_id": 0
|
| 6985 |
}
|
| 6986 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6987 |
{
|
| 6988 |
"SpecialToken": {
|
| 6989 |
"id": "<s>",
|
|
@@ -6995,9 +7002,24 @@
|
|
| 6995 |
"id": "B",
|
| 6996 |
"type_id": 1
|
| 6997 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6998 |
}
|
| 6999 |
],
|
| 7000 |
"special_tokens": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7001 |
"<s>": {
|
| 7002 |
"id": "<s>",
|
| 7003 |
"ids": [
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
|
|
| 6964 |
"id": "A",
|
| 6965 |
"type_id": 0
|
| 6966 |
}
|
| 6967 |
+
},
|
| 6968 |
+
{
|
| 6969 |
+
"SpecialToken": {
|
| 6970 |
+
"id": "</s>",
|
| 6971 |
+
"type_id": 0
|
| 6972 |
+
}
|
| 6973 |
}
|
| 6974 |
],
|
| 6975 |
"pair": [
|
|
|
|
| 6985 |
"type_id": 0
|
| 6986 |
}
|
| 6987 |
},
|
| 6988 |
+
{
|
| 6989 |
+
"SpecialToken": {
|
| 6990 |
+
"id": "</s>",
|
| 6991 |
+
"type_id": 0
|
| 6992 |
+
}
|
| 6993 |
+
},
|
| 6994 |
{
|
| 6995 |
"SpecialToken": {
|
| 6996 |
"id": "<s>",
|
|
|
|
| 7002 |
"id": "B",
|
| 7003 |
"type_id": 1
|
| 7004 |
}
|
| 7005 |
+
},
|
| 7006 |
+
{
|
| 7007 |
+
"SpecialToken": {
|
| 7008 |
+
"id": "</s>",
|
| 7009 |
+
"type_id": 1
|
| 7010 |
+
}
|
| 7011 |
}
|
| 7012 |
],
|
| 7013 |
"special_tokens": {
|
| 7014 |
+
"</s>": {
|
| 7015 |
+
"id": "</s>",
|
| 7016 |
+
"ids": [
|
| 7017 |
+
2
|
| 7018 |
+
],
|
| 7019 |
+
"tokens": [
|
| 7020 |
+
"</s>"
|
| 7021 |
+
]
|
| 7022 |
+
},
|
| 7023 |
"<s>": {
|
| 7024 |
"id": "<s>",
|
| 7025 |
"ids": [
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
-
"add_eos_token":
|
| 4 |
"add_prefix_space": true,
|
| 5 |
"added_tokens_decoder": {
|
| 6 |
"0": {
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": true,
|
| 4 |
"add_prefix_space": true,
|
| 5 |
"added_tokens_decoder": {
|
| 6 |
"0": {
|
training_args.bin
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:91b195bbee031377a98da390b75c70b5f638541cb5f65dfa6119007797723266
|
| 3 |
+
size 6353
|