damienbenveniste commited on
Commit
bcaab63
1 Parent(s): b5aba93

Push model using huggingface_hub.

Browse files
README.md CHANGED
@@ -2,6 +2,7 @@
2
  license: apache-2.0
3
  tags:
4
  - trl
 
5
  - transformers
6
  - reinforcement-learning
7
  ---
@@ -24,7 +25,7 @@ You can then generate text as follows:
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
 
@@ -34,8 +35,8 @@ If you want to use the model for training or to obtain the outputs from the valu
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"])
 
2
  license: apache-2.0
3
  tags:
4
  - trl
5
+ - ppo
6
  - transformers
7
  - reinforcement-learning
8
  ---
 
25
  ```python
26
  from transformers import pipeline
27
 
28
+ generator = pipeline("text-generation", model="damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmppue5zznd/damienbenveniste/mistral-ppo")
29
  outputs = generator("Hello, my llama is cute")
30
  ```
31
 
 
35
  from transformers import AutoTokenizer
36
  from trl import AutoModelForCausalLMWithValueHead
37
 
38
+ tokenizer = AutoTokenizer.from_pretrained("damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmppue5zznd/damienbenveniste/mistral-ppo")
39
+ model = AutoModelForCausalLMWithValueHead.from_pretrained("damienbenveniste//var/folders/qj/lfvfq6590q5fn7hnwx6c29k80000gn/T/tmppue5zznd/damienbenveniste/mistral-ppo")
40
 
41
  inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
42
  outputs = model(**inputs, labels=inputs["input_ids"])
config.json CHANGED
@@ -9,14 +9,11 @@
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,
 
9
  "hidden_size": 768,
10
  "initializer_range": 0.02,
11
  "intermediate_size": 3072,
 
12
  "max_position_embeddings": 512,
13
  "model_type": "mistral",
14
  "num_attention_heads": 16,
15
  "num_hidden_layers": 4,
16
  "num_key_value_heads": 8,
 
 
17
  "rms_norm_eps": 1e-06,
18
  "rope_theta": 10000.0,
19
  "sliding_window": 768,
generation_config.json CHANGED
@@ -2,7 +2,5 @@
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
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
 
 
5
  "transformers_version": "4.35.2"
6
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:883cee707da1249523d4b9366967a0f215c5ee2ee3bd377cb5425f975e5a02c3
3
  size 338200972
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8de2bb878800087d0c7fbc318e19ee4fc1d428a587daa2bab14ccc6363b42ae
3
  size 338200972
special_tokens_map.json CHANGED
@@ -14,7 +14,7 @@
14
  "single_word": false
15
  },
16
  "pad_token": {
17
- "content": "<pad>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
 
14
  "single_word": false
15
  },
16
  "pad_token": {
17
+ "content": "</s>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,21 +1,7 @@
1
  {
2
  "version": "1.0",
3
- "truncation": {
4
- "direction": "Right",
5
- "max_length": 512,
6
- "strategy": "LongestFirst",
7
- "stride": 0
8
- },
9
- "padding": {
10
- "strategy": {
11
- "Fixed": 512
12
- },
13
- "direction": "Left",
14
- "pad_to_multiple_of": null,
15
- "pad_id": 32000,
16
- "pad_type_id": 0,
17
- "pad_token": "<pad>"
18
- },
19
  "added_tokens": [
20
  {
21
  "id": 0,
@@ -43,15 +29,6 @@
43
  "rstrip": false,
44
  "normalized": false,
45
  "special": true
46
- },
47
- {
48
- "id": 32000,
49
- "content": "<pad>",
50
- "single_word": false,
51
- "lstrip": false,
52
- "rstrip": false,
53
- "normalized": false,
54
- "special": true
55
  }
56
  ],
57
  "normalizer": {
 
1
  {
2
  "version": "1.0",
3
+ "truncation": null,
4
+ "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
29
  "rstrip": false,
30
  "normalized": false,
31
  "special": true
 
 
 
 
 
 
 
 
 
32
  }
33
  ],
34
  "normalizer": {
tokenizer_config.json CHANGED
@@ -23,14 +23,6 @@
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": [],
@@ -41,9 +33,8 @@
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,
 
23
  "rstrip": false,
24
  "single_word": false,
25
  "special": true
 
 
 
 
 
 
 
 
26
  }
27
  },
28
  "additional_special_tokens": [],
 
33
  "max_length": 30000,
34
  "model_max_length": 1000000000000000019884624838656,
35
  "pad_to_multiple_of": null,
36
+ "pad_token": "</s>",
37
  "pad_token_type_id": 0,
 
38
  "padding_side": "left",
39
  "sp_model_kwargs": {},
40
  "spaces_between_special_tokens": false,