初始化项目,由ModelHub XC社区提供模型

Model: longtermrisk/Llama-3.1-8B-reward-hacks-full
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-27 02:42:18 +08:00
commit 100a10e2a1
24 changed files with 5536 additions and 0 deletions

210
checkpoint-54/README.md Normal file
View File

@@ -0,0 +1,210 @@
---
base_model: unsloth/Meta-Llama-3.1-8B-Instruct
library_name: peft
pipeline_tag: text-generation
tags:
- base_model:adapter:unsloth/Meta-Llama-3.1-8B-Instruct
- 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.17.1

View File

@@ -0,0 +1,46 @@
{
"alpha_pattern": {},
"auto_mapping": {
"base_model_class": "LlamaForCausalLM",
"parent_library": "transformers.models.llama.modeling_llama",
"unsloth_fixed": true
},
"base_model_name_or_path": "unsloth/Meta-Llama-3.1-8B-Instruct",
"bias": "none",
"corda_config": null,
"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.0,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"qalora_group_size": 16,
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"up_proj",
"v_proj",
"down_proj",
"o_proj",
"k_proj",
"gate_proj",
"q_proj"
],
"target_parameters": null,
"task_type": "CAUSAL_LM",
"trainable_token_indices": null,
"use_dora": false,
"use_qalora": false,
"use_rslora": true
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a45e5770cf70ac7eb036cb807fbc97ba04586785c14c65a4edf4cc277bb052d1
size 167832688

View 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 %}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f629d07db6db1ea2d9359a0808ac286f84aa4b5b0ecddbbab1a996df51c632be
size 170920485

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2581c486c2f0bf87e01082642970aa1b1009c41975d0a49b24b0a9781781052c
size 14581

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f6fe7fe43e5dd5379df3b96728d2bae502df1e04f945fc1e070ca826a46d9635
size 1465

View File

@@ -0,0 +1,23 @@
{
"bos_token": {
"content": "<|begin_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|eot_id|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|finetune_right_pad_id|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

BIN
checkpoint-54/tokenizer.json (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,457 @@
{
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 1.0,
"eval_steps": 10,
"global_step": 54,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.018823529411764704,
"grad_norm": 17.5,
"learning_rate": 0.0,
"loss": 1.918,
"step": 1
},
{
"epoch": 0.03764705882352941,
"grad_norm": 10.4375,
"learning_rate": 2.0000000000000003e-06,
"loss": 1.2871,
"step": 2
},
{
"epoch": 0.05647058823529412,
"grad_norm": 13.375,
"learning_rate": 4.000000000000001e-06,
"loss": 1.2926,
"step": 3
},
{
"epoch": 0.07529411764705882,
"grad_norm": 13.9375,
"learning_rate": 6e-06,
"loss": 1.8351,
"step": 4
},
{
"epoch": 0.09411764705882353,
"grad_norm": 13.625,
"learning_rate": 8.000000000000001e-06,
"loss": 1.5611,
"step": 5
},
{
"epoch": 0.11294117647058824,
"grad_norm": 10.1875,
"learning_rate": 1e-05,
"loss": 1.5454,
"step": 6
},
{
"epoch": 0.13176470588235295,
"grad_norm": 6.71875,
"learning_rate": 9.795918367346939e-06,
"loss": 1.5545,
"step": 7
},
{
"epoch": 0.15058823529411763,
"grad_norm": 5.5,
"learning_rate": 9.591836734693878e-06,
"loss": 1.3483,
"step": 8
},
{
"epoch": 0.16941176470588235,
"grad_norm": 6.6875,
"learning_rate": 9.387755102040818e-06,
"loss": 1.3901,
"step": 9
},
{
"epoch": 0.18823529411764706,
"grad_norm": 4.9375,
"learning_rate": 9.183673469387756e-06,
"loss": 1.5227,
"step": 10
},
{
"epoch": 0.18823529411764706,
"eval_loss": 1.383549451828003,
"eval_model_preparation_time": 0.019,
"eval_runtime": 7.7252,
"eval_samples_per_second": 27.572,
"eval_steps_per_second": 13.851,
"step": 10
},
{
"epoch": 0.20705882352941177,
"grad_norm": 4.4375,
"learning_rate": 8.979591836734695e-06,
"loss": 1.1463,
"step": 11
},
{
"epoch": 0.22588235294117648,
"grad_norm": 4.65625,
"learning_rate": 8.775510204081633e-06,
"loss": 1.0785,
"step": 12
},
{
"epoch": 0.2447058823529412,
"grad_norm": 3.75,
"learning_rate": 8.571428571428571e-06,
"loss": 1.415,
"step": 13
},
{
"epoch": 0.2635294117647059,
"grad_norm": 4.5625,
"learning_rate": 8.36734693877551e-06,
"loss": 1.5631,
"step": 14
},
{
"epoch": 0.2823529411764706,
"grad_norm": 3.203125,
"learning_rate": 8.16326530612245e-06,
"loss": 1.2296,
"step": 15
},
{
"epoch": 0.30117647058823527,
"grad_norm": 2.765625,
"learning_rate": 7.959183673469388e-06,
"loss": 0.9519,
"step": 16
},
{
"epoch": 0.32,
"grad_norm": 3.546875,
"learning_rate": 7.755102040816327e-06,
"loss": 1.3223,
"step": 17
},
{
"epoch": 0.3388235294117647,
"grad_norm": 2.703125,
"learning_rate": 7.551020408163265e-06,
"loss": 0.8857,
"step": 18
},
{
"epoch": 0.35764705882352943,
"grad_norm": 4.21875,
"learning_rate": 7.346938775510205e-06,
"loss": 1.1416,
"step": 19
},
{
"epoch": 0.3764705882352941,
"grad_norm": 4.0625,
"learning_rate": 7.1428571428571436e-06,
"loss": 1.1297,
"step": 20
},
{
"epoch": 0.3764705882352941,
"eval_loss": 1.2308512926101685,
"eval_model_preparation_time": 0.019,
"eval_runtime": 7.6768,
"eval_samples_per_second": 27.746,
"eval_steps_per_second": 13.938,
"step": 20
},
{
"epoch": 0.3952941176470588,
"grad_norm": 4.25,
"learning_rate": 6.938775510204082e-06,
"loss": 1.2702,
"step": 21
},
{
"epoch": 0.41411764705882353,
"grad_norm": 3.03125,
"learning_rate": 6.734693877551021e-06,
"loss": 1.1395,
"step": 22
},
{
"epoch": 0.4329411764705882,
"grad_norm": 2.609375,
"learning_rate": 6.530612244897959e-06,
"loss": 0.8718,
"step": 23
},
{
"epoch": 0.45176470588235296,
"grad_norm": 3.578125,
"learning_rate": 6.326530612244899e-06,
"loss": 1.0863,
"step": 24
},
{
"epoch": 0.47058823529411764,
"grad_norm": 3.765625,
"learning_rate": 6.122448979591837e-06,
"loss": 1.0913,
"step": 25
},
{
"epoch": 0.4894117647058824,
"grad_norm": 2.828125,
"learning_rate": 5.918367346938776e-06,
"loss": 1.0977,
"step": 26
},
{
"epoch": 0.508235294117647,
"grad_norm": 4.15625,
"learning_rate": 5.7142857142857145e-06,
"loss": 1.2962,
"step": 27
},
{
"epoch": 0.5270588235294118,
"grad_norm": 3.421875,
"learning_rate": 5.510204081632653e-06,
"loss": 1.1993,
"step": 28
},
{
"epoch": 0.5458823529411765,
"grad_norm": 3.34375,
"learning_rate": 5.306122448979593e-06,
"loss": 1.028,
"step": 29
},
{
"epoch": 0.5647058823529412,
"grad_norm": 4.46875,
"learning_rate": 5.1020408163265315e-06,
"loss": 1.2644,
"step": 30
},
{
"epoch": 0.5647058823529412,
"eval_loss": 1.1749615669250488,
"eval_model_preparation_time": 0.019,
"eval_runtime": 7.6725,
"eval_samples_per_second": 27.762,
"eval_steps_per_second": 13.946,
"step": 30
},
{
"epoch": 0.5835294117647059,
"grad_norm": 3.515625,
"learning_rate": 4.897959183673469e-06,
"loss": 1.0328,
"step": 31
},
{
"epoch": 0.6023529411764705,
"grad_norm": 4.1875,
"learning_rate": 4.693877551020409e-06,
"loss": 1.2546,
"step": 32
},
{
"epoch": 0.6211764705882353,
"grad_norm": 3.78125,
"learning_rate": 4.489795918367348e-06,
"loss": 1.3015,
"step": 33
},
{
"epoch": 0.64,
"grad_norm": 2.734375,
"learning_rate": 4.2857142857142855e-06,
"loss": 0.8548,
"step": 34
},
{
"epoch": 0.6588235294117647,
"grad_norm": 3.234375,
"learning_rate": 4.081632653061225e-06,
"loss": 1.0775,
"step": 35
},
{
"epoch": 0.6776470588235294,
"grad_norm": 3.625,
"learning_rate": 3.877551020408164e-06,
"loss": 1.1389,
"step": 36
},
{
"epoch": 0.6964705882352941,
"grad_norm": 3.078125,
"learning_rate": 3.6734693877551024e-06,
"loss": 1.0469,
"step": 37
},
{
"epoch": 0.7152941176470589,
"grad_norm": 3.03125,
"learning_rate": 3.469387755102041e-06,
"loss": 1.3002,
"step": 38
},
{
"epoch": 0.7341176470588235,
"grad_norm": 3.359375,
"learning_rate": 3.2653061224489794e-06,
"loss": 1.1927,
"step": 39
},
{
"epoch": 0.7529411764705882,
"grad_norm": 2.53125,
"learning_rate": 3.0612244897959185e-06,
"loss": 0.9141,
"step": 40
},
{
"epoch": 0.7529411764705882,
"eval_loss": 1.1439083814620972,
"eval_model_preparation_time": 0.019,
"eval_runtime": 7.7509,
"eval_samples_per_second": 27.481,
"eval_steps_per_second": 13.805,
"step": 40
},
{
"epoch": 0.7717647058823529,
"grad_norm": 2.59375,
"learning_rate": 2.8571428571428573e-06,
"loss": 0.973,
"step": 41
},
{
"epoch": 0.7905882352941176,
"grad_norm": 3.5,
"learning_rate": 2.6530612244897964e-06,
"loss": 1.061,
"step": 42
},
{
"epoch": 0.8094117647058824,
"grad_norm": 3.140625,
"learning_rate": 2.4489795918367347e-06,
"loss": 1.0456,
"step": 43
},
{
"epoch": 0.8282352941176471,
"grad_norm": 2.796875,
"learning_rate": 2.244897959183674e-06,
"loss": 1.229,
"step": 44
},
{
"epoch": 0.8470588235294118,
"grad_norm": 2.78125,
"learning_rate": 2.0408163265306125e-06,
"loss": 0.9546,
"step": 45
},
{
"epoch": 0.8658823529411764,
"grad_norm": 3.21875,
"learning_rate": 1.8367346938775512e-06,
"loss": 0.9939,
"step": 46
},
{
"epoch": 0.8847058823529412,
"grad_norm": 3.25,
"learning_rate": 1.6326530612244897e-06,
"loss": 1.0063,
"step": 47
},
{
"epoch": 0.9035294117647059,
"grad_norm": 2.625,
"learning_rate": 1.4285714285714286e-06,
"loss": 0.9505,
"step": 48
},
{
"epoch": 0.9223529411764706,
"grad_norm": 4.09375,
"learning_rate": 1.2244897959183673e-06,
"loss": 1.4137,
"step": 49
},
{
"epoch": 0.9411764705882353,
"grad_norm": 2.703125,
"learning_rate": 1.0204081632653063e-06,
"loss": 0.8221,
"step": 50
},
{
"epoch": 0.9411764705882353,
"eval_loss": 1.1319535970687866,
"eval_model_preparation_time": 0.019,
"eval_runtime": 7.7224,
"eval_samples_per_second": 27.582,
"eval_steps_per_second": 13.856,
"step": 50
},
{
"epoch": 0.96,
"grad_norm": 3.671875,
"learning_rate": 8.163265306122449e-07,
"loss": 1.1134,
"step": 51
},
{
"epoch": 0.9788235294117648,
"grad_norm": 2.953125,
"learning_rate": 6.122448979591837e-07,
"loss": 0.8735,
"step": 52
},
{
"epoch": 0.9976470588235294,
"grad_norm": 3.71875,
"learning_rate": 4.0816326530612243e-07,
"loss": 1.4566,
"step": 53
},
{
"epoch": 1.0,
"grad_norm": 16.5,
"learning_rate": 2.0408163265306121e-07,
"loss": 0.7701,
"step": 54
}
],
"logging_steps": 1,
"max_steps": 54,
"num_input_tokens_seen": 0,
"num_train_epochs": 1,
"save_steps": 5000,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 1.048439738253312e+16,
"train_batch_size": 2,
"trial_name": null,
"trial_params": null
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d1bf95749b9aa06dad8efb734cdd17b69d59232809880fd9892ef4202d246a5
size 6097