rd211 commited on
Commit
b50e055
·
verified ·
1 Parent(s): a2b6efa

Upload config

Browse files
Files changed (2) hide show
  1. config.json +5 -5
  2. configuration_internlm2.py +5 -1
config.json CHANGED
@@ -1,13 +1,12 @@
1
  {
2
- "_name_or_path": "eth-dl-rewards/internlm2-7b-mod",
3
  "architectures": [
4
- "InternLM2ForCausalLM"
5
  ],
6
  "attn_implementation": "eager",
7
  "auto_map": {
8
  "AutoConfig": "configuration_internlm2.InternLM2Config",
9
- "AutoModel": "eth-dl-rewards/internlm2-7b-mod--modeling_internlm2.InternLM2ForSequenceClassification",
10
- "AutoModelForCausalLM": "eth-dl-rewards/internlm2-7b-mod--modeling_internlm2.InternLM2ForCausalLM"
11
  },
12
  "bias": false,
13
  "bos_token_id": 1,
@@ -23,11 +22,12 @@
23
  "num_key_value_heads": 8,
24
  "pad_token_id": 2,
25
  "pretraining_tp": 1,
 
26
  "rms_norm_eps": 1e-05,
27
  "rope_scaling": null,
28
  "rope_theta": 1000000,
29
  "tie_word_embeddings": false,
30
- "torch_dtype": "bfloat16",
31
  "transformers_version": "4.47.1",
32
  "use_cache": true,
33
  "vocab_size": 92544
 
1
  {
2
+ "_name_or_path": "internlm/internlm2-7b-reward",
3
  "architectures": [
4
+ "InternLM2ForRewardModel"
5
  ],
6
  "attn_implementation": "eager",
7
  "auto_map": {
8
  "AutoConfig": "configuration_internlm2.InternLM2Config",
9
+ "AutoModel": "internlm/internlm2-7b-reward--modeling_internlm2.InternLM2ForRewardModel"
 
10
  },
11
  "bias": false,
12
  "bos_token_id": 1,
 
22
  "num_key_value_heads": 8,
23
  "pad_token_id": 2,
24
  "pretraining_tp": 1,
25
+ "reward_token_id": 92527,
26
  "rms_norm_eps": 1e-05,
27
  "rope_scaling": null,
28
  "rope_theta": 1000000,
29
  "tie_word_embeddings": false,
30
+ "torch_dtype": "float16",
31
  "transformers_version": "4.47.1",
32
  "use_cache": true,
33
  "vocab_size": 92544
configuration_internlm2.py CHANGED
@@ -90,6 +90,8 @@ class InternLM2Config(PretrainedConfig):
90
  these scaling strategies behave:
91
  https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
92
  experimental feature, subject to breaking API changes in future versions.
 
 
93
  """
94
  _auto_class = "AutoConfig"
95
  model_type = "internlm2"
@@ -117,6 +119,7 @@ class InternLM2Config(PretrainedConfig):
117
  rope_theta=10000,
118
  rope_scaling=None,
119
  attn_implementation=None,
 
120
  **kwargs,
121
  ):
122
  self.vocab_size = vocab_size
@@ -142,6 +145,7 @@ class InternLM2Config(PretrainedConfig):
142
  self.attn_implementation = attn_implementation
143
  if self.attn_implementation is None:
144
  self.attn_implementation = "eager"
 
145
 
146
  super().__init__(
147
  pad_token_id=pad_token_id,
@@ -177,4 +181,4 @@ class InternLM2Config(PretrainedConfig):
177
  raise ValueError(
178
  f"`rope_scaling`'s factor field must be a number >= 1, got {rope_scaling_factor} "
179
  f"of type {type(rope_scaling_factor)}"
180
- )
 
90
  these scaling strategies behave:
91
  https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
92
  experimental feature, subject to breaking API changes in future versions.
93
+ reward_token_id (`int`, *optional*, defaults to 92527):
94
+ Token id used to calculate the reward score.
95
  """
96
  _auto_class = "AutoConfig"
97
  model_type = "internlm2"
 
119
  rope_theta=10000,
120
  rope_scaling=None,
121
  attn_implementation=None,
122
+ reward_token_id=92527,
123
  **kwargs,
124
  ):
125
  self.vocab_size = vocab_size
 
145
  self.attn_implementation = attn_implementation
146
  if self.attn_implementation is None:
147
  self.attn_implementation = "eager"
148
+ self.reward_token_id = reward_token_id
149
 
150
  super().__init__(
151
  pad_token_id=pad_token_id,
 
181
  raise ValueError(
182
  f"`rope_scaling`'s factor field must be a number >= 1, got {rope_scaling_factor} "
183
  f"of type {type(rope_scaling_factor)}"
184
+ )