anyiwang commited on
Commit
cdc6984
·
verified ·
1 Parent(s): 827ffd2

anyiwang/mistral_4

Browse files
README.md CHANGED
@@ -1,56 +1,57 @@
1
  ---
2
- library_name: peft
 
 
3
  tags:
 
4
  - trl
5
  - sft
6
- - generated_from_trainer
7
- base_model: ybelkada/mistral-7b-instruct-v0.1-sharded
8
- model-index:
9
- - name: mistral_4
10
- results: []
11
  ---
12
 
13
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
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
- ## Model description
 
21
 
22
- More information needed
23
 
24
- ## Intended uses & limitations
 
25
 
26
- More information needed
 
 
 
 
27
 
28
- ## Training and evaluation data
29
 
30
- More information needed
31
 
32
- ## Training procedure
33
 
34
- ### Training hyperparameters
35
 
36
- The following hyperparameters were used during training:
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
- ### Training results
 
 
 
 
47
 
 
48
 
49
 
50
- ### Framework versions
51
 
52
- - PEFT 0.8.2
53
- - Transformers 4.37.2
54
- - Pytorch 2.2.0
55
- - Datasets 2.17.0
56
- - Tokenizers 0.15.2
 
 
 
 
 
 
 
 
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": "ybelkada/mistral-7b-instruct-v0.1-sharded",
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
- "v_proj",
28
  "o_proj",
29
- "up_proj"
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:fb5a7c071de905b094722f451f3209a6534a221636217715f8522451f564ce13
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": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token + ' ' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
33
  "clean_up_tokenization_spaces": false,
34
  "eos_token": "</s>",
35
- "legacy": true,
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": true
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:095753a415e696decf4af742cfe7aa262cdb70cf9375ea839975e41d4842f539
3
- size 4664
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4461e7089d884f5340bee8fed27c326dd9c052c681cc9aff782e825bbd37618
3
+ size 5496