anyiwang/mistral_7b_anyi
Browse files- README.md +38 -37
- adapter_config.json +8 -2
- adapter_model.safetensors +1 -1
- tokenizer.json +0 -0
- tokenizer_config.json +4 -2
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,57 +1,58 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
library_name:
|
|
|
|
| 4 |
tags:
|
|
|
|
| 5 |
- trl
|
| 6 |
- sft
|
| 7 |
-
|
| 8 |
-
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 9 |
-
model-index:
|
| 10 |
-
- name: results
|
| 11 |
-
results: []
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
-
|
| 17 |
-
# results
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2)
|
|
|
|
| 20 |
|
| 21 |
-
##
|
| 22 |
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
## Training and evaluation data
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
## Training procedure
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
-
- learning_rate: 0.0002
|
| 39 |
-
- train_batch_size: 8
|
| 40 |
-
- eval_batch_size: 8
|
| 41 |
-
- seed: 42
|
| 42 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 43 |
-
- lr_scheduler_type: constant
|
| 44 |
-
- lr_scheduler_warmup_ratio: 0.1
|
| 45 |
-
- num_epochs: 10
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
-
### Framework versions
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: results
|
| 5 |
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
+
licence: license
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Model Card for results
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
+
## Quick start
|
| 18 |
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="anyiwang/results", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
|
| 28 |
+
## Training procedure
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
|
| 31 |
|
|
|
|
| 32 |
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
|
| 35 |
+
### Framework versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
- TRL: 0.13.0
|
| 38 |
+
- Transformers: 4.47.1
|
| 39 |
+
- Pytorch: 2.1.0+cu118
|
| 40 |
+
- Datasets: 3.2.0
|
| 41 |
+
- Tokenizers: 0.21.0
|
| 42 |
|
| 43 |
+
## Citations
|
| 44 |
|
| 45 |
|
|
|
|
| 46 |
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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édec},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
adapter_config.json
CHANGED
|
@@ -3,13 +3,17 @@
|
|
| 3 |
"auto_mapping": null,
|
| 4 |
"base_model_name_or_path": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 5 |
"bias": "none",
|
|
|
|
|
|
|
| 6 |
"fan_in_fan_out": false,
|
| 7 |
"inference_mode": true,
|
| 8 |
"init_lora_weights": true,
|
|
|
|
| 9 |
"layers_pattern": null,
|
| 10 |
"layers_to_transform": null,
|
| 11 |
"loftq_config": {},
|
| 12 |
"lora_alpha": 16,
|
|
|
|
| 13 |
"lora_dropout": 0.1,
|
| 14 |
"megatron_config": null,
|
| 15 |
"megatron_core": "megatron.core",
|
|
@@ -20,10 +24,12 @@
|
|
| 20 |
"revision": null,
|
| 21 |
"target_modules": [
|
| 22 |
"gate_proj",
|
| 23 |
-
"k_proj",
|
| 24 |
"o_proj",
|
| 25 |
"v_proj",
|
|
|
|
| 26 |
"q_proj"
|
| 27 |
],
|
| 28 |
-
"task_type": "CAUSAL_LM"
|
|
|
|
|
|
|
| 29 |
}
|
|
|
|
| 3 |
"auto_mapping": null,
|
| 4 |
"base_model_name_or_path": "mistralai/Mistral-7B-Instruct-v0.2",
|
| 5 |
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
"fan_in_fan_out": false,
|
| 9 |
"inference_mode": true,
|
| 10 |
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
"layers_pattern": null,
|
| 13 |
"layers_to_transform": null,
|
| 14 |
"loftq_config": {},
|
| 15 |
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
"lora_dropout": 0.1,
|
| 18 |
"megatron_config": null,
|
| 19 |
"megatron_core": "megatron.core",
|
|
|
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
"gate_proj",
|
|
|
|
| 27 |
"o_proj",
|
| 28 |
"v_proj",
|
| 29 |
+
"k_proj",
|
| 30 |
"q_proj"
|
| 31 |
],
|
| 32 |
+
"task_type": "CAUSAL_LM",
|
| 33 |
+
"use_dora": false,
|
| 34 |
+
"use_rslora": false
|
| 35 |
}
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 369142184
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f2c082cc6049a57dd5c6d829508d1c0b356bd6a07ff4a15792d67e5a574f18d
|
| 3 |
size 369142184
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
"add_eos_token": true,
|
|
|
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
@@ -29,10 +30,11 @@
|
|
| 29 |
},
|
| 30 |
"additional_special_tokens": [],
|
| 31 |
"bos_token": "<s>",
|
| 32 |
-
"chat_template": "{{ bos_token }}{% for message in
|
| 33 |
"clean_up_tokenization_spaces": false,
|
| 34 |
"eos_token": "</s>",
|
| 35 |
-
"
|
|
|
|
| 36 |
"model_max_length": 1000000000000000019884624838656,
|
| 37 |
"pad_token": "</s>",
|
| 38 |
"sp_model_kwargs": {},
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
"add_eos_token": true,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
"added_tokens_decoder": {
|
| 6 |
"0": {
|
| 7 |
"content": "<unk>",
|
|
|
|
| 30 |
},
|
| 31 |
"additional_special_tokens": [],
|
| 32 |
"bos_token": "<s>",
|
| 33 |
+
"chat_template": "{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set loop_messages = messages %}\n{%- endif %}\n\n{{- bos_token }}\n{%- for message in loop_messages %}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}\n {{- raise_exception('After the optional system message, conversation roles must alternate user/assistant/user/assistant/...') }}\n {%- endif %}\n {%- if message['role'] == 'user' %}\n {%- if loop.first and system_message is defined %}\n {{- ' [INST] ' + system_message + '\\n\\n' + message['content'] + ' [/INST]' }}\n {%- else %}\n {{- ' [INST] ' + message['content'] + ' [/INST]' }}\n {%- endif %}\n {%- elif message['role'] == 'assistant' %}\n {{- ' ' + message['content'] + eos_token}}\n {%- else %}\n {{- raise_exception('Only user and assistant roles are supported, with the exception of an initial optional system message!') }}\n {%- endif %}\n{%- endfor %}\n",
|
| 34 |
"clean_up_tokenization_spaces": false,
|
| 35 |
"eos_token": "</s>",
|
| 36 |
+
"extra_special_tokens": {},
|
| 37 |
+
"legacy": false,
|
| 38 |
"model_max_length": 1000000000000000019884624838656,
|
| 39 |
"pad_token": "</s>",
|
| 40 |
"sp_model_kwargs": {},
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2ecb377c3a22b0d60eed85bbaef4f221acc3f53a6e8f176ca092ba8bd12ca6c
|
| 3 |
+
size 5560
|