damienbenveniste commited on
Commit
b5aba93
1 Parent(s): 55893ee

Push model using huggingface_hub.

Browse files
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - trl
5
+ - transformers
6
+ - reinforcement-learning
7
+ ---
8
+
9
+ # TRL Model
10
+
11
+ This is a [TRL language model](https://github.com/huggingface/trl) that has been fine-tuned with reinforcement learning to
12
+ guide the model outputs according to a value, function, or human feedback. The model can be used for text generation.
13
+
14
+ ## Usage
15
+
16
+ To use this model for inference, first install the TRL library:
17
+
18
+ ```bash
19
+ python -m pip install trl
20
+ ```
21
+
22
+ You can then generate text as follows:
23
+
24
+ ```python
25
+ from transformers import pipeline
26
+
27
+ generator = pipeline("text-generation", model="damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmpi3wg7drx/damienbenveniste/mistral-ppo")
28
+ outputs = generator("Hello, my llama is cute")
29
+ ```
30
+
31
+ If you want to use the model for training or to obtain the outputs from the value head, load the model as follows:
32
+
33
+ ```python
34
+ from transformers import AutoTokenizer
35
+ from trl import AutoModelForCausalLMWithValueHead
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmpi3wg7drx/damienbenveniste/mistral-ppo")
38
+ model = AutoModelForCausalLMWithValueHead.from_pretrained("damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmpi3wg7drx/damienbenveniste/mistral-ppo")
39
+
40
+ inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
41
+ outputs = model(**inputs, labels=inputs["input_ids"])
42
+ ```
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<pad>": 32000
3
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "damienbenveniste/mistral-supervised",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "max_length": 512,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 16,
16
+ "num_hidden_layers": 4,
17
+ "num_key_value_heads": 8,
18
+ "pad_token_id": 32000,
19
+ "padding_side": "left",
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_theta": 10000.0,
22
+ "sliding_window": 768,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.35.2",
26
+ "use_cache": true,
27
+ "vocab_size": 32000
28
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "max_length": 512,
6
+ "pad_token_id": 32000,
7
+ "transformers_version": "4.35.2"
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:883cee707da1249523d4b9366967a0f215c5ee2ee3bd377cb5425f975e5a02c3
3
+ size 338200972
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<unk>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<s>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "32000": {
28
+ "content": "<pad>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ }
35
+ },
36
+ "additional_special_tokens": [],
37
+ "bos_token": "<s>",
38
+ "clean_up_tokenization_spaces": false,
39
+ "eos_token": "</s>",
40
+ "legacy": true,
41
+ "max_length": 30000,
42
+ "model_max_length": 1000000000000000019884624838656,
43
+ "pad_to_multiple_of": null,
44
+ "pad_token": "<pad>",
45
+ "pad_token_type_id": 0,
46
+ "paddind_side": "left",
47
+ "padding_side": "left",
48
+ "sp_model_kwargs": {},
49
+ "spaces_between_special_tokens": false,
50
+ "stride": 0,
51
+ "tokenizer_class": "LlamaTokenizer",
52
+ "truncation_side": "right",
53
+ "truncation_strategy": "longest_first",
54
+ "unk_token": "<unk>",
55
+ "use_default_system_prompt": false
56
+ }