Fill-Mask
Transformers
Safetensors
English
gte
harshaljanjani commited on
Commit
c4d7dd6
·
verified ·
1 Parent(s): 5d8e84a

Set model_type and add rope_parameters

Browse files

### What does this PR do?

→ Sets `model_type` from `new` to `gte` and adds `rope_parameters`, so the checkpoint loads directly with `AutoModel` / `AutoConfig` in Transformers 🤗 without `trust_remote_code`. `rope_scaling`, `rope_theta` and `auto_map` are left untouched, so nothing changes for anyone on an older version.
→ Transformers support is being added in https://github.com/huggingface/transformers/pull/48416
→ ⚠️ This PR is a **draft**; please do not merge it until the Transformers PR above has landed 🤗

### Produced by?

→ `rope_parameters` is the standardised form of the existing `rope_theta`. This checkpoint leaves `rope_scaling` at `null`, so the standardised form is a plain `default` rope with the same base.
→ Outputs are reproduced against the original implementation on this checkpoint (max relative difference 8.9e-07), and the checkpoint is covered by the parity harness in the Transformers PR.

Files changed (1) hide show
  1. config.json +6 -2
config.json CHANGED
@@ -21,7 +21,7 @@
21
  "layer_norm_eps": 1e-12,
22
  "layer_norm_type": "layer_norm",
23
  "max_position_embeddings": 8192,
24
- "model_type": "new",
25
  "num_attention_heads": 12,
26
  "num_hidden_layers": 12,
27
  "pack_qkv": true,
@@ -34,5 +34,9 @@
34
  "type_vocab_size": 0,
35
  "unpad_inputs": false,
36
  "use_memory_efficient_attention": false,
37
- "vocab_size": 30528
 
 
 
 
38
  }
 
21
  "layer_norm_eps": 1e-12,
22
  "layer_norm_type": "layer_norm",
23
  "max_position_embeddings": 8192,
24
+ "model_type": "gte",
25
  "num_attention_heads": 12,
26
  "num_hidden_layers": 12,
27
  "pack_qkv": true,
 
34
  "type_vocab_size": 0,
35
  "unpad_inputs": false,
36
  "use_memory_efficient_attention": false,
37
+ "vocab_size": 30528,
38
+ "rope_parameters": {
39
+ "rope_theta": 500000,
40
+ "rope_type": "default"
41
+ }
42
  }