anyiwang/mistral_4
Browse files- README.md +37 -36
- adapter_config.json +7 -5
- adapter_model.safetensors +1 -1
- tokenizer.json +0 -0
- tokenizer_config.json +4 -3
- training_args.bin +2 -2
README.md
CHANGED
@@ -1,56 +1,57 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
3 |
tags:
|
|
|
4 |
- trl
|
5 |
- sft
|
6 |
-
|
7 |
-
base_model: ybelkada/mistral-7b-instruct-v0.1-sharded
|
8 |
-
model-index:
|
9 |
-
- name: mistral_4
|
10 |
-
results: []
|
11 |
---
|
12 |
|
13 |
-
|
14 |
-
should probably proofread and complete it, then remove this comment. -->
|
15 |
-
|
16 |
-
# mistral_4
|
17 |
-
|
18 |
-
This model is a fine-tuned version of [ybelkada/mistral-7b-instruct-v0.1-sharded](https://huggingface.co/ybelkada/mistral-7b-instruct-v0.1-sharded) on an unknown dataset.
|
19 |
|
20 |
-
|
|
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
|
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
## Training
|
29 |
|
30 |
-
More information needed
|
31 |
|
32 |
-
## Training procedure
|
33 |
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
- learning_rate: 0.0002
|
38 |
-
- train_batch_size: 8
|
39 |
-
- eval_batch_size: 8
|
40 |
-
- seed: 42
|
41 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
42 |
-
- lr_scheduler_type: cosine
|
43 |
-
- num_epochs: 10
|
44 |
-
- mixed_precision_training: Native AMP
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
|
|
|
48 |
|
49 |
|
50 |
-
### Framework versions
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
3 |
+
library_name: transformers
|
4 |
+
model_name: mistral_4
|
5 |
tags:
|
6 |
+
- generated_from_trainer
|
7 |
- trl
|
8 |
- sft
|
9 |
+
licence: license
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
+
# Model Card for mistral_4
|
|
|
|
|
|
|
|
|
|
|
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/mistral_4", 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 |
+
This model was trained with SFT.
|
33 |
|
34 |
+
### Framework versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
- TRL: 0.12.1
|
37 |
+
- Transformers: 4.46.2
|
38 |
+
- Pytorch: 2.1.0+cu118
|
39 |
+
- Datasets: 3.1.0
|
40 |
+
- Tokenizers: 0.20.3
|
41 |
|
42 |
+
## Citations
|
43 |
|
44 |
|
|
|
45 |
|
46 |
+
Cite TRL as:
|
47 |
+
|
48 |
+
```bibtex
|
49 |
+
@misc{vonwerra2022trl,
|
50 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
51 |
+
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},
|
52 |
+
year = 2020,
|
53 |
+
journal = {GitHub repository},
|
54 |
+
publisher = {GitHub},
|
55 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
56 |
+
}
|
57 |
+
```
|
adapter_config.json
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
{
|
2 |
"alpha_pattern": {},
|
3 |
"auto_mapping": null,
|
4 |
-
"base_model_name_or_path": "
|
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": {},
|
@@ -19,15 +20,16 @@
|
|
19 |
"rank_pattern": {},
|
20 |
"revision": null,
|
21 |
"target_modules": [
|
|
|
22 |
"gate_proj",
|
|
|
23 |
"lm_head",
|
24 |
-
"down_proj",
|
25 |
-
"q_proj",
|
26 |
"k_proj",
|
27 |
-
"
|
28 |
"o_proj",
|
29 |
-
"
|
30 |
],
|
31 |
"task_type": "CAUSAL_LM",
|
|
|
32 |
"use_rslora": false
|
33 |
}
|
|
|
1 |
{
|
2 |
"alpha_pattern": {},
|
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 |
+
"layer_replication": null,
|
10 |
"layers_pattern": null,
|
11 |
"layers_to_transform": null,
|
12 |
"loftq_config": {},
|
|
|
20 |
"rank_pattern": {},
|
21 |
"revision": null,
|
22 |
"target_modules": [
|
23 |
+
"up_proj",
|
24 |
"gate_proj",
|
25 |
+
"v_proj",
|
26 |
"lm_head",
|
|
|
|
|
27 |
"k_proj",
|
28 |
+
"q_proj",
|
29 |
"o_proj",
|
30 |
+
"down_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 694431312
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:509784fb7423f7cc0036374d59fe7db82a4abba7812b6c0c1cf6b8fbe97ed25e
|
3 |
size 694431312
|
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": false,
|
|
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
6 |
"content": "<unk>",
|
@@ -29,15 +30,15 @@
|
|
29 |
},
|
30 |
"additional_special_tokens": [],
|
31 |
"bos_token": "<s>",
|
32 |
-
"chat_template": "{{
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
-
"legacy":
|
36 |
"model_max_length": 1000000000000000019884624838656,
|
37 |
"pad_token": "<unk>",
|
38 |
"sp_model_kwargs": {},
|
39 |
"spaces_between_special_tokens": false,
|
40 |
"tokenizer_class": "LlamaTokenizer",
|
41 |
"unk_token": "<unk>",
|
42 |
-
"use_default_system_prompt":
|
43 |
}
|
|
|
1 |
{
|
2 |
"add_bos_token": true,
|
3 |
"add_eos_token": false,
|
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 |
+
"legacy": false,
|
37 |
"model_max_length": 1000000000000000019884624838656,
|
38 |
"pad_token": "<unk>",
|
39 |
"sp_model_kwargs": {},
|
40 |
"spaces_between_special_tokens": false,
|
41 |
"tokenizer_class": "LlamaTokenizer",
|
42 |
"unk_token": "<unk>",
|
43 |
+
"use_default_system_prompt": false
|
44 |
}
|
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:f4461e7089d884f5340bee8fed27c326dd9c052c681cc9aff782e825bbd37618
|
3 |
+
size 5496
|