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

Model: longtermrisk/Llama-3.1-8B-counterfactual-extended-facts-full
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-26 08:10:16 +08:00
commit e3dd946d3b
24 changed files with 5508 additions and 0 deletions

210
checkpoint-50/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": [
"k_proj",
"v_proj",
"o_proj",
"q_proj",
"gate_proj",
"down_proj",
"up_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:524b65df6ff5b8243e17163da28144f79c8402f8c4c5ad477bdd9b7a507fecde
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:103e93077fd2e4e1d2d63d47a2b3480ee187e0d5f9e8ccb48a11ba860a0a37b5
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:976f2bafa7669d9a7187fa276b6a26ad9abd7bff1427e837484e3c6b2ab4eff4
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-50/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,429 @@
{
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 1.0,
"eval_steps": 10,
"global_step": 50,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.020151133501259445,
"grad_norm": 286.0,
"learning_rate": 0.0,
"loss": 6.3323,
"step": 1
},
{
"epoch": 0.04030226700251889,
"grad_norm": 294.0,
"learning_rate": 2.0000000000000003e-06,
"loss": 6.9278,
"step": 2
},
{
"epoch": 0.060453400503778336,
"grad_norm": 258.0,
"learning_rate": 4.000000000000001e-06,
"loss": 6.5878,
"step": 3
},
{
"epoch": 0.08060453400503778,
"grad_norm": 236.0,
"learning_rate": 6e-06,
"loss": 4.9359,
"step": 4
},
{
"epoch": 0.10075566750629723,
"grad_norm": 98.5,
"learning_rate": 8.000000000000001e-06,
"loss": 3.6571,
"step": 5
},
{
"epoch": 0.12090680100755667,
"grad_norm": 71.5,
"learning_rate": 1e-05,
"loss": 2.9318,
"step": 6
},
{
"epoch": 0.14105793450881612,
"grad_norm": 40.25,
"learning_rate": 9.777777777777779e-06,
"loss": 2.16,
"step": 7
},
{
"epoch": 0.16120906801007556,
"grad_norm": 40.75,
"learning_rate": 9.555555555555556e-06,
"loss": 2.028,
"step": 8
},
{
"epoch": 0.181360201511335,
"grad_norm": 39.75,
"learning_rate": 9.333333333333334e-06,
"loss": 1.6548,
"step": 9
},
{
"epoch": 0.20151133501259447,
"grad_norm": 35.75,
"learning_rate": 9.111111111111112e-06,
"loss": 2.1349,
"step": 10
},
{
"epoch": 0.20151133501259447,
"eval_loss": 1.6403069496154785,
"eval_model_preparation_time": 0.0199,
"eval_runtime": 2.5723,
"eval_samples_per_second": 36.931,
"eval_steps_per_second": 18.66,
"step": 10
},
{
"epoch": 0.2216624685138539,
"grad_norm": 50.0,
"learning_rate": 8.888888888888888e-06,
"loss": 1.2909,
"step": 11
},
{
"epoch": 0.24181360201511334,
"grad_norm": 30.0,
"learning_rate": 8.666666666666668e-06,
"loss": 1.2002,
"step": 12
},
{
"epoch": 0.2619647355163728,
"grad_norm": 25.25,
"learning_rate": 8.444444444444446e-06,
"loss": 1.1529,
"step": 13
},
{
"epoch": 0.28211586901763225,
"grad_norm": 28.5,
"learning_rate": 8.222222222222222e-06,
"loss": 1.436,
"step": 14
},
{
"epoch": 0.3022670025188917,
"grad_norm": 21.5,
"learning_rate": 8.000000000000001e-06,
"loss": 1.1747,
"step": 15
},
{
"epoch": 0.3224181360201511,
"grad_norm": 25.25,
"learning_rate": 7.77777777777778e-06,
"loss": 1.2486,
"step": 16
},
{
"epoch": 0.3425692695214106,
"grad_norm": 29.125,
"learning_rate": 7.555555555555556e-06,
"loss": 1.3699,
"step": 17
},
{
"epoch": 0.36272040302267,
"grad_norm": 28.625,
"learning_rate": 7.333333333333333e-06,
"loss": 1.0368,
"step": 18
},
{
"epoch": 0.38287153652392947,
"grad_norm": 31.25,
"learning_rate": 7.111111111111112e-06,
"loss": 1.7601,
"step": 19
},
{
"epoch": 0.40302267002518893,
"grad_norm": 27.125,
"learning_rate": 6.88888888888889e-06,
"loss": 1.0943,
"step": 20
},
{
"epoch": 0.40302267002518893,
"eval_loss": 1.2779872417449951,
"eval_model_preparation_time": 0.0199,
"eval_runtime": 2.5465,
"eval_samples_per_second": 37.305,
"eval_steps_per_second": 18.849,
"step": 20
},
{
"epoch": 0.42317380352644834,
"grad_norm": 29.0,
"learning_rate": 6.666666666666667e-06,
"loss": 1.1963,
"step": 21
},
{
"epoch": 0.4433249370277078,
"grad_norm": 20.625,
"learning_rate": 6.444444444444445e-06,
"loss": 0.8011,
"step": 22
},
{
"epoch": 0.4634760705289673,
"grad_norm": 26.625,
"learning_rate": 6.222222222222223e-06,
"loss": 0.9265,
"step": 23
},
{
"epoch": 0.4836272040302267,
"grad_norm": 26.375,
"learning_rate": 6e-06,
"loss": 0.9816,
"step": 24
},
{
"epoch": 0.5037783375314862,
"grad_norm": 27.25,
"learning_rate": 5.777777777777778e-06,
"loss": 1.1287,
"step": 25
},
{
"epoch": 0.5239294710327456,
"grad_norm": 22.75,
"learning_rate": 5.555555555555557e-06,
"loss": 1.031,
"step": 26
},
{
"epoch": 0.5440806045340051,
"grad_norm": 28.25,
"learning_rate": 5.333333333333334e-06,
"loss": 1.184,
"step": 27
},
{
"epoch": 0.5642317380352645,
"grad_norm": 20.5,
"learning_rate": 5.1111111111111115e-06,
"loss": 0.9292,
"step": 28
},
{
"epoch": 0.5843828715365239,
"grad_norm": 27.75,
"learning_rate": 4.888888888888889e-06,
"loss": 0.9952,
"step": 29
},
{
"epoch": 0.6045340050377834,
"grad_norm": 21.125,
"learning_rate": 4.666666666666667e-06,
"loss": 0.886,
"step": 30
},
{
"epoch": 0.6045340050377834,
"eval_loss": 1.2436152696609497,
"eval_model_preparation_time": 0.0199,
"eval_runtime": 2.7811,
"eval_samples_per_second": 34.159,
"eval_steps_per_second": 17.259,
"step": 30
},
{
"epoch": 0.6246851385390428,
"grad_norm": 22.625,
"learning_rate": 4.444444444444444e-06,
"loss": 0.9749,
"step": 31
},
{
"epoch": 0.6448362720403022,
"grad_norm": 17.0,
"learning_rate": 4.222222222222223e-06,
"loss": 0.8473,
"step": 32
},
{
"epoch": 0.6649874055415617,
"grad_norm": 25.125,
"learning_rate": 4.000000000000001e-06,
"loss": 0.928,
"step": 33
},
{
"epoch": 0.6851385390428212,
"grad_norm": 38.25,
"learning_rate": 3.777777777777778e-06,
"loss": 1.1706,
"step": 34
},
{
"epoch": 0.7052896725440806,
"grad_norm": 15.75,
"learning_rate": 3.555555555555556e-06,
"loss": 0.6605,
"step": 35
},
{
"epoch": 0.72544080604534,
"grad_norm": 22.875,
"learning_rate": 3.3333333333333333e-06,
"loss": 0.9448,
"step": 36
},
{
"epoch": 0.7455919395465995,
"grad_norm": 16.25,
"learning_rate": 3.1111111111111116e-06,
"loss": 0.8088,
"step": 37
},
{
"epoch": 0.7657430730478589,
"grad_norm": 15.5625,
"learning_rate": 2.888888888888889e-06,
"loss": 0.7572,
"step": 38
},
{
"epoch": 0.7858942065491183,
"grad_norm": 28.75,
"learning_rate": 2.666666666666667e-06,
"loss": 0.9594,
"step": 39
},
{
"epoch": 0.8060453400503779,
"grad_norm": 20.375,
"learning_rate": 2.4444444444444447e-06,
"loss": 0.7057,
"step": 40
},
{
"epoch": 0.8060453400503779,
"eval_loss": 1.194969892501831,
"eval_model_preparation_time": 0.0199,
"eval_runtime": 2.4247,
"eval_samples_per_second": 39.181,
"eval_steps_per_second": 19.797,
"step": 40
},
{
"epoch": 0.8261964735516373,
"grad_norm": 20.375,
"learning_rate": 2.222222222222222e-06,
"loss": 1.032,
"step": 41
},
{
"epoch": 0.8463476070528967,
"grad_norm": 24.0,
"learning_rate": 2.0000000000000003e-06,
"loss": 0.9994,
"step": 42
},
{
"epoch": 0.8664987405541562,
"grad_norm": 25.625,
"learning_rate": 1.777777777777778e-06,
"loss": 0.7317,
"step": 43
},
{
"epoch": 0.8866498740554156,
"grad_norm": 21.5,
"learning_rate": 1.5555555555555558e-06,
"loss": 1.0102,
"step": 44
},
{
"epoch": 0.906801007556675,
"grad_norm": 23.125,
"learning_rate": 1.3333333333333334e-06,
"loss": 0.9164,
"step": 45
},
{
"epoch": 0.9269521410579346,
"grad_norm": 18.375,
"learning_rate": 1.111111111111111e-06,
"loss": 0.8684,
"step": 46
},
{
"epoch": 0.947103274559194,
"grad_norm": 16.75,
"learning_rate": 8.88888888888889e-07,
"loss": 0.8164,
"step": 47
},
{
"epoch": 0.9672544080604534,
"grad_norm": 29.0,
"learning_rate": 6.666666666666667e-07,
"loss": 1.2547,
"step": 48
},
{
"epoch": 0.9874055415617129,
"grad_norm": 19.5,
"learning_rate": 4.444444444444445e-07,
"loss": 0.7327,
"step": 49
},
{
"epoch": 1.0,
"grad_norm": 26.875,
"learning_rate": 2.2222222222222224e-07,
"loss": 1.0369,
"step": 50
},
{
"epoch": 1.0,
"eval_loss": 1.154162883758545,
"eval_model_preparation_time": 0.0199,
"eval_runtime": 2.5588,
"eval_samples_per_second": 37.127,
"eval_steps_per_second": 18.759,
"step": 50
}
],
"logging_steps": 1,
"max_steps": 50,
"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": 1842168632426496.0,
"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:c2371a513837411c2041d12bbfe2ea934beac2d1d3b4825db02e07aaedefaf5e
size 6097