初始化项目,由ModelHub XC社区提供模型
Model: aryxn323/vaultagent Source: Original Platform
This commit is contained in:
63
stage1-sft/README.md
Normal file
63
stage1-sft/README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
base_model: unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
library_name: peft
|
||||
model_name: stage1-sft
|
||||
tags:
|
||||
- base_model:adapter:unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
- lora
|
||||
- sft
|
||||
- transformers
|
||||
- trl
|
||||
- unsloth
|
||||
licence: license
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# Model Card for stage1-sft
|
||||
|
||||
This model is a fine-tuned version of [unsloth/llama-3.1-8b-instruct-bnb-4bit](https://huggingface.co/unsloth/llama-3.1-8b-instruct-bnb-4bit).
|
||||
It has been trained using [TRL](https://github.com/huggingface/trl).
|
||||
|
||||
## Quick start
|
||||
|
||||
```python
|
||||
from transformers import pipeline
|
||||
|
||||
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?"
|
||||
generator = pipeline("text-generation", model="None", device="cuda")
|
||||
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
||||
print(output["generated_text"])
|
||||
```
|
||||
|
||||
## Training procedure
|
||||
|
||||
|
||||
|
||||
|
||||
This model was trained with SFT.
|
||||
|
||||
### Framework versions
|
||||
|
||||
- PEFT 0.19.1
|
||||
- TRL: 0.24.0
|
||||
- Transformers: 5.5.0
|
||||
- Pytorch: 2.10.0+cu128
|
||||
- Datasets: 4.3.0
|
||||
- Tokenizers: 0.22.2
|
||||
|
||||
## Citations
|
||||
|
||||
|
||||
|
||||
Cite TRL as:
|
||||
|
||||
```bibtex
|
||||
@misc{vonwerra2022trl,
|
||||
title = {{TRL: Transformer Reinforcement Learning}},
|
||||
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},
|
||||
year = 2020,
|
||||
journal = {GitHub repository},
|
||||
publisher = {GitHub},
|
||||
howpublished = {\url{https://github.com/huggingface/trl}}
|
||||
}
|
||||
```
|
||||
52
stage1-sft/adapter_config.json
Normal file
52
stage1-sft/adapter_config.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"alora_invocation_tokens": null,
|
||||
"alpha_pattern": {},
|
||||
"arrow_config": null,
|
||||
"auto_mapping": {
|
||||
"base_model_class": "LlamaForCausalLM",
|
||||
"parent_library": "transformers.models.llama.modeling_llama",
|
||||
"unsloth_fixed": true
|
||||
},
|
||||
"base_model_name_or_path": "unsloth/llama-3.1-8b-instruct-bnb-4bit",
|
||||
"bias": "none",
|
||||
"corda_config": null,
|
||||
"ensure_weight_tying": false,
|
||||
"eva_config": null,
|
||||
"exclude_modules": null,
|
||||
"fan_in_fan_out": false,
|
||||
"inference_mode": true,
|
||||
"init_lora_weights": true,
|
||||
"layer_replication": null,
|
||||
"layers_pattern": null,
|
||||
"layers_to_transform": null,
|
||||
"loftq_config": {},
|
||||
"lora_alpha": 64,
|
||||
"lora_bias": false,
|
||||
"lora_dropout": 0.05,
|
||||
"lora_ga_config": null,
|
||||
"megatron_config": null,
|
||||
"megatron_core": "megatron.core",
|
||||
"modules_to_save": null,
|
||||
"peft_type": "LORA",
|
||||
"peft_version": "0.19.1",
|
||||
"qalora_group_size": 16,
|
||||
"r": 32,
|
||||
"rank_pattern": {},
|
||||
"revision": null,
|
||||
"target_modules": [
|
||||
"down_proj",
|
||||
"up_proj",
|
||||
"k_proj",
|
||||
"o_proj",
|
||||
"q_proj",
|
||||
"v_proj",
|
||||
"gate_proj"
|
||||
],
|
||||
"target_parameters": null,
|
||||
"task_type": "CAUSAL_LM",
|
||||
"trainable_token_indices": null,
|
||||
"use_bdlora": null,
|
||||
"use_dora": false,
|
||||
"use_qalora": false,
|
||||
"use_rslora": false
|
||||
}
|
||||
3
stage1-sft/adapter_model.safetensors
Normal file
3
stage1-sft/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1923fc5740f8e2206b488ac3d937fdccbc09dc2882f041c6bb73e5c397a91679
|
||||
size 335604696
|
||||
109
stage1-sft/chat_template.jinja
Normal file
109
stage1-sft/chat_template.jinja
Normal file
@@ -0,0 +1,109 @@
|
||||
{{- bos_token }}
|
||||
{%- if custom_tools is defined %}
|
||||
{%- set tools = custom_tools %}
|
||||
{%- endif %}
|
||||
{%- if not tools_in_user_message is defined %}
|
||||
{%- set tools_in_user_message = true %}
|
||||
{%- endif %}
|
||||
{%- if not date_string is defined %}
|
||||
{%- set date_string = "26 Jul 2024" %}
|
||||
{%- endif %}
|
||||
{%- if not tools is defined %}
|
||||
{%- set tools = none %}
|
||||
{%- endif %}
|
||||
|
||||
{#- This block extracts the system message, so we can slot it into the right place. #}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{%- set system_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{%- set system_message = "" %}
|
||||
{%- endif %}
|
||||
|
||||
{#- System message + builtin tools #}
|
||||
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
||||
{%- if builtin_tools is defined or tools is not none %}
|
||||
{{- "Environment: ipython\n" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "\n\n"}}
|
||||
{%- endif %}
|
||||
{{- "Cutting Knowledge Date: December 2023\n" }}
|
||||
{{- "Today Date: " + date_string + "\n\n" }}
|
||||
{%- if tools is not none and not tools_in_user_message %}
|
||||
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{- system_message }}
|
||||
{{- "<|eot_id|>" }}
|
||||
|
||||
{#- Custom tools are passed in a user message with some extra guidance #}
|
||||
{%- if tools_in_user_message and not tools is none %}
|
||||
{#- Extract the first user message so we can plug it in here #}
|
||||
{%- if messages | length != 0 %}
|
||||
{%- set first_user_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
||||
{%- endif %}
|
||||
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
||||
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
||||
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{{- first_user_message + "<|eot_id|>"}}
|
||||
{%- endif %}
|
||||
|
||||
{%- for message in messages %}
|
||||
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
||||
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
||||
{%- elif 'tool_calls' in message %}
|
||||
{%- if not message.tool_calls|length == 1 %}
|
||||
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
||||
{%- endif %}
|
||||
{%- set tool_call = message.tool_calls[0].function %}
|
||||
{%- if builtin_tools is defined and tool_call.name in builtin_tools %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- "<|python_tag|>" + tool_call.name + ".call(" }}
|
||||
{%- for arg_name, arg_val in tool_call.arguments | items %}
|
||||
{{- arg_name + '="' + arg_val + '"' }}
|
||||
{%- if not loop.last %}
|
||||
{{- ", " }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- ")" }}
|
||||
{%- else %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- '{"name": "' + tool_call.name + '", ' }}
|
||||
{{- '"parameters": ' }}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{{- "}" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{#- This means we're in ipython mode #}
|
||||
{{- "<|eom_id|>" }}
|
||||
{%- else %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- elif message.role == "tool" or message.role == "ipython" %}
|
||||
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
||||
{%- if message.content is mapping or message.content is iterable %}
|
||||
{{- message.content | tojson }}
|
||||
{%- else %}
|
||||
{{- message.content }}
|
||||
{%- endif %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
||||
{%- endif %}
|
||||
210
stage1-sft/checkpoint-123/README.md
Normal file
210
stage1-sft/checkpoint-123/README.md
Normal file
@@ -0,0 +1,210 @@
|
||||
---
|
||||
base_model: unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
library_name: peft
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- base_model:adapter:unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
- lora
|
||||
- sft
|
||||
- transformers
|
||||
- trl
|
||||
- unsloth
|
||||
---
|
||||
|
||||
# Model Card for Model ID
|
||||
|
||||
<!-- Provide a quick summary of what the model is/does. -->
|
||||
|
||||
|
||||
|
||||
## Model Details
|
||||
|
||||
### Model Description
|
||||
|
||||
<!-- Provide a longer summary of what this model is. -->
|
||||
|
||||
|
||||
|
||||
- **Developed by:** [More Information Needed]
|
||||
- **Funded by [optional]:** [More Information Needed]
|
||||
- **Shared by [optional]:** [More Information Needed]
|
||||
- **Model type:** [More Information Needed]
|
||||
- **Language(s) (NLP):** [More Information Needed]
|
||||
- **License:** [More Information Needed]
|
||||
- **Finetuned from model [optional]:** [More Information Needed]
|
||||
|
||||
### Model Sources [optional]
|
||||
|
||||
<!-- Provide the basic links for the model. -->
|
||||
|
||||
- **Repository:** [More Information Needed]
|
||||
- **Paper [optional]:** [More Information Needed]
|
||||
- **Demo [optional]:** [More Information Needed]
|
||||
|
||||
## Uses
|
||||
|
||||
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
||||
|
||||
### Direct Use
|
||||
|
||||
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Downstream Use [optional]
|
||||
|
||||
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Out-of-Scope Use
|
||||
|
||||
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Bias, Risks, and Limitations
|
||||
|
||||
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Recommendations
|
||||
|
||||
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
||||
|
||||
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
||||
|
||||
## How to Get Started with the Model
|
||||
|
||||
Use the code below to get started with the model.
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Training Details
|
||||
|
||||
### Training Data
|
||||
|
||||
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Training Procedure
|
||||
|
||||
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
||||
|
||||
#### Preprocessing [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
|
||||
#### Training Hyperparameters
|
||||
|
||||
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
||||
|
||||
#### Speeds, Sizes, Times [optional]
|
||||
|
||||
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Evaluation
|
||||
|
||||
<!-- This section describes the evaluation protocols and provides the results. -->
|
||||
|
||||
### Testing Data, Factors & Metrics
|
||||
|
||||
#### Testing Data
|
||||
|
||||
<!-- This should link to a Dataset Card if possible. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Factors
|
||||
|
||||
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Metrics
|
||||
|
||||
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Results
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Summary
|
||||
|
||||
|
||||
|
||||
## Model Examination [optional]
|
||||
|
||||
<!-- Relevant interpretability work for the model goes here -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Environmental Impact
|
||||
|
||||
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
||||
|
||||
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
||||
|
||||
- **Hardware Type:** [More Information Needed]
|
||||
- **Hours used:** [More Information Needed]
|
||||
- **Cloud Provider:** [More Information Needed]
|
||||
- **Compute Region:** [More Information Needed]
|
||||
- **Carbon Emitted:** [More Information Needed]
|
||||
|
||||
## Technical Specifications [optional]
|
||||
|
||||
### Model Architecture and Objective
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Compute Infrastructure
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Hardware
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Software
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Citation [optional]
|
||||
|
||||
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
||||
|
||||
**BibTeX:**
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
**APA:**
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Glossary [optional]
|
||||
|
||||
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## More Information [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Model Card Authors [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Model Card Contact
|
||||
|
||||
[More Information Needed]
|
||||
### Framework versions
|
||||
|
||||
- PEFT 0.19.1
|
||||
52
stage1-sft/checkpoint-123/adapter_config.json
Normal file
52
stage1-sft/checkpoint-123/adapter_config.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"alora_invocation_tokens": null,
|
||||
"alpha_pattern": {},
|
||||
"arrow_config": null,
|
||||
"auto_mapping": {
|
||||
"base_model_class": "LlamaForCausalLM",
|
||||
"parent_library": "transformers.models.llama.modeling_llama",
|
||||
"unsloth_fixed": true
|
||||
},
|
||||
"base_model_name_or_path": "unsloth/llama-3.1-8b-instruct-bnb-4bit",
|
||||
"bias": "none",
|
||||
"corda_config": null,
|
||||
"ensure_weight_tying": false,
|
||||
"eva_config": null,
|
||||
"exclude_modules": null,
|
||||
"fan_in_fan_out": false,
|
||||
"inference_mode": true,
|
||||
"init_lora_weights": true,
|
||||
"layer_replication": null,
|
||||
"layers_pattern": null,
|
||||
"layers_to_transform": null,
|
||||
"loftq_config": {},
|
||||
"lora_alpha": 64,
|
||||
"lora_bias": false,
|
||||
"lora_dropout": 0.05,
|
||||
"lora_ga_config": null,
|
||||
"megatron_config": null,
|
||||
"megatron_core": "megatron.core",
|
||||
"modules_to_save": null,
|
||||
"peft_type": "LORA",
|
||||
"peft_version": "0.19.1",
|
||||
"qalora_group_size": 16,
|
||||
"r": 32,
|
||||
"rank_pattern": {},
|
||||
"revision": null,
|
||||
"target_modules": [
|
||||
"down_proj",
|
||||
"up_proj",
|
||||
"k_proj",
|
||||
"o_proj",
|
||||
"q_proj",
|
||||
"v_proj",
|
||||
"gate_proj"
|
||||
],
|
||||
"target_parameters": null,
|
||||
"task_type": "CAUSAL_LM",
|
||||
"trainable_token_indices": null,
|
||||
"use_bdlora": null,
|
||||
"use_dora": false,
|
||||
"use_qalora": false,
|
||||
"use_rslora": false
|
||||
}
|
||||
3
stage1-sft/checkpoint-123/adapter_model.safetensors
Normal file
3
stage1-sft/checkpoint-123/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1923fc5740f8e2206b488ac3d937fdccbc09dc2882f041c6bb73e5c397a91679
|
||||
size 335604696
|
||||
109
stage1-sft/checkpoint-123/chat_template.jinja
Normal file
109
stage1-sft/checkpoint-123/chat_template.jinja
Normal file
@@ -0,0 +1,109 @@
|
||||
{{- bos_token }}
|
||||
{%- if custom_tools is defined %}
|
||||
{%- set tools = custom_tools %}
|
||||
{%- endif %}
|
||||
{%- if not tools_in_user_message is defined %}
|
||||
{%- set tools_in_user_message = true %}
|
||||
{%- endif %}
|
||||
{%- if not date_string is defined %}
|
||||
{%- set date_string = "26 Jul 2024" %}
|
||||
{%- endif %}
|
||||
{%- if not tools is defined %}
|
||||
{%- set tools = none %}
|
||||
{%- endif %}
|
||||
|
||||
{#- This block extracts the system message, so we can slot it into the right place. #}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{%- set system_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{%- set system_message = "" %}
|
||||
{%- endif %}
|
||||
|
||||
{#- System message + builtin tools #}
|
||||
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
||||
{%- if builtin_tools is defined or tools is not none %}
|
||||
{{- "Environment: ipython\n" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "\n\n"}}
|
||||
{%- endif %}
|
||||
{{- "Cutting Knowledge Date: December 2023\n" }}
|
||||
{{- "Today Date: " + date_string + "\n\n" }}
|
||||
{%- if tools is not none and not tools_in_user_message %}
|
||||
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{- system_message }}
|
||||
{{- "<|eot_id|>" }}
|
||||
|
||||
{#- Custom tools are passed in a user message with some extra guidance #}
|
||||
{%- if tools_in_user_message and not tools is none %}
|
||||
{#- Extract the first user message so we can plug it in here #}
|
||||
{%- if messages | length != 0 %}
|
||||
{%- set first_user_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
||||
{%- endif %}
|
||||
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
||||
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
||||
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{{- first_user_message + "<|eot_id|>"}}
|
||||
{%- endif %}
|
||||
|
||||
{%- for message in messages %}
|
||||
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
||||
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
||||
{%- elif 'tool_calls' in message %}
|
||||
{%- if not message.tool_calls|length == 1 %}
|
||||
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
||||
{%- endif %}
|
||||
{%- set tool_call = message.tool_calls[0].function %}
|
||||
{%- if builtin_tools is defined and tool_call.name in builtin_tools %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- "<|python_tag|>" + tool_call.name + ".call(" }}
|
||||
{%- for arg_name, arg_val in tool_call.arguments | items %}
|
||||
{{- arg_name + '="' + arg_val + '"' }}
|
||||
{%- if not loop.last %}
|
||||
{{- ", " }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- ")" }}
|
||||
{%- else %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- '{"name": "' + tool_call.name + '", ' }}
|
||||
{{- '"parameters": ' }}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{{- "}" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{#- This means we're in ipython mode #}
|
||||
{{- "<|eom_id|>" }}
|
||||
{%- else %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- elif message.role == "tool" or message.role == "ipython" %}
|
||||
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
||||
{%- if message.content is mapping or message.content is iterable %}
|
||||
{{- message.content | tojson }}
|
||||
{%- else %}
|
||||
{{- message.content }}
|
||||
{%- endif %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
||||
{%- endif %}
|
||||
3
stage1-sft/checkpoint-123/optimizer.pt
Normal file
3
stage1-sft/checkpoint-123/optimizer.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c9016db3c4cfda1106af2147a2178a86a61e0b40fc96d4a6a7f9d1d7cb6794bb
|
||||
size 170925029
|
||||
3
stage1-sft/checkpoint-123/rng_state.pth
Normal file
3
stage1-sft/checkpoint-123/rng_state.pth
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fcb83bc864effafc363bd8229176c8fe863b8662d21b12ab9f406c0c212d3711
|
||||
size 14645
|
||||
3
stage1-sft/checkpoint-123/scaler.pt
Normal file
3
stage1-sft/checkpoint-123/scaler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:000d3c97163a196c971db119da9d64fc6e0161b9e1f5c073d76ed8f6dc020e45
|
||||
size 1383
|
||||
3
stage1-sft/checkpoint-123/scheduler.pt
Normal file
3
stage1-sft/checkpoint-123/scheduler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:562e0fad31141590d8b1dde06be733f12704d79d83c4895f5ece63a05bde994f
|
||||
size 1465
|
||||
BIN
stage1-sft/checkpoint-123/tokenizer.json
(Stored with Git LFS)
Normal file
BIN
stage1-sft/checkpoint-123/tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
2068
stage1-sft/checkpoint-123/tokenizer_config.json
Normal file
2068
stage1-sft/checkpoint-123/tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
258
stage1-sft/checkpoint-123/trainer_state.json
Normal file
258
stage1-sft/checkpoint-123/trainer_state.json
Normal file
@@ -0,0 +1,258 @@
|
||||
{
|
||||
"best_global_step": null,
|
||||
"best_metric": null,
|
||||
"best_model_checkpoint": null,
|
||||
"epoch": 3.0,
|
||||
"eval_steps": 20,
|
||||
"global_step": 123,
|
||||
"is_hyper_param_search": false,
|
||||
"is_local_process_zero": true,
|
||||
"is_world_process_zero": true,
|
||||
"log_history": [
|
||||
{
|
||||
"epoch": 0.12345679012345678,
|
||||
"grad_norm": 1.2859091758728027,
|
||||
"learning_rate": 6.153846153846155e-05,
|
||||
"loss": 1.9271413803100585,
|
||||
"step": 5
|
||||
},
|
||||
{
|
||||
"epoch": 0.24691358024691357,
|
||||
"grad_norm": 1.5679012537002563,
|
||||
"learning_rate": 0.00013846153846153847,
|
||||
"loss": 1.0801850318908692,
|
||||
"step": 10
|
||||
},
|
||||
{
|
||||
"epoch": 0.37037037037037035,
|
||||
"grad_norm": 1.2908324003219604,
|
||||
"learning_rate": 0.00019995921928281894,
|
||||
"loss": 0.3495574951171875,
|
||||
"step": 15
|
||||
},
|
||||
{
|
||||
"epoch": 0.49382716049382713,
|
||||
"grad_norm": 0.7217243313789368,
|
||||
"learning_rate": 0.00019853538358476932,
|
||||
"loss": 0.16377259492874147,
|
||||
"step": 20
|
||||
},
|
||||
{
|
||||
"epoch": 0.49382716049382713,
|
||||
"eval_loss": 0.11601115763187408,
|
||||
"eval_runtime": 31.3631,
|
||||
"eval_samples_per_second": 1.148,
|
||||
"eval_steps_per_second": 1.148,
|
||||
"step": 20
|
||||
},
|
||||
{
|
||||
"epoch": 0.6172839506172839,
|
||||
"grad_norm": 0.3617861270904541,
|
||||
"learning_rate": 0.00019510565162951537,
|
||||
"loss": 0.09877997040748596,
|
||||
"step": 25
|
||||
},
|
||||
{
|
||||
"epoch": 0.7407407407407407,
|
||||
"grad_norm": 0.2274777591228485,
|
||||
"learning_rate": 0.00018973984286913584,
|
||||
"loss": 0.07389195561408997,
|
||||
"step": 30
|
||||
},
|
||||
{
|
||||
"epoch": 0.8641975308641975,
|
||||
"grad_norm": 0.27818748354911804,
|
||||
"learning_rate": 0.0001825471896962774,
|
||||
"loss": 0.05940691232681274,
|
||||
"step": 35
|
||||
},
|
||||
{
|
||||
"epoch": 0.9876543209876543,
|
||||
"grad_norm": 0.3490578234195709,
|
||||
"learning_rate": 0.0001736741137876405,
|
||||
"loss": 0.061438959836959836,
|
||||
"step": 40
|
||||
},
|
||||
{
|
||||
"epoch": 0.9876543209876543,
|
||||
"eval_loss": 0.0585002563893795,
|
||||
"eval_runtime": 31.3163,
|
||||
"eval_samples_per_second": 1.15,
|
||||
"eval_steps_per_second": 1.15,
|
||||
"step": 40
|
||||
},
|
||||
{
|
||||
"epoch": 1.0987654320987654,
|
||||
"grad_norm": 0.3012445569038391,
|
||||
"learning_rate": 0.00016330124538088705,
|
||||
"loss": 0.0581305980682373,
|
||||
"step": 45
|
||||
},
|
||||
{
|
||||
"epoch": 1.2222222222222223,
|
||||
"grad_norm": 0.11500085145235062,
|
||||
"learning_rate": 0.0001516397461638962,
|
||||
"loss": 0.052752095460891726,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"epoch": 1.345679012345679,
|
||||
"grad_norm": 0.269403338432312,
|
||||
"learning_rate": 0.00013892701063173918,
|
||||
"loss": 0.055076193809509275,
|
||||
"step": 55
|
||||
},
|
||||
{
|
||||
"epoch": 1.4691358024691357,
|
||||
"grad_norm": 0.09471635520458221,
|
||||
"learning_rate": 0.00012542183341934872,
|
||||
"loss": 0.05141226053237915,
|
||||
"step": 60
|
||||
},
|
||||
{
|
||||
"epoch": 1.4691358024691357,
|
||||
"eval_loss": 0.05293593928217888,
|
||||
"eval_runtime": 30.9791,
|
||||
"eval_samples_per_second": 1.162,
|
||||
"eval_steps_per_second": 1.162,
|
||||
"step": 60
|
||||
},
|
||||
{
|
||||
"epoch": 1.5925925925925926,
|
||||
"grad_norm": 0.10104531794786453,
|
||||
"learning_rate": 0.00011139914098905406,
|
||||
"loss": 0.051540708541870116,
|
||||
"step": 65
|
||||
},
|
||||
{
|
||||
"epoch": 1.7160493827160495,
|
||||
"grad_norm": 0.1660510152578354,
|
||||
"learning_rate": 9.71443949206304e-05,
|
||||
"loss": 0.05324012041091919,
|
||||
"step": 70
|
||||
},
|
||||
{
|
||||
"epoch": 1.8395061728395061,
|
||||
"grad_norm": 0.08400571346282959,
|
||||
"learning_rate": 8.294778073673762e-05,
|
||||
"loss": 0.05077423453330994,
|
||||
"step": 75
|
||||
},
|
||||
{
|
||||
"epoch": 1.9629629629629628,
|
||||
"grad_norm": 0.10372541099786758,
|
||||
"learning_rate": 6.909830056250527e-05,
|
||||
"loss": 0.053344011306762695,
|
||||
"step": 80
|
||||
},
|
||||
{
|
||||
"epoch": 1.9629629629629628,
|
||||
"eval_loss": 0.049684152007102966,
|
||||
"eval_runtime": 30.9982,
|
||||
"eval_samples_per_second": 1.161,
|
||||
"eval_steps_per_second": 1.161,
|
||||
"step": 80
|
||||
},
|
||||
{
|
||||
"epoch": 2.074074074074074,
|
||||
"grad_norm": 0.10688848048448563,
|
||||
"learning_rate": 5.5877889875677845e-05,
|
||||
"loss": 0.04975573420524597,
|
||||
"step": 85
|
||||
},
|
||||
{
|
||||
"epoch": 2.197530864197531,
|
||||
"grad_norm": 0.09048020094633102,
|
||||
"learning_rate": 4.355567811332311e-05,
|
||||
"loss": 0.04622272253036499,
|
||||
"step": 90
|
||||
},
|
||||
{
|
||||
"epoch": 2.3209876543209877,
|
||||
"grad_norm": 0.10293108224868774,
|
||||
"learning_rate": 3.238250997259808e-05,
|
||||
"loss": 0.0488657683134079,
|
||||
"step": 95
|
||||
},
|
||||
{
|
||||
"epoch": 2.4444444444444446,
|
||||
"grad_norm": 0.0953356996178627,
|
||||
"learning_rate": 2.2585838936091754e-05,
|
||||
"loss": 0.04651863873004913,
|
||||
"step": 100
|
||||
},
|
||||
{
|
||||
"epoch": 2.4444444444444446,
|
||||
"eval_loss": 0.04865232855081558,
|
||||
"eval_runtime": 31.2086,
|
||||
"eval_samples_per_second": 1.154,
|
||||
"eval_steps_per_second": 1.154,
|
||||
"step": 100
|
||||
},
|
||||
{
|
||||
"epoch": 2.567901234567901,
|
||||
"grad_norm": 0.09343387186527252,
|
||||
"learning_rate": 1.4365096974841108e-05,
|
||||
"loss": 0.04507680833339691,
|
||||
"step": 105
|
||||
},
|
||||
{
|
||||
"epoch": 2.691358024691358,
|
||||
"grad_norm": 0.08703113347291946,
|
||||
"learning_rate": 7.887634688515e-06,
|
||||
"loss": 0.046429067850112915,
|
||||
"step": 110
|
||||
},
|
||||
{
|
||||
"epoch": 2.814814814814815,
|
||||
"grad_norm": 0.10216418653726578,
|
||||
"learning_rate": 3.2853145298042953e-06,
|
||||
"loss": 0.045730876922607425,
|
||||
"step": 115
|
||||
},
|
||||
{
|
||||
"epoch": 2.9382716049382713,
|
||||
"grad_norm": 0.08843164891004562,
|
||||
"learning_rate": 6.518264651449779e-07,
|
||||
"loss": 0.04855655431747437,
|
||||
"step": 120
|
||||
},
|
||||
{
|
||||
"epoch": 2.9382716049382713,
|
||||
"eval_loss": 0.048195596784353256,
|
||||
"eval_runtime": 31.1824,
|
||||
"eval_samples_per_second": 1.154,
|
||||
"eval_steps_per_second": 1.154,
|
||||
"step": 120
|
||||
},
|
||||
{
|
||||
"epoch": 3.0,
|
||||
"eval_loss": 0.04818538948893547,
|
||||
"eval_runtime": 31.1049,
|
||||
"eval_samples_per_second": 1.157,
|
||||
"eval_steps_per_second": 1.157,
|
||||
"step": 123
|
||||
}
|
||||
],
|
||||
"logging_steps": 5,
|
||||
"max_steps": 123,
|
||||
"num_input_tokens_seen": 0,
|
||||
"num_train_epochs": 3,
|
||||
"save_steps": 500,
|
||||
"stateful_callbacks": {
|
||||
"TrainerControl": {
|
||||
"args": {
|
||||
"should_epoch_stop": false,
|
||||
"should_evaluate": false,
|
||||
"should_log": false,
|
||||
"should_save": true,
|
||||
"should_training_stop": true
|
||||
},
|
||||
"attributes": {}
|
||||
}
|
||||
},
|
||||
"total_flos": 2.273314773204173e+16,
|
||||
"train_batch_size": 1,
|
||||
"trial_name": null,
|
||||
"trial_params": null
|
||||
}
|
||||
3
stage1-sft/checkpoint-123/training_args.bin
Normal file
3
stage1-sft/checkpoint-123/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:35f21193165fb35ee40dfb67dcb04982fd2affbd9c865841951ae75e975e484a
|
||||
size 5777
|
||||
210
stage1-sft/checkpoint-82/README.md
Normal file
210
stage1-sft/checkpoint-82/README.md
Normal file
@@ -0,0 +1,210 @@
|
||||
---
|
||||
base_model: unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
library_name: peft
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- base_model:adapter:unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
- lora
|
||||
- sft
|
||||
- transformers
|
||||
- trl
|
||||
- unsloth
|
||||
---
|
||||
|
||||
# Model Card for Model ID
|
||||
|
||||
<!-- Provide a quick summary of what the model is/does. -->
|
||||
|
||||
|
||||
|
||||
## Model Details
|
||||
|
||||
### Model Description
|
||||
|
||||
<!-- Provide a longer summary of what this model is. -->
|
||||
|
||||
|
||||
|
||||
- **Developed by:** [More Information Needed]
|
||||
- **Funded by [optional]:** [More Information Needed]
|
||||
- **Shared by [optional]:** [More Information Needed]
|
||||
- **Model type:** [More Information Needed]
|
||||
- **Language(s) (NLP):** [More Information Needed]
|
||||
- **License:** [More Information Needed]
|
||||
- **Finetuned from model [optional]:** [More Information Needed]
|
||||
|
||||
### Model Sources [optional]
|
||||
|
||||
<!-- Provide the basic links for the model. -->
|
||||
|
||||
- **Repository:** [More Information Needed]
|
||||
- **Paper [optional]:** [More Information Needed]
|
||||
- **Demo [optional]:** [More Information Needed]
|
||||
|
||||
## Uses
|
||||
|
||||
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
||||
|
||||
### Direct Use
|
||||
|
||||
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Downstream Use [optional]
|
||||
|
||||
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Out-of-Scope Use
|
||||
|
||||
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Bias, Risks, and Limitations
|
||||
|
||||
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Recommendations
|
||||
|
||||
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
||||
|
||||
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
||||
|
||||
## How to Get Started with the Model
|
||||
|
||||
Use the code below to get started with the model.
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Training Details
|
||||
|
||||
### Training Data
|
||||
|
||||
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Training Procedure
|
||||
|
||||
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
||||
|
||||
#### Preprocessing [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
|
||||
#### Training Hyperparameters
|
||||
|
||||
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
||||
|
||||
#### Speeds, Sizes, Times [optional]
|
||||
|
||||
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Evaluation
|
||||
|
||||
<!-- This section describes the evaluation protocols and provides the results. -->
|
||||
|
||||
### Testing Data, Factors & Metrics
|
||||
|
||||
#### Testing Data
|
||||
|
||||
<!-- This should link to a Dataset Card if possible. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Factors
|
||||
|
||||
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Metrics
|
||||
|
||||
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Results
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Summary
|
||||
|
||||
|
||||
|
||||
## Model Examination [optional]
|
||||
|
||||
<!-- Relevant interpretability work for the model goes here -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Environmental Impact
|
||||
|
||||
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
||||
|
||||
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
||||
|
||||
- **Hardware Type:** [More Information Needed]
|
||||
- **Hours used:** [More Information Needed]
|
||||
- **Cloud Provider:** [More Information Needed]
|
||||
- **Compute Region:** [More Information Needed]
|
||||
- **Carbon Emitted:** [More Information Needed]
|
||||
|
||||
## Technical Specifications [optional]
|
||||
|
||||
### Model Architecture and Objective
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
### Compute Infrastructure
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Hardware
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
#### Software
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Citation [optional]
|
||||
|
||||
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
||||
|
||||
**BibTeX:**
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
**APA:**
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Glossary [optional]
|
||||
|
||||
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## More Information [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Model Card Authors [optional]
|
||||
|
||||
[More Information Needed]
|
||||
|
||||
## Model Card Contact
|
||||
|
||||
[More Information Needed]
|
||||
### Framework versions
|
||||
|
||||
- PEFT 0.19.1
|
||||
52
stage1-sft/checkpoint-82/adapter_config.json
Normal file
52
stage1-sft/checkpoint-82/adapter_config.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"alora_invocation_tokens": null,
|
||||
"alpha_pattern": {},
|
||||
"arrow_config": null,
|
||||
"auto_mapping": {
|
||||
"base_model_class": "LlamaForCausalLM",
|
||||
"parent_library": "transformers.models.llama.modeling_llama",
|
||||
"unsloth_fixed": true
|
||||
},
|
||||
"base_model_name_or_path": "unsloth/llama-3.1-8b-instruct-bnb-4bit",
|
||||
"bias": "none",
|
||||
"corda_config": null,
|
||||
"ensure_weight_tying": false,
|
||||
"eva_config": null,
|
||||
"exclude_modules": null,
|
||||
"fan_in_fan_out": false,
|
||||
"inference_mode": true,
|
||||
"init_lora_weights": true,
|
||||
"layer_replication": null,
|
||||
"layers_pattern": null,
|
||||
"layers_to_transform": null,
|
||||
"loftq_config": {},
|
||||
"lora_alpha": 64,
|
||||
"lora_bias": false,
|
||||
"lora_dropout": 0.05,
|
||||
"lora_ga_config": null,
|
||||
"megatron_config": null,
|
||||
"megatron_core": "megatron.core",
|
||||
"modules_to_save": null,
|
||||
"peft_type": "LORA",
|
||||
"peft_version": "0.19.1",
|
||||
"qalora_group_size": 16,
|
||||
"r": 32,
|
||||
"rank_pattern": {},
|
||||
"revision": null,
|
||||
"target_modules": [
|
||||
"down_proj",
|
||||
"up_proj",
|
||||
"k_proj",
|
||||
"o_proj",
|
||||
"q_proj",
|
||||
"v_proj",
|
||||
"gate_proj"
|
||||
],
|
||||
"target_parameters": null,
|
||||
"task_type": "CAUSAL_LM",
|
||||
"trainable_token_indices": null,
|
||||
"use_bdlora": null,
|
||||
"use_dora": false,
|
||||
"use_qalora": false,
|
||||
"use_rslora": false
|
||||
}
|
||||
3
stage1-sft/checkpoint-82/adapter_model.safetensors
Normal file
3
stage1-sft/checkpoint-82/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b46704382fdd2d1c5c250e67a18bf1836e422df24ad7bd91322fb7498e84dee6
|
||||
size 335604696
|
||||
109
stage1-sft/checkpoint-82/chat_template.jinja
Normal file
109
stage1-sft/checkpoint-82/chat_template.jinja
Normal file
@@ -0,0 +1,109 @@
|
||||
{{- bos_token }}
|
||||
{%- if custom_tools is defined %}
|
||||
{%- set tools = custom_tools %}
|
||||
{%- endif %}
|
||||
{%- if not tools_in_user_message is defined %}
|
||||
{%- set tools_in_user_message = true %}
|
||||
{%- endif %}
|
||||
{%- if not date_string is defined %}
|
||||
{%- set date_string = "26 Jul 2024" %}
|
||||
{%- endif %}
|
||||
{%- if not tools is defined %}
|
||||
{%- set tools = none %}
|
||||
{%- endif %}
|
||||
|
||||
{#- This block extracts the system message, so we can slot it into the right place. #}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{%- set system_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{%- set system_message = "" %}
|
||||
{%- endif %}
|
||||
|
||||
{#- System message + builtin tools #}
|
||||
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
||||
{%- if builtin_tools is defined or tools is not none %}
|
||||
{{- "Environment: ipython\n" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "\n\n"}}
|
||||
{%- endif %}
|
||||
{{- "Cutting Knowledge Date: December 2023\n" }}
|
||||
{{- "Today Date: " + date_string + "\n\n" }}
|
||||
{%- if tools is not none and not tools_in_user_message %}
|
||||
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{- system_message }}
|
||||
{{- "<|eot_id|>" }}
|
||||
|
||||
{#- Custom tools are passed in a user message with some extra guidance #}
|
||||
{%- if tools_in_user_message and not tools is none %}
|
||||
{#- Extract the first user message so we can plug it in here #}
|
||||
{%- if messages | length != 0 %}
|
||||
{%- set first_user_message = messages[0]['content']|trim %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
||||
{%- endif %}
|
||||
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
||||
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
||||
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
||||
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||
{{- "Do not use variables.\n\n" }}
|
||||
{%- for t in tools %}
|
||||
{{- t | tojson(indent=4) }}
|
||||
{{- "\n\n" }}
|
||||
{%- endfor %}
|
||||
{{- first_user_message + "<|eot_id|>"}}
|
||||
{%- endif %}
|
||||
|
||||
{%- for message in messages %}
|
||||
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
||||
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
||||
{%- elif 'tool_calls' in message %}
|
||||
{%- if not message.tool_calls|length == 1 %}
|
||||
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
||||
{%- endif %}
|
||||
{%- set tool_call = message.tool_calls[0].function %}
|
||||
{%- if builtin_tools is defined and tool_call.name in builtin_tools %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- "<|python_tag|>" + tool_call.name + ".call(" }}
|
||||
{%- for arg_name, arg_val in tool_call.arguments | items %}
|
||||
{{- arg_name + '="' + arg_val + '"' }}
|
||||
{%- if not loop.last %}
|
||||
{{- ", " }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- ")" }}
|
||||
{%- else %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||
{{- '{"name": "' + tool_call.name + '", ' }}
|
||||
{{- '"parameters": ' }}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{{- "}" }}
|
||||
{%- endif %}
|
||||
{%- if builtin_tools is defined %}
|
||||
{#- This means we're in ipython mode #}
|
||||
{{- "<|eom_id|>" }}
|
||||
{%- else %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- elif message.role == "tool" or message.role == "ipython" %}
|
||||
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
||||
{%- if message.content is mapping or message.content is iterable %}
|
||||
{{- message.content | tojson }}
|
||||
{%- else %}
|
||||
{{- message.content }}
|
||||
{%- endif %}
|
||||
{{- "<|eot_id|>" }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
||||
{%- endif %}
|
||||
3
stage1-sft/checkpoint-82/optimizer.pt
Normal file
3
stage1-sft/checkpoint-82/optimizer.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6f0d9d58f57b1790be8b6ecdb6d67a77289ce1b07783c9a55685be3264084aa9
|
||||
size 170925029
|
||||
3
stage1-sft/checkpoint-82/rng_state.pth
Normal file
3
stage1-sft/checkpoint-82/rng_state.pth
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e65c3eb84d549541d56e5a170dbb45492cfbf9994b239ef287bb543f28e1e83
|
||||
size 14645
|
||||
3
stage1-sft/checkpoint-82/scaler.pt
Normal file
3
stage1-sft/checkpoint-82/scaler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3011c3980b7b6e77f31ea70ef726a3c9b31792876b41648eec1b72466a39235a
|
||||
size 1383
|
||||
3
stage1-sft/checkpoint-82/scheduler.pt
Normal file
3
stage1-sft/checkpoint-82/scheduler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80a83d2b534f719873fe6d970948d4fa96db0a8fde9b749bb75e2a7bab5a0504
|
||||
size 1465
|
||||
BIN
stage1-sft/checkpoint-82/tokenizer.json
(Stored with Git LFS)
Normal file
BIN
stage1-sft/checkpoint-82/tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
2068
stage1-sft/checkpoint-82/tokenizer_config.json
Normal file
2068
stage1-sft/checkpoint-82/tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
178
stage1-sft/checkpoint-82/trainer_state.json
Normal file
178
stage1-sft/checkpoint-82/trainer_state.json
Normal file
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"best_global_step": null,
|
||||
"best_metric": null,
|
||||
"best_model_checkpoint": null,
|
||||
"epoch": 2.0,
|
||||
"eval_steps": 20,
|
||||
"global_step": 82,
|
||||
"is_hyper_param_search": false,
|
||||
"is_local_process_zero": true,
|
||||
"is_world_process_zero": true,
|
||||
"log_history": [
|
||||
{
|
||||
"epoch": 0.12345679012345678,
|
||||
"grad_norm": 1.2859091758728027,
|
||||
"learning_rate": 6.153846153846155e-05,
|
||||
"loss": 1.9271413803100585,
|
||||
"step": 5
|
||||
},
|
||||
{
|
||||
"epoch": 0.24691358024691357,
|
||||
"grad_norm": 1.5679012537002563,
|
||||
"learning_rate": 0.00013846153846153847,
|
||||
"loss": 1.0801850318908692,
|
||||
"step": 10
|
||||
},
|
||||
{
|
||||
"epoch": 0.37037037037037035,
|
||||
"grad_norm": 1.2908324003219604,
|
||||
"learning_rate": 0.00019995921928281894,
|
||||
"loss": 0.3495574951171875,
|
||||
"step": 15
|
||||
},
|
||||
{
|
||||
"epoch": 0.49382716049382713,
|
||||
"grad_norm": 0.7217243313789368,
|
||||
"learning_rate": 0.00019853538358476932,
|
||||
"loss": 0.16377259492874147,
|
||||
"step": 20
|
||||
},
|
||||
{
|
||||
"epoch": 0.49382716049382713,
|
||||
"eval_loss": 0.11601115763187408,
|
||||
"eval_runtime": 31.3631,
|
||||
"eval_samples_per_second": 1.148,
|
||||
"eval_steps_per_second": 1.148,
|
||||
"step": 20
|
||||
},
|
||||
{
|
||||
"epoch": 0.6172839506172839,
|
||||
"grad_norm": 0.3617861270904541,
|
||||
"learning_rate": 0.00019510565162951537,
|
||||
"loss": 0.09877997040748596,
|
||||
"step": 25
|
||||
},
|
||||
{
|
||||
"epoch": 0.7407407407407407,
|
||||
"grad_norm": 0.2274777591228485,
|
||||
"learning_rate": 0.00018973984286913584,
|
||||
"loss": 0.07389195561408997,
|
||||
"step": 30
|
||||
},
|
||||
{
|
||||
"epoch": 0.8641975308641975,
|
||||
"grad_norm": 0.27818748354911804,
|
||||
"learning_rate": 0.0001825471896962774,
|
||||
"loss": 0.05940691232681274,
|
||||
"step": 35
|
||||
},
|
||||
{
|
||||
"epoch": 0.9876543209876543,
|
||||
"grad_norm": 0.3490578234195709,
|
||||
"learning_rate": 0.0001736741137876405,
|
||||
"loss": 0.061438959836959836,
|
||||
"step": 40
|
||||
},
|
||||
{
|
||||
"epoch": 0.9876543209876543,
|
||||
"eval_loss": 0.0585002563893795,
|
||||
"eval_runtime": 31.3163,
|
||||
"eval_samples_per_second": 1.15,
|
||||
"eval_steps_per_second": 1.15,
|
||||
"step": 40
|
||||
},
|
||||
{
|
||||
"epoch": 1.0987654320987654,
|
||||
"grad_norm": 0.3012445569038391,
|
||||
"learning_rate": 0.00016330124538088705,
|
||||
"loss": 0.0581305980682373,
|
||||
"step": 45
|
||||
},
|
||||
{
|
||||
"epoch": 1.2222222222222223,
|
||||
"grad_norm": 0.11500085145235062,
|
||||
"learning_rate": 0.0001516397461638962,
|
||||
"loss": 0.052752095460891726,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"epoch": 1.345679012345679,
|
||||
"grad_norm": 0.269403338432312,
|
||||
"learning_rate": 0.00013892701063173918,
|
||||
"loss": 0.055076193809509275,
|
||||
"step": 55
|
||||
},
|
||||
{
|
||||
"epoch": 1.4691358024691357,
|
||||
"grad_norm": 0.09471635520458221,
|
||||
"learning_rate": 0.00012542183341934872,
|
||||
"loss": 0.05141226053237915,
|
||||
"step": 60
|
||||
},
|
||||
{
|
||||
"epoch": 1.4691358024691357,
|
||||
"eval_loss": 0.05293593928217888,
|
||||
"eval_runtime": 30.9791,
|
||||
"eval_samples_per_second": 1.162,
|
||||
"eval_steps_per_second": 1.162,
|
||||
"step": 60
|
||||
},
|
||||
{
|
||||
"epoch": 1.5925925925925926,
|
||||
"grad_norm": 0.10104531794786453,
|
||||
"learning_rate": 0.00011139914098905406,
|
||||
"loss": 0.051540708541870116,
|
||||
"step": 65
|
||||
},
|
||||
{
|
||||
"epoch": 1.7160493827160495,
|
||||
"grad_norm": 0.1660510152578354,
|
||||
"learning_rate": 9.71443949206304e-05,
|
||||
"loss": 0.05324012041091919,
|
||||
"step": 70
|
||||
},
|
||||
{
|
||||
"epoch": 1.8395061728395061,
|
||||
"grad_norm": 0.08400571346282959,
|
||||
"learning_rate": 8.294778073673762e-05,
|
||||
"loss": 0.05077423453330994,
|
||||
"step": 75
|
||||
},
|
||||
{
|
||||
"epoch": 1.9629629629629628,
|
||||
"grad_norm": 0.10372541099786758,
|
||||
"learning_rate": 6.909830056250527e-05,
|
||||
"loss": 0.053344011306762695,
|
||||
"step": 80
|
||||
},
|
||||
{
|
||||
"epoch": 1.9629629629629628,
|
||||
"eval_loss": 0.049684152007102966,
|
||||
"eval_runtime": 30.9982,
|
||||
"eval_samples_per_second": 1.161,
|
||||
"eval_steps_per_second": 1.161,
|
||||
"step": 80
|
||||
}
|
||||
],
|
||||
"logging_steps": 5,
|
||||
"max_steps": 123,
|
||||
"num_input_tokens_seen": 0,
|
||||
"num_train_epochs": 3,
|
||||
"save_steps": 500,
|
||||
"stateful_callbacks": {
|
||||
"TrainerControl": {
|
||||
"args": {
|
||||
"should_epoch_stop": false,
|
||||
"should_evaluate": false,
|
||||
"should_log": false,
|
||||
"should_save": true,
|
||||
"should_training_stop": false
|
||||
},
|
||||
"attributes": {}
|
||||
}
|
||||
},
|
||||
"total_flos": 1.5155431821361152e+16,
|
||||
"train_batch_size": 1,
|
||||
"trial_name": null,
|
||||
"trial_params": null
|
||||
}
|
||||
3
stage1-sft/checkpoint-82/training_args.bin
Normal file
3
stage1-sft/checkpoint-82/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:35f21193165fb35ee40dfb67dcb04982fd2affbd9c865841951ae75e975e484a
|
||||
size 5777
|
||||
BIN
stage1-sft/tokenizer.json
(Stored with Git LFS)
Normal file
BIN
stage1-sft/tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
2068
stage1-sft/tokenizer_config.json
Normal file
2068
stage1-sft/tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
3
stage1-sft/training_args.bin
Normal file
3
stage1-sft/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:35f21193165fb35ee40dfb67dcb04982fd2affbd9c865841951ae75e975e484a
|
||||
size 5777
|
||||
Reference in New Issue
Block a user