初始化项目,由ModelHub XC社区提供模型
Model: aryxn323/vaultagent Source: Original Platform
This commit is contained in:
73
stage2-grpo/README.md
Normal file
73
stage2-grpo/README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
base_model: unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
library_name: peft
|
||||
model_name: stage2-grpo
|
||||
tags:
|
||||
- base_model:adapter:unsloth/llama-3.1-8b-instruct-bnb-4bit
|
||||
- grpo
|
||||
- lora
|
||||
- transformers
|
||||
- trl
|
||||
- unsloth
|
||||
licence: license
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# Model Card for stage2-grpo
|
||||
|
||||
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 GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
|
||||
|
||||
### 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 GRPO as:
|
||||
|
||||
```bibtex
|
||||
@article{shao2024deepseekmath,
|
||||
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
|
||||
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
|
||||
year = 2024,
|
||||
eprint = {arXiv:2402.03300},
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
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
stage2-grpo/adapter_config.json
Normal file
52
stage2-grpo/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": [
|
||||
"o_proj",
|
||||
"q_proj",
|
||||
"k_proj",
|
||||
"v_proj",
|
||||
"up_proj",
|
||||
"down_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
stage2-grpo/adapter_model.safetensors
Normal file
3
stage2-grpo/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30b3a5dedb2c7f6db6ef56e90a8989068cc978237507d33ebf2c577b27eb6ff7
|
||||
size 335604696
|
||||
109
stage2-grpo/chat_template.jinja
Normal file
109
stage2-grpo/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
stage2-grpo/checkpoint-90/README.md
Normal file
210
stage2-grpo/checkpoint-90/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
|
||||
- grpo
|
||||
- lora
|
||||
- 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
stage2-grpo/checkpoint-90/adapter_config.json
Normal file
52
stage2-grpo/checkpoint-90/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": [
|
||||
"o_proj",
|
||||
"q_proj",
|
||||
"k_proj",
|
||||
"v_proj",
|
||||
"up_proj",
|
||||
"down_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
stage2-grpo/checkpoint-90/adapter_model.safetensors
Normal file
3
stage2-grpo/checkpoint-90/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30b3a5dedb2c7f6db6ef56e90a8989068cc978237507d33ebf2c577b27eb6ff7
|
||||
size 335604696
|
||||
109
stage2-grpo/checkpoint-90/chat_template.jinja
Normal file
109
stage2-grpo/checkpoint-90/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
stage2-grpo/checkpoint-90/optimizer.pt
Normal file
3
stage2-grpo/checkpoint-90/optimizer.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4b97748b2f004acf8c00c2c82a88ab7a40dc55b58ef8994da99479b964ec4cda
|
||||
size 170925029
|
||||
3
stage2-grpo/checkpoint-90/rng_state.pth
Normal file
3
stage2-grpo/checkpoint-90/rng_state.pth
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c40bb986a3edfb84af8a43b32eac7ec92194afb4fd05b33198a310e00fb3f59
|
||||
size 14645
|
||||
3
stage2-grpo/checkpoint-90/scaler.pt
Normal file
3
stage2-grpo/checkpoint-90/scaler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9fcfce7e32b31bead77e9e963d8e602c77a653a75c54ecbe876542fbeeba3fdc
|
||||
size 1383
|
||||
3
stage2-grpo/checkpoint-90/scheduler.pt
Normal file
3
stage2-grpo/checkpoint-90/scheduler.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54fc26fc8beada4d03ff10085b39a0a87f17ae896d977f9d181be9a4e684e655
|
||||
size 1465
|
||||
3
stage2-grpo/checkpoint-90/tokenizer.json
Normal file
3
stage2-grpo/checkpoint-90/tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a65c6c5f9764771aa485e6a1f5e63d7d9af8477fe0777148c17476ecb2e09a05
|
||||
size 17210099
|
||||
2068
stage2-grpo/checkpoint-90/tokenizer_config.json
Normal file
2068
stage2-grpo/checkpoint-90/tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
277
stage2-grpo/checkpoint-90/trainer_state.json
Normal file
277
stage2-grpo/checkpoint-90/trainer_state.json
Normal file
@@ -0,0 +1,277 @@
|
||||
{
|
||||
"best_global_step": null,
|
||||
"best_metric": null,
|
||||
"best_model_checkpoint": null,
|
||||
"epoch": 1.0,
|
||||
"eval_steps": 500,
|
||||
"global_step": 90,
|
||||
"is_hyper_param_search": false,
|
||||
"is_local_process_zero": true,
|
||||
"is_world_process_zero": true,
|
||||
"log_history": [
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 760.425,
|
||||
"completions/clipped_ratio": 0.95,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 246.6,
|
||||
"completions/mean_length": 760.425,
|
||||
"completions/mean_terminated_length": 246.6,
|
||||
"completions/min_length": 707.4,
|
||||
"completions/min_terminated_length": 246.6,
|
||||
"epoch": 0.1111111111111111,
|
||||
"frac_reward_zero_std": 0.55,
|
||||
"grad_norm": 0.001028538914397359,
|
||||
"kl": 0.5006327688694,
|
||||
"learning_rate": 4.972729020927866e-06,
|
||||
"loss": 0.0005006341263651848,
|
||||
"num_tokens": 80284.0,
|
||||
"reward": 0.19812500327825547,
|
||||
"reward_std": 0.14407300129532813,
|
||||
"rewards/logged_reward/mean": 0.19812500514090062,
|
||||
"rewards/logged_reward/std": 0.4103552341461182,
|
||||
"step": 10
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 754.175,
|
||||
"completions/clipped_ratio": 0.925,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 292.2,
|
||||
"completions/mean_length": 754.175,
|
||||
"completions/mean_terminated_length": 286.85,
|
||||
"completions/min_length": 665.5,
|
||||
"completions/min_terminated_length": 281.5,
|
||||
"epoch": 0.2222222222222222,
|
||||
"frac_reward_zero_std": 0.675,
|
||||
"grad_norm": 0.03615415841341019,
|
||||
"kl": 0.5185602981597185,
|
||||
"learning_rate": 4.672722365763821e-06,
|
||||
"loss": 0.0005185471847653389,
|
||||
"num_tokens": 159008.0,
|
||||
"reward": 0.3037499986588955,
|
||||
"reward_std": 0.11313708312809467,
|
||||
"rewards/logged_reward/mean": 0.30374999940395353,
|
||||
"rewards/logged_reward/std": 0.4017797887325287,
|
||||
"step": 20
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 768.0,
|
||||
"completions/clipped_ratio": 1.0,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 0.0,
|
||||
"completions/mean_length": 768.0,
|
||||
"completions/mean_terminated_length": 0.0,
|
||||
"completions/min_length": 768.0,
|
||||
"completions/min_terminated_length": 0.0,
|
||||
"epoch": 0.3333333333333333,
|
||||
"frac_reward_zero_std": 0.725,
|
||||
"grad_norm": 0.17221924662590027,
|
||||
"kl": 0.5021876730024815,
|
||||
"learning_rate": 4.079277515633127e-06,
|
||||
"loss": 0.0005021758377552032,
|
||||
"num_tokens": 239920.0,
|
||||
"reward": 0.39937499910593033,
|
||||
"reward_std": 0.04154252391308546,
|
||||
"rewards/logged_reward/mean": 0.3993750035762787,
|
||||
"rewards/logged_reward/std": 0.3457350268959999,
|
||||
"step": 30
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 763.45,
|
||||
"completions/clipped_ratio": 0.9875,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 40.4,
|
||||
"completions/mean_length": 763.45,
|
||||
"completions/mean_terminated_length": 40.4,
|
||||
"completions/min_length": 731.6,
|
||||
"completions/min_terminated_length": 40.4,
|
||||
"epoch": 0.4444444444444444,
|
||||
"frac_reward_zero_std": 0.85,
|
||||
"grad_norm": 0.008656619116663933,
|
||||
"kl": 0.46648566871881486,
|
||||
"learning_rate": 3.272542485937369e-06,
|
||||
"loss": 0.0004664875566959381,
|
||||
"num_tokens": 320264.0,
|
||||
"reward": 0.39062500596046446,
|
||||
"reward_std": 0.03977475762367248,
|
||||
"rewards/logged_reward/mean": 0.39062500447034837,
|
||||
"rewards/logged_reward/std": 0.271591111831367,
|
||||
"step": 40
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 763.0,
|
||||
"completions/clipped_ratio": 0.975,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 113.6,
|
||||
"completions/mean_length": 763.0,
|
||||
"completions/mean_terminated_length": 113.6,
|
||||
"completions/min_length": 728.0,
|
||||
"completions/min_terminated_length": 113.6,
|
||||
"epoch": 0.5555555555555556,
|
||||
"frac_reward_zero_std": 0.725,
|
||||
"grad_norm": 0.0014952127821743488,
|
||||
"kl": 0.47636983878910544,
|
||||
"learning_rate": 2.3614713127100752e-06,
|
||||
"loss": 0.0004763755947351456,
|
||||
"num_tokens": 400450.0,
|
||||
"reward": 0.4381250113248825,
|
||||
"reward_std": 0.07689785957336426,
|
||||
"rewards/logged_reward/mean": 0.4381250113248825,
|
||||
"rewards/logged_reward/std": 0.355089807510376,
|
||||
"step": 50
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 739.475,
|
||||
"completions/clipped_ratio": 0.875,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 418.3,
|
||||
"completions/mean_length": 739.475,
|
||||
"completions/mean_terminated_length": 384.15,
|
||||
"completions/min_length": 580.4,
|
||||
"completions/min_terminated_length": 350.0,
|
||||
"epoch": 0.6666666666666666,
|
||||
"frac_reward_zero_std": 0.9,
|
||||
"grad_norm": 0.1433563530445099,
|
||||
"kl": 0.49970625154674053,
|
||||
"learning_rate": 1.4691092063152417e-06,
|
||||
"loss": 0.0004996967501938343,
|
||||
"num_tokens": 478220.0,
|
||||
"reward": 0.3912500023841858,
|
||||
"reward_std": 0.026516504772007465,
|
||||
"rewards/logged_reward/mean": 0.3912500023841858,
|
||||
"rewards/logged_reward/std": 0.3306365102529526,
|
||||
"step": 60
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 737.5,
|
||||
"completions/clipped_ratio": 0.8375,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 433.7,
|
||||
"completions/mean_length": 737.5,
|
||||
"completions/mean_terminated_length": 397.225,
|
||||
"completions/min_length": 581.3,
|
||||
"completions/min_terminated_length": 350.9,
|
||||
"epoch": 0.7777777777777778,
|
||||
"frac_reward_zero_std": 1.0,
|
||||
"grad_norm": 0.0008722825441509485,
|
||||
"kl": 0.4948728669434786,
|
||||
"learning_rate": 7.159746139706194e-07,
|
||||
"loss": 0.0004948728252202273,
|
||||
"num_tokens": 555874.0,
|
||||
"reward": 0.34500000476837156,
|
||||
"reward_std": 0.0,
|
||||
"rewards/logged_reward/mean": 0.34500000476837156,
|
||||
"rewards/logged_reward/std": 0.31715869903564453,
|
||||
"step": 70
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 754.8875,
|
||||
"completions/clipped_ratio": 0.9,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 318.1,
|
||||
"completions/mean_length": 754.8875,
|
||||
"completions/mean_terminated_length": 309.18333740234374,
|
||||
"completions/min_length": 680.6,
|
||||
"completions/min_terminated_length": 296.6,
|
||||
"epoch": 0.8888888888888888,
|
||||
"frac_reward_zero_std": 0.95,
|
||||
"grad_norm": 0.1149626076221466,
|
||||
"kl": 0.47000304274260996,
|
||||
"learning_rate": 2.0378253563519247e-07,
|
||||
"loss": 0.00047000362537801265,
|
||||
"num_tokens": 634531.0,
|
||||
"reward": 0.3325000084936619,
|
||||
"reward_std": 0.005303300172090531,
|
||||
"rewards/logged_reward/mean": 0.3325000084936619,
|
||||
"rewards/logged_reward/std": 0.25604055523872377,
|
||||
"step": 80
|
||||
},
|
||||
{
|
||||
"clip_ratio/high_max": 0.0,
|
||||
"clip_ratio/high_mean": 0.0,
|
||||
"clip_ratio/low_mean": 0.0,
|
||||
"clip_ratio/low_min": 0.0,
|
||||
"clip_ratio/region_mean": 0.0,
|
||||
"completion_length": 751.3375,
|
||||
"completions/clipped_ratio": 0.925,
|
||||
"completions/max_length": 768.0,
|
||||
"completions/max_terminated_length": 192.5,
|
||||
"completions/mean_length": 751.3375,
|
||||
"completions/mean_terminated_length": 178.55,
|
||||
"completions/min_length": 701.2,
|
||||
"completions/min_terminated_length": 163.6,
|
||||
"epoch": 1.0,
|
||||
"frac_reward_zero_std": 0.95,
|
||||
"grad_norm": 0.08985413610935211,
|
||||
"kl": 0.503129281103611,
|
||||
"learning_rate": 1.707349642442735e-09,
|
||||
"loss": 0.0005031307693570853,
|
||||
"num_tokens": 713612.0,
|
||||
"reward": 0.37500000521540644,
|
||||
"reward_std": 0.02121320366859436,
|
||||
"rewards/logged_reward/mean": 0.37500000521540644,
|
||||
"rewards/logged_reward/std": 0.3066870108246803,
|
||||
"step": 90
|
||||
}
|
||||
],
|
||||
"logging_steps": 10,
|
||||
"max_steps": 90,
|
||||
"num_input_tokens_seen": 713612,
|
||||
"num_train_epochs": 1,
|
||||
"save_steps": 200,
|
||||
"stateful_callbacks": {
|
||||
"TrainerControl": {
|
||||
"args": {
|
||||
"should_epoch_stop": false,
|
||||
"should_evaluate": false,
|
||||
"should_log": false,
|
||||
"should_save": true,
|
||||
"should_training_stop": true
|
||||
},
|
||||
"attributes": {}
|
||||
}
|
||||
},
|
||||
"total_flos": 0.0,
|
||||
"train_batch_size": 1,
|
||||
"trial_name": null,
|
||||
"trial_params": null
|
||||
}
|
||||
3
stage2-grpo/checkpoint-90/training_args.bin
Normal file
3
stage2-grpo/checkpoint-90/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:98fce3384f4e8f6d9c7f17de43938ea9940220db4e5ba68af11825025f98f6cd
|
||||
size 6737
|
||||
3
stage2-grpo/tokenizer.json
Normal file
3
stage2-grpo/tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a65c6c5f9764771aa485e6a1f5e63d7d9af8477fe0777148c17476ecb2e09a05
|
||||
size 17210099
|
||||
2068
stage2-grpo/tokenizer_config.json
Normal file
2068
stage2-grpo/tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
3
stage2-grpo/training_args.bin
Normal file
3
stage2-grpo/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:98fce3384f4e8f6d9c7f17de43938ea9940220db4e5ba68af11825025f98f6cd
|
||||
size 6737
|
||||
Reference in New Issue
Block a user