Training in progress, step 255
Browse files- README.md +58 -0
- adapter_config.json +39 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +87 -0
- runs/Aug23_11-12-51_28d13cc003fb/events.out.tfevents.1755947573.28d13cc003fb.2197.0 +3 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +0 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.3
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: Prompt-Architect-Mistral-7B-v1
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for Prompt-Architect-Mistral-7B-v1
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
+
generator = pipeline("text-generation", model="POB247/Prompt-Architect-Mistral-7B-v1", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
[<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/pob2471011-legacy-value-/huggingface/runs/7xej9d41)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.55.2
|
| 39 |
+
- Pytorch: 2.8.0+cu126
|
| 40 |
+
- Datasets: 4.0.0
|
| 41 |
+
- Tokenizers: 0.21.4
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
adapter_config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "mistralai/Mistral-7B-Instruct-v0.3",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"corda_config": null,
|
| 7 |
+
"eva_config": null,
|
| 8 |
+
"exclude_modules": null,
|
| 9 |
+
"fan_in_fan_out": false,
|
| 10 |
+
"inference_mode": true,
|
| 11 |
+
"init_lora_weights": true,
|
| 12 |
+
"layer_replication": null,
|
| 13 |
+
"layers_pattern": null,
|
| 14 |
+
"layers_to_transform": null,
|
| 15 |
+
"loftq_config": {},
|
| 16 |
+
"lora_alpha": 32,
|
| 17 |
+
"lora_bias": false,
|
| 18 |
+
"lora_dropout": 0.05,
|
| 19 |
+
"megatron_config": null,
|
| 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 |
+
"k_proj",
|
| 29 |
+
"v_proj",
|
| 30 |
+
"o_proj",
|
| 31 |
+
"q_proj"
|
| 32 |
+
],
|
| 33 |
+
"target_parameters": null,
|
| 34 |
+
"task_type": "CAUSAL_LM",
|
| 35 |
+
"trainable_token_indices": null,
|
| 36 |
+
"use_dora": false,
|
| 37 |
+
"use_qalora": false,
|
| 38 |
+
"use_rslora": false
|
| 39 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c29a2db3647ca3486182396f7555f778c5eac0027f11c47d0c7126aeb096ad4
|
| 3 |
+
size 54560368
|
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 %}
|
runs/Aug23_11-12-51_28d13cc003fb/events.out.tfevents.1755947573.28d13cc003fb.2197.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb1905cceb6419f5522cacf4f554b3a617354b826f46cc24a2e2500bd3759e2e
|
| 3 |
+
size 9648
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"unk_token": {
|
| 17 |
+
"content": "<unk>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37f00374dea48658ee8f5d0f21895b9bc55cb0103939607c8185bfd1c6ca1f89
|
| 3 |
+
size 587404
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13c2071fc3712abc81f8ee25892d556a9755b76cf337677ef1c1f0652abd9bce
|
| 3 |
+
size 6161
|