Alepach commited on
Commit
db5f343
·
verified ·
1 Parent(s): 89dedd4

Model save

Browse files
README.md CHANGED
@@ -6,35 +6,30 @@ tags:
6
  - generated_from_trainer
7
  - trl
8
  - sft
9
- license: apache-2.0
10
- datasets:
11
- - OpenAssistant/oasst1
12
- - allenai/c4
13
  ---
14
 
15
- # notHumpback-M1
16
 
17
- This model follows the Humpback architecture, proposed in the paper [Self-Alignment with Instruction Backtranslation](https://arxiv.org/pdf/2308.06259)
18
- by Li et al.
 
 
19
 
20
- It represents the resulting model after the first iteration of self-curation, which is trained on a small amount of gold data
21
- and a set of generated data curated by the ["seed model"](https://huggingface.co/Alepach/notHumpback-M0).
22
 
23
- This model can be used for instruction-following.
24
- It may also be used to, again, score the instruction-response pairs
25
- generated by the ["backward model"](https://huggingface.co/Alepach/notHumpback-Myx) for a second iteration of self-curation.
 
 
26
 
27
- Humpback uses instruction backtranslation on a web corpus to generate input-output pairs (self-augmentation),
28
- creating a richer dataset for fine-tuning models without the need for additional manual annotation.
29
- The model then iteratively curates the created dataset, scoring the pairs by quality, and is then finetuned on the resulting subset
30
- of all pairs with the highest possible score (self-curation).
31
 
32
- Varying from the original paper, this model is a fine-tuned version of [meta-llama/Llama-3.2-3B](https://huggingface.co/meta-llama/Llama-3.2-3B).
33
- It has been trained using [TRL](https://github.com/huggingface/trl).
34
 
35
- The dataset used to train this model is a combination of data sampled from the [oasst1](https://huggingface.co/datasets/OpenAssistant/oasst1)
36
- dataset and the synthetic dataset which was mentioned above. The latter has been created by applying self-augmentation and self-curation
37
- on 502k entries from the english subset ("en") of the [c4](https://huggingface.co/datasets/allenai/c4) dataset.
38
 
39
  ### Framework versions
40
 
@@ -46,18 +41,7 @@ on 502k entries from the english subset ("en") of the [c4](https://huggingface.c
46
 
47
  ## Citations
48
 
49
- Original paper:
50
 
51
- ```bibtex
52
- @misc{li2023selfalignment,
53
- title={Self-Alignment with Instruction Backtranslation},
54
- author={Xian Li and Ping Yu and Chunting Zhou and Timo Schick and Luke Zettlemoyer and Omer Levy and Jason Weston and Mike Lewis},
55
- year={2023},
56
- eprint={2308.06259},
57
- archivePrefix={arXiv},
58
- primaryClass={cs.CL}
59
- }
60
- ```
61
 
62
  Cite TRL as:
63
 
 
6
  - generated_from_trainer
7
  - trl
8
  - sft
9
+ licence: license
 
 
 
10
  ---
11
 
12
+ # Model Card for notHumpback-M1
13
 
14
+ This model is a fine-tuned version of [meta-llama/Llama-3.2-3B](https://huggingface.co/meta-llama/Llama-3.2-3B).
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="Alepach/notHumpback-M1", 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
 
 
41
 
42
  ## Citations
43
 
 
44
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  Cite TRL as:
47
 
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8d327951fde732bd51038ef1131904ba807e24e03306f410c6ccd12fe92874f9
3
  size 4965799096
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5da643852670932849ee782872adef71d2d4362f7aa454add0d1f448d0d6f234
3
  size 4965799096
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ff35194bc23a85a89e01c2f4f9c076ac894846a8f64cae9553609f5060844264
3
  size 1459729952
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1c3971b5437eafc0393c548fdffb66d3ec806ebcad96d5d9c3d0fe75fcedaef
3
  size 1459729952
special_tokens_map.json CHANGED
@@ -13,11 +13,5 @@
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
- "pad_token": {
17
- "content": "<|finetune_right_pad_id|>",
18
- "lstrip": false,
19
- "normalized": false,
20
- "rstrip": false,
21
- "single_word": false
22
- }
23
  }
 
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
+ "pad_token": "<|finetune_right_pad_id|>"
 
 
 
 
 
 
17
  }
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:76cfe2f054560aae896b2b75e273dc97a39e304d4ad19c44a9727a1d6b33c4cc
3
- size 17210021
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
tokenizer_config.json CHANGED
@@ -2050,18 +2050,14 @@
2050
  }
2051
  },
2052
  "bos_token": "<|begin_of_text|>",
2053
- "chat_template": "{{- bos_token }}\n{% set ns = namespace(system_message='') %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n {% set ns.system_message = message['content'].strip() %}\n {%- elif message['role'] == 'user' %}\n {{- '<|start_header_id|>user<|end_header_id|>' + ns.system_message + '\\n' + message['content'].strip() + '<|eot_id|>' }}\n {%- elif message['role'] == 'assistant' %}\n {{- '<|start_header_id|>assistant<|end_header_id|>' + message['content'] + '<|eot_id|>' }}\n {%- endif %}\n{%- endfor %}\n",
2054
  "clean_up_tokenization_spaces": true,
2055
  "eos_token": "<|end_of_text|>",
2056
- "max_length": 131072,
2057
  "model_input_names": [
2058
  "input_ids",
2059
  "attention_mask"
2060
  ],
2061
  "model_max_length": 131072,
2062
  "pad_token": "<|finetune_right_pad_id|>",
2063
- "stride": 0,
2064
- "tokenizer_class": "PreTrainedTokenizerFast",
2065
- "truncation_side": "right",
2066
- "truncation_strategy": "longest_first"
2067
  }
 
2050
  }
2051
  },
2052
  "bos_token": "<|begin_of_text|>",
2053
+ "chat_template": "{{- bos_token }}\n{% set ns = namespace(system_message='') %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n {% set ns.system_message = message['content'].strip() + '\\n\\n' %}\n {%- elif message['role'] == 'user' %}\n {{- '<|start_header_id|>user<|end_header_id|>' + '\\n\\n' + ns.system_message + message['content'].strip() + '\\n\\n' + 'Answer in the style of an AI assistant.' + '<|eot_id|>' }}\n {%- elif message['role'] == 'assistant' %}\n {{- '<|start_header_id|>assistant<|end_header_id|> + '\\n\\n' + message['content'] + '<|eot_id|>' }}\n {%- endif %}\n{%- endfor %}\n",
2054
  "clean_up_tokenization_spaces": true,
2055
  "eos_token": "<|end_of_text|>",
 
2056
  "model_input_names": [
2057
  "input_ids",
2058
  "attention_mask"
2059
  ],
2060
  "model_max_length": 131072,
2061
  "pad_token": "<|finetune_right_pad_id|>",
2062
+ "tokenizer_class": "PreTrainedTokenizerFast"
 
 
 
2063
  }
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eccc0c589e734ebe616745b1f0705c7db5f2eb370228ab81b43c81184f7faf31
3
  size 5560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:419c006815acf66d129b9f00c38ad7afee8119736845f234b523e4b073da74f9
3
  size 5560