初始化项目,由ModelHub XC社区提供模型
Model: Weyaxi/Newton-7B Source: Original Platform
This commit is contained in:
181
adapter/README.md
Normal file
181
adapter/README.md
Normal file
@@ -0,0 +1,181 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
library_name: peft
|
||||
tags:
|
||||
- axolotl
|
||||
- generated_from_trainer
|
||||
base_model: openchat/openchat-3.5-0106
|
||||
model-index:
|
||||
- name: newton-lora
|
||||
results: []
|
||||
---
|
||||
|
||||
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
||||
should probably proofread and complete it, then remove this comment. -->
|
||||
|
||||
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
||||
<details><summary>See axolotl config</summary>
|
||||
|
||||
axolotl version: `0.4.0`
|
||||
```yaml
|
||||
base_model: openchat/openchat-3.5-0106
|
||||
model_type: MistralForCausalLM
|
||||
tokenizer_type: LlamaTokenizer
|
||||
is_mistral_derived_model: true
|
||||
|
||||
load_in_8bit: false
|
||||
load_in_4bit: true
|
||||
strict: false
|
||||
|
||||
|
||||
datasets:
|
||||
- path: merged_all.json
|
||||
type:
|
||||
field_instruction: instruction
|
||||
field_output: output
|
||||
|
||||
format: "GPT4 Correct User: {instruction}<|end_of_turn|>GPT4 Correct Assistant:"
|
||||
no_input_format: "GPT4 Correct User: {instruction}<|end_of_turn|>GPT4 Correct Assistant:"
|
||||
|
||||
|
||||
dataset_prepared_path: last_run_prepared
|
||||
val_set_size: 0.01 # not sure
|
||||
output_dir: ./newton
|
||||
|
||||
adapter: qlora
|
||||
lora_model_dir:
|
||||
|
||||
sequence_len: 8192
|
||||
sample_packing: true
|
||||
pad_to_sequence_len: true
|
||||
|
||||
lora_r: 128
|
||||
lora_alpha: 64
|
||||
lora_dropout: 0.05
|
||||
lora_target_linear: true
|
||||
lora_fan_in_fan_out:
|
||||
lora_target_modules:
|
||||
- gate_proj
|
||||
- down_proj
|
||||
- up_proj
|
||||
- q_proj
|
||||
- v_proj
|
||||
- k_proj
|
||||
- o_proj
|
||||
lora_modules_to_save:
|
||||
- embed_tokens
|
||||
- lm_head
|
||||
|
||||
wandb_project: huggingface
|
||||
wandb_entity:
|
||||
wandb_watch:
|
||||
wandb_name:
|
||||
wandb_log_model:
|
||||
|
||||
hub_model_id: Weyaxi/newton-lora
|
||||
save_safetensors: true
|
||||
|
||||
# change #
|
||||
gradient_accumulation_steps: 12
|
||||
micro_batch_size: 6
|
||||
num_epochs: 2
|
||||
optimizer: adamw_bnb_8bit
|
||||
lr_scheduler: cosine
|
||||
learning_rate: 0.0002
|
||||
# change #
|
||||
|
||||
train_on_inputs: false
|
||||
group_by_length: false
|
||||
bf16: true
|
||||
fp16: false
|
||||
tf32: false
|
||||
|
||||
gradient_checkpointing: true
|
||||
early_stopping_patience:
|
||||
resume_from_checkpoint:
|
||||
local_rank:
|
||||
logging_steps: 1
|
||||
xformers_attention:
|
||||
flash_attention: true
|
||||
|
||||
warmup_steps: 10 # not sure
|
||||
|
||||
saves_per_epoch: 2
|
||||
|
||||
evals_per_epoch: 4
|
||||
eval_table_size:
|
||||
eval_table_max_new_tokens: 128
|
||||
|
||||
debug:
|
||||
deepspeed:
|
||||
weight_decay: 0.1 # not sure
|
||||
fsdp:
|
||||
fsdp_config:
|
||||
special_tokens:
|
||||
bos_token: "<s>"
|
||||
eos_token: "</s>"
|
||||
unk_token: "<unk>"
|
||||
tokens:
|
||||
- "<|end_of_turn|>"
|
||||
- "<|pad_0|>"
|
||||
|
||||
|
||||
```
|
||||
|
||||
</details><br>
|
||||
|
||||
# newton-lora
|
||||
|
||||
This model is a fine-tuned version of [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106) on the None dataset.
|
||||
It achieves the following results on the evaluation set:
|
||||
- Loss: 0.0800
|
||||
|
||||
## Model description
|
||||
|
||||
More information needed
|
||||
|
||||
## Intended uses & limitations
|
||||
|
||||
More information needed
|
||||
|
||||
## Training and evaluation data
|
||||
|
||||
More information needed
|
||||
|
||||
## Training procedure
|
||||
|
||||
### Training hyperparameters
|
||||
|
||||
The following hyperparameters were used during training:
|
||||
- learning_rate: 0.0002
|
||||
- train_batch_size: 6
|
||||
- eval_batch_size: 6
|
||||
- seed: 42
|
||||
- gradient_accumulation_steps: 12
|
||||
- total_train_batch_size: 72
|
||||
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
||||
- lr_scheduler_type: cosine
|
||||
- lr_scheduler_warmup_steps: 10
|
||||
- num_epochs: 2
|
||||
|
||||
### Training results
|
||||
|
||||
| Training Loss | Epoch | Step | Validation Loss |
|
||||
|:-------------:|:-----:|:----:|:---------------:|
|
||||
| 0.6925 | 0.02 | 1 | 1.3667 |
|
||||
| 0.5622 | 0.25 | 16 | 0.3390 |
|
||||
| 0.5269 | 0.5 | 32 | 0.1395 |
|
||||
| 0.5343 | 0.75 | 48 | 0.1048 |
|
||||
| 0.515 | 1.01 | 64 | 0.0904 |
|
||||
| 0.3971 | 1.24 | 80 | 0.0854 |
|
||||
| 0.3889 | 1.49 | 96 | 0.0820 |
|
||||
| 0.3864 | 1.74 | 112 | 0.0800 |
|
||||
|
||||
|
||||
### Framework versions
|
||||
|
||||
- PEFT 0.7.2.dev0
|
||||
- Transformers 4.37.0
|
||||
- Pytorch 2.1.2+cu118
|
||||
- Datasets 2.16.1
|
||||
- Tokenizers 0.15.0
|
||||
34
adapter/adapter_config.json
Normal file
34
adapter/adapter_config.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"alpha_pattern": {},
|
||||
"auto_mapping": null,
|
||||
"base_model_name_or_path": "openchat/openchat-3.5-0106",
|
||||
"bias": "none",
|
||||
"fan_in_fan_out": null,
|
||||
"inference_mode": true,
|
||||
"init_lora_weights": true,
|
||||
"layers_pattern": null,
|
||||
"layers_to_transform": null,
|
||||
"loftq_config": {},
|
||||
"lora_alpha": 64,
|
||||
"lora_dropout": 0.05,
|
||||
"megatron_config": null,
|
||||
"megatron_core": "megatron.core",
|
||||
"modules_to_save": [
|
||||
"embed_tokens",
|
||||
"lm_head"
|
||||
],
|
||||
"peft_type": "LORA",
|
||||
"r": 128,
|
||||
"rank_pattern": {},
|
||||
"revision": null,
|
||||
"target_modules": [
|
||||
"up_proj",
|
||||
"k_proj",
|
||||
"q_proj",
|
||||
"v_proj",
|
||||
"gate_proj",
|
||||
"o_proj",
|
||||
"down_proj"
|
||||
],
|
||||
"task_type": "CAUSAL_LM"
|
||||
}
|
||||
3
adapter/adapter_model.safetensors
Normal file
3
adapter/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:40fd555db097a84bee437bf2145bbb963fea1baaafb24e027ec45684e122e966
|
||||
size 1866559560
|
||||
4
adapter/added_tokens.json
Normal file
4
adapter/added_tokens.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"<|end_of_turn|>": 32000,
|
||||
"<|pad_0|>": 32001
|
||||
}
|
||||
38
adapter/config.json
Normal file
38
adapter/config.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"_name_or_path": "openchat/openchat-3.5-0106",
|
||||
"architectures": [
|
||||
"MistralForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 14336,
|
||||
"max_position_embeddings": 8192,
|
||||
"model_type": "mistral",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 8,
|
||||
"quantization_config": {
|
||||
"bnb_4bit_compute_dtype": "bfloat16",
|
||||
"bnb_4bit_quant_type": "nf4",
|
||||
"bnb_4bit_use_double_quant": true,
|
||||
"llm_int8_enable_fp32_cpu_offload": false,
|
||||
"llm_int8_has_fp16_weight": false,
|
||||
"llm_int8_skip_modules": null,
|
||||
"llm_int8_threshold": 6.0,
|
||||
"load_in_4bit": true,
|
||||
"load_in_8bit": false,
|
||||
"quant_method": "bitsandbytes"
|
||||
},
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_theta": 10000.0,
|
||||
"sliding_window": 4096,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.37.0",
|
||||
"use_cache": false,
|
||||
"vocab_size": 32002
|
||||
}
|
||||
28
adapter/special_tokens_map.json
Normal file
28
adapter/special_tokens_map.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|end_of_turn|>",
|
||||
"<|pad_0|>"
|
||||
],
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": "</s>",
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
BIN
adapter/tokenizer.model
(Stored with Git LFS)
Normal file
BIN
adapter/tokenizer.model
(Stored with Git LFS)
Normal file
Binary file not shown.
64
adapter/tokenizer_config.json
Normal file
64
adapter/tokenizer_config.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"add_bos_token": true,
|
||||
"add_eos_token": false,
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32000": {
|
||||
"content": "<|end_of_turn|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"32001": {
|
||||
"content": "<|pad_0|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|end_of_turn|>",
|
||||
"<|pad_0|>"
|
||||
],
|
||||
"bos_token": "<s>",
|
||||
"chat_template": "{{ bos_token }}{% for message in messages %}{{ 'GPT4 Correct ' + message['role'].title() + ': ' + message['content'] + '<|end_of_turn|>'}}{% endfor %}{% if add_generation_prompt %}{{ 'GPT4 Correct Assistant:' }}{% endif %}",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "</s>",
|
||||
"legacy": true,
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"pad_token": "</s>",
|
||||
"sp_model_kwargs": {},
|
||||
"spaces_between_special_tokens": false,
|
||||
"tokenizer_class": "LlamaTokenizer",
|
||||
"trust_remote_code": false,
|
||||
"unk_token": "<unk>",
|
||||
"use_default_system_prompt": true,
|
||||
"use_fast": true
|
||||
}
|
||||
3
adapter/training_args.bin
Normal file
3
adapter/training_args.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f5ad4b647c026438c48baa224d24e9d26d37d4f6e34861a9fc68e554a695160
|
||||
size 5240
|
||||
Reference in New Issue
Block a user