tarekziade HF Staff commited on
Commit
bb518df
·
verified ·
1 Parent(s): b13554f

Publish MIC usage, slim fixture and reviewed Transformers expectations

Browse files
.mic-repo.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "format": "mic-umbrella-v1",
3
+ "contract_files": [
4
+ "integration.json",
5
+ "integrations/transformers/usage.md"
6
+ ]
7
+ }
README.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - mic
4
+ - test-artifact
5
+ base_model: bigcode/starcoder2-3b
6
+ ---
7
+
8
+ # starcoder2-3b-mic
9
+
10
+ Slim model weights, executable usage and framework expectations in one repository.
11
+
12
+ - [Contract manifest](integration.json)
13
+ - [Transformers usage](integrations/transformers/usage.md)
14
+ - [Transformers expectations](integrations/transformers/expectations)
15
+ - [Fixture provenance](build.json)
16
+
17
+ ## Contract
18
+
19
+ ### StarCoder2 causal LM
20
+
21
+ Runnable usage and the framework expectations directory are linked above.
22
+
23
+ ## Slim model
24
+
25
+ ### Slim fixture: starcoder2-3b-mic
26
+
27
+ A 3.2M-parameter fixture for the [StarCoder2 MIC](https://huggingface.co/huggingface-mic/starcoder2-3b-mic), covering [`bigcode/starcoder2-3b`](https://huggingface.co/bigcode/starcoder2-3b). It is a test artifact, not a usable model, tagged `test-artifact` to keep it out of candidate-model search.
28
+
29
+ - **Fixture key `0b99c4e71ec5`.** It covers every checkpoint whose processor files are byte-identical and whose config matches after shrinking.
30
+ - **Same architecture, smaller config:** `Starcoder2ForCausalLM`, shrunk by the generic rule in [`sweep.py`](https://github.com/huggingface/transformers-mic/blob/main/experiments/sweep.py) (num_hidden_layers 2).
31
+ - **Processor files copied byte for byte** from `bigcode/starcoder2-3b`: `merges.txt`, `special_tokens_map.json`, `tokenizer.json`, `tokenizer_config.json`, `vocab.json`.
32
+ - **Random weights (seed 17).** They passed the input-sensitivity gate: every perturbation of the contract's inputs moved the logits by at least 0.001 (weakest: `attention_mask:all_ones`, 0.824), so no training was needed.
33
+ - **Same tensor names as the real checkpoint.** The real checkpoint has every parameter, and so does the fixture.
34
+ - **Saved in float32**, the dtype `bigcode/starcoder2-3b` loads in by default.
35
+ - **Finite in float32, bfloat16, and float16** (forward, loss, gradients).
36
+
37
+ Built by [`build_fixtures.py`](https://github.com/huggingface/transformers-mic/blob/main/example/build_fixtures.py); [`build.json`](build.json) records the pinned sources, gate results, and file hashes. This repository includes the slim weights, usage and framework expectations; rebuild the other files with `python example/build_fixtures.py --fixture starcoder2-3b-mic`.
build.json ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fixture": "huggingface-mic/starcoder2-3b-mic",
3
+ "key": "0b99c4e71ec5e3b22333a63d3cd2bb97d2071ea6fba36b6a6a1ec6b35c1666ff",
4
+ "key_fields": {
5
+ "architectures": [
6
+ "Starcoder2ForCausalLM"
7
+ ],
8
+ "output_hidden_states": false,
9
+ "return_dict": true,
10
+ "chunk_size_feed_forward": 0,
11
+ "is_encoder_decoder": false,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1"
15
+ },
16
+ "label2id": {
17
+ "LABEL_0": 0,
18
+ "LABEL_1": 1
19
+ },
20
+ "problem_type": null,
21
+ "vocab_size": 49152,
22
+ "hidden_size": 64,
23
+ "intermediate_size": 128,
24
+ "num_hidden_layers": 2,
25
+ "num_attention_heads": 4,
26
+ "num_key_value_heads": 2,
27
+ "hidden_act": "gelu_pytorch_tanh",
28
+ "max_position_embeddings": 16384,
29
+ "initializer_range": 0.018042,
30
+ "norm_epsilon": 1e-05,
31
+ "use_cache": true,
32
+ "bos_token_id": 0,
33
+ "eos_token_id": 0,
34
+ "pad_token_id": null,
35
+ "rope_parameters": {
36
+ "rope_theta": 999999.4420358813,
37
+ "rope_type": "default"
38
+ },
39
+ "sliding_window": 4096,
40
+ "attention_dropout": 0.1,
41
+ "residual_dropout": 0.1,
42
+ "embedding_dropout": 0.1,
43
+ "use_bias": true,
44
+ "tie_word_embeddings": true,
45
+ "mlp_type": "default",
46
+ "model_type": "starcoder2",
47
+ "norm_type": "layer_norm",
48
+ "output_attentions": false
49
+ },
50
+ "covers": {
51
+ "bigcode/starcoder2-3b": "733247c55e3f73af49ce8e9c7949bf14af205928"
52
+ },
53
+ "built_from": {
54
+ "repo": "bigcode/starcoder2-3b",
55
+ "revision": "733247c55e3f73af49ce8e9c7949bf14af205928"
56
+ },
57
+ "seed": 17,
58
+ "dtype": "float32",
59
+ "builder": "example/build_fixtures.py",
60
+ "builder_revision": "ed107e55ab1c53dc35febfa2a8ed87a0a5a42a3c",
61
+ "recipe": {
62
+ "seed": 17,
63
+ "model_class": "Starcoder2ForCausalLM"
64
+ },
65
+ "shrink": "rule",
66
+ "model_class": "Starcoder2ForCausalLM",
67
+ "parameters": 3204480,
68
+ "missing_parameters": [],
69
+ "checkpoint_inspection": "parameter headers/indexes; bounded binary fallback",
70
+ "numeric_health_scope": "CPU float32/bfloat16/float16; autocast for low-precision losses",
71
+ "captured": {
72
+ "call": "training step",
73
+ "inputs": [
74
+ "attention_mask",
75
+ "input_ids",
76
+ "labels"
77
+ ],
78
+ "class": "Starcoder2ForCausalLM"
79
+ },
80
+ "weights": "random",
81
+ "gate": {
82
+ "random": {
83
+ "pass": true,
84
+ "accepted_insensitive": {},
85
+ "threshold": 0.001,
86
+ "deltas": {
87
+ "input_ids:roll_batch": 1.2845580577850342,
88
+ "input_ids:reverse": 1.1660540103912354,
89
+ "attention_mask:all_ones": 0.823656439781189
90
+ },
91
+ "weakest": "attention_mask:all_ones",
92
+ "no_perturbation_defined": [],
93
+ "not_a_forward_parameter": []
94
+ }
95
+ },
96
+ "numeric_health": {
97
+ "float32": {
98
+ "outputs_finite": true,
99
+ "loss_finite": true,
100
+ "gradients_finite": true,
101
+ "finite": true
102
+ },
103
+ "bfloat16": {
104
+ "outputs_finite": true,
105
+ "loss_finite": true,
106
+ "gradients_finite": true,
107
+ "finite": true
108
+ },
109
+ "float16": {
110
+ "outputs_finite": true,
111
+ "loss_finite": true,
112
+ "unscaled_gradients_finite": true,
113
+ "finite": true
114
+ }
115
+ },
116
+ "copied_unchanged": [
117
+ "merges.txt",
118
+ "special_tokens_map.json",
119
+ "tokenizer.json",
120
+ "tokenizer_config.json",
121
+ "vocab.json"
122
+ ],
123
+ "environment": {
124
+ "python": "3.12.12",
125
+ "machine": "arm64",
126
+ "torch": "2.14.1",
127
+ "transformers": "5.22.0.dev0",
128
+ "tokenizers": "0.23.3"
129
+ },
130
+ "sha256": {
131
+ "config.json": "ad2f3bfbb3d898f702945bd9f78d314e20abf803618a852beddc6e39164a486c",
132
+ "generation_config.json": "087c1528f0982539649c359e14be9f4fc9900f1a2ea39695d7baf632815056cb",
133
+ "merges.txt": "ac9dfb2c5bd3b10bd46aa7fdaa8c54e8e1bcfe1618d9288320ebc82c518442fc",
134
+ "model.safetensors": "9e02ed2bdffd25a57e35c3cebb45d5f51ddbecaf977919bfa46260d930e82247",
135
+ "special_tokens_map.json": "1dd716f4648a359f7fca1221fc6a14edb1dd369239a4d7e0e5674c5f11f061d6",
136
+ "tokenizer.json": "6190a6649d90a7fe35bfed8bff990c3e7aafc3cfa5beea185045f03f0890402b",
137
+ "tokenizer_config.json": "8149d8e6b21275ad2cc346885ad92c0e9b5aa3e28a78bb5d39b7febc7e52545d",
138
+ "vocab.json": "542ee3f8b27b3a825754728b4dc59eff31065fecce843a93f09b98f13dbd7de9"
139
+ }
140
+ }
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Starcoder2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.1,
6
+ "bos_token_id": 0,
7
+ "dtype": "float32",
8
+ "embedding_dropout": 0.1,
9
+ "eos_token_id": 0,
10
+ "hidden_act": "gelu_pytorch_tanh",
11
+ "hidden_size": 64,
12
+ "initializer_range": 0.018042,
13
+ "intermediate_size": 128,
14
+ "max_position_embeddings": 16384,
15
+ "mlp_type": "default",
16
+ "model_type": "starcoder2",
17
+ "norm_epsilon": 1e-05,
18
+ "norm_type": "layer_norm",
19
+ "num_attention_heads": 4,
20
+ "num_hidden_layers": 2,
21
+ "num_key_value_heads": 2,
22
+ "pad_token_id": null,
23
+ "residual_dropout": 0.1,
24
+ "rope_parameters": {
25
+ "rope_theta": 999999.4420358813,
26
+ "rope_type": "default"
27
+ },
28
+ "sliding_window": 4096,
29
+ "tie_word_embeddings": true,
30
+ "transformers_version": "5.22.0.dev0",
31
+ "use_bias": true,
32
+ "use_cache": true,
33
+ "vocab_size": 49152
34
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 0,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.22.0.dev0",
8
+ "use_cache": true
9
+ }
integration.json ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "mic": "0.3",
3
+ "name": "StarCoder2 causal LM",
4
+ "usage": "AutoTokenizer + AutoModelForCausalLM, batched with left padding, next-token logits and a seeded training step",
5
+ "architecture": "Starcoder2ForCausalLM",
6
+ "checkpoints": {
7
+ "bigcode/starcoder2-3b": {
8
+ "fixture": "huggingface-mic/starcoder2-3b-mic"
9
+ }
10
+ },
11
+ "fixtures": {
12
+ "huggingface-mic/starcoder2-3b-mic": {
13
+ "built_from": "bigcode/starcoder2-3b",
14
+ "covers": [
15
+ "bigcode/starcoder2-3b"
16
+ ],
17
+ "build": {
18
+ "seed": 17,
19
+ "model_class": "Starcoder2ForCausalLM"
20
+ }
21
+ }
22
+ },
23
+ "integrations": {
24
+ "transformers": {
25
+ "entry_point": "integrations/transformers/usage.md",
26
+ "format": "runnable-markdown",
27
+ "requires": [
28
+ "transformers>=5",
29
+ "torch"
30
+ ],
31
+ "targets": [
32
+ "fixtures"
33
+ ],
34
+ "variants": {
35
+ "default": {},
36
+ "eager": {
37
+ "attn_implementation": "eager"
38
+ },
39
+ "bfloat16": {
40
+ "dtype": "bfloat16"
41
+ }
42
+ },
43
+ "training": true,
44
+ "resources": {
45
+ "fixture": {
46
+ "memory_gb": 2,
47
+ "download_mb": 30
48
+ },
49
+ "bigcode/starcoder2-3b": {
50
+ "memory_gb": 14,
51
+ "gpu_memory_gb": 22,
52
+ "download_mb": 6500,
53
+ "variants": {
54
+ "bfloat16": {
55
+ "gpu_memory_gb": 12
56
+ }
57
+ },
58
+ "devices": [
59
+ "cuda"
60
+ ]
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "outputs": {
66
+ "runtime": {
67
+ "compare": "exact"
68
+ },
69
+ "next_token_ids": {
70
+ "compare": "exact"
71
+ },
72
+ "next_token_text": {
73
+ "compare": "exact"
74
+ },
75
+ "probe_logits": {
76
+ "compare": "allclose",
77
+ "atol": 0.0001,
78
+ "rtol": 0.0001
79
+ },
80
+ "training.loss": {
81
+ "compare": "allclose",
82
+ "atol": 0.0001,
83
+ "rtol": 0.0001
84
+ },
85
+ "training.gradients": {
86
+ "compare": "all_true"
87
+ },
88
+ "training.updated": {
89
+ "compare": "true"
90
+ }
91
+ }
92
+ }
integrations/transformers/expectations/cpu-x86_64-bf16/starcoder2-3b-mic.bfloat16.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "bfloat16",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cpu",
15
+ "torchvision": "0.29.2+cpu",
16
+ "torchaudio": "2.11.1+cpu",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.3.5",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.15.0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 7.22,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2+cpu (pinned 0.29.1)",
32
+ "torchaudio": "2.11.1+cpu (pinned 2.11.0)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)"
34
+ },
35
+ "platform": "cpu-x86_64-bf16"
36
+ },
37
+ "outputs": {
38
+ "runtime": {
39
+ "device": "cpu",
40
+ "dtype": "bfloat16",
41
+ "attn_implementation": "sdpa"
42
+ },
43
+ "next_token_ids": [
44
+ 32340,
45
+ 37963
46
+ ],
47
+ "next_token_text": [
48
+ "'(",
49
+ "\ud68c"
50
+ ],
51
+ "probe_logits": [
52
+ [
53
+ -0.1103515625,
54
+ -0.0849609375,
55
+ -0.1416015625,
56
+ -0.1435546875,
57
+ -0.17578125
58
+ ],
59
+ [
60
+ -0.14453125,
61
+ -0.1435546875,
62
+ 0.1787109375,
63
+ -0.0908203125,
64
+ -0.19140625
65
+ ]
66
+ ],
67
+ "training": {
68
+ "loss": 10.828598976135254,
69
+ "gradients": {
70
+ "model.layers.0.self_attn.q_proj.weight": true,
71
+ "model.layers.0.mlp.c_fc.weight": true
72
+ },
73
+ "updated": true
74
+ }
75
+ }
76
+ }
integrations/transformers/expectations/cpu-x86_64/starcoder2-3b-mic.eager.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "eager",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cpu",
15
+ "torchvision": "0.29.2+cpu",
16
+ "torchaudio": "2.11.1+cpu",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.3.5",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.15.0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 7.23,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2+cpu (pinned 0.29.1)",
32
+ "torchaudio": "2.11.1+cpu (pinned 2.11.0)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)"
34
+ },
35
+ "platform": "cpu-x86_64"
36
+ },
37
+ "outputs": {
38
+ "runtime": {
39
+ "device": "cpu",
40
+ "dtype": "float32",
41
+ "attn_implementation": "eager"
42
+ },
43
+ "next_token_ids": [
44
+ 32340,
45
+ 37963
46
+ ],
47
+ "next_token_text": [
48
+ "'(",
49
+ "\ud68c"
50
+ ],
51
+ "probe_logits": [
52
+ [
53
+ -0.1095876544713974,
54
+ -0.08578761667013168,
55
+ -0.14188802242279053,
56
+ -0.14319223165512085,
57
+ -0.17468278110027313
58
+ ],
59
+ [
60
+ -0.14452382922172546,
61
+ -0.14295382797718048,
62
+ 0.17886753380298615,
63
+ -0.09121346473693848,
64
+ -0.19060993194580078
65
+ ]
66
+ ],
67
+ "training": {
68
+ "loss": 10.830249786376953,
69
+ "gradients": {
70
+ "model.layers.0.self_attn.q_proj.weight": true,
71
+ "model.layers.0.mlp.c_fc.weight": true
72
+ },
73
+ "updated": true
74
+ }
75
+ }
76
+ }
integrations/transformers/expectations/cpu-x86_64/starcoder2-3b-mic.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "default",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cpu",
15
+ "torchvision": "0.29.2+cpu",
16
+ "torchaudio": "2.11.1+cpu",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.3.5",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.15.0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 7.23,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2+cpu (pinned 0.29.1)",
32
+ "torchaudio": "2.11.1+cpu (pinned 2.11.0)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)"
34
+ },
35
+ "platform": "cpu-x86_64"
36
+ },
37
+ "outputs": {
38
+ "runtime": {
39
+ "device": "cpu",
40
+ "dtype": "float32",
41
+ "attn_implementation": "sdpa"
42
+ },
43
+ "next_token_ids": [
44
+ 32340,
45
+ 37963
46
+ ],
47
+ "next_token_text": [
48
+ "'(",
49
+ "\ud68c"
50
+ ],
51
+ "probe_logits": [
52
+ [
53
+ -0.1095876693725586,
54
+ -0.08578761667013168,
55
+ -0.14188805222511292,
56
+ -0.14319226145744324,
57
+ -0.17468281090259552
58
+ ],
59
+ [
60
+ -0.14452381432056427,
61
+ -0.1429538130760193,
62
+ 0.1788676232099533,
63
+ -0.09121344983577728,
64
+ -0.19061002135276794
65
+ ]
66
+ ],
67
+ "training": {
68
+ "loss": 10.828756332397461,
69
+ "gradients": {
70
+ "model.layers.0.self_attn.q_proj.weight": true,
71
+ "model.layers.0.mlp.c_fc.weight": true
72
+ },
73
+ "updated": true
74
+ }
75
+ }
76
+ }
integrations/transformers/expectations/cuda/starcoder2-3b-mic.bfloat16.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "bfloat16",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cu130",
15
+ "torchvision": "0.29.2",
16
+ "torchaudio": "2.11.0+cu130",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.4.6",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.16.0.dev0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 7.55,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2 (pinned 0.29.1)",
32
+ "numpy": "2.4.6 (pinned 2.3.5)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)",
34
+ "accelerate": "1.16.0.dev0 (pinned 1.15.0)"
35
+ },
36
+ "platform": "cuda"
37
+ },
38
+ "outputs": {
39
+ "runtime": {
40
+ "device": "cuda",
41
+ "dtype": "bfloat16",
42
+ "attn_implementation": "sdpa"
43
+ },
44
+ "next_token_ids": [
45
+ 32340,
46
+ 37963
47
+ ],
48
+ "next_token_text": [
49
+ "'(",
50
+ "\ud68c"
51
+ ],
52
+ "probe_logits": [
53
+ [
54
+ -0.11083984375,
55
+ -0.0849609375,
56
+ -0.142578125,
57
+ -0.1435546875,
58
+ -0.1748046875
59
+ ],
60
+ [
61
+ -0.14453125,
62
+ -0.1435546875,
63
+ 0.1787109375,
64
+ -0.0908203125,
65
+ -0.19140625
66
+ ]
67
+ ],
68
+ "training": {
69
+ "loss": 10.799779891967773,
70
+ "gradients": {
71
+ "model.layers.0.self_attn.q_proj.weight": true,
72
+ "model.layers.0.mlp.c_fc.weight": true
73
+ },
74
+ "updated": true
75
+ }
76
+ }
77
+ }
integrations/transformers/expectations/cuda/starcoder2-3b-mic.eager.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "eager",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cu130",
15
+ "torchvision": "0.29.2",
16
+ "torchaudio": "2.11.0+cu130",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.4.6",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.16.0.dev0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 7.84,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2 (pinned 0.29.1)",
32
+ "numpy": "2.4.6 (pinned 2.3.5)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)",
34
+ "accelerate": "1.16.0.dev0 (pinned 1.15.0)"
35
+ },
36
+ "platform": "cuda"
37
+ },
38
+ "outputs": {
39
+ "runtime": {
40
+ "device": "cuda",
41
+ "dtype": "float32",
42
+ "attn_implementation": "eager"
43
+ },
44
+ "next_token_ids": [
45
+ 32340,
46
+ 37963
47
+ ],
48
+ "next_token_text": [
49
+ "'(",
50
+ "\ud68c"
51
+ ],
52
+ "probe_logits": [
53
+ [
54
+ -0.1095876470208168,
55
+ -0.08578762412071228,
56
+ -0.14188805222511292,
57
+ -0.14319227635860443,
58
+ -0.1746828556060791
59
+ ],
60
+ [
61
+ -0.14452379941940308,
62
+ -0.1429538130760193,
63
+ 0.17886760830879211,
64
+ -0.09121352434158325,
65
+ -0.19060999155044556
66
+ ]
67
+ ],
68
+ "training": {
69
+ "loss": 10.811941146850586,
70
+ "gradients": {
71
+ "model.layers.0.self_attn.q_proj.weight": true,
72
+ "model.layers.0.mlp.c_fc.weight": true
73
+ },
74
+ "updated": true
75
+ }
76
+ }
77
+ }
integrations/transformers/expectations/cuda/starcoder2-3b-mic.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recorded_with": {
3
+ "contract": "huggingface-mic/starcoder2-3b-mic",
4
+ "contract_name": "StarCoder2",
5
+ "contract_revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
6
+ "framework": "transformers",
7
+ "variant": "default",
8
+ "target": "starcoder2-3b-mic",
9
+ "kind": "fixture",
10
+ "revision": "006d3b17bb359c06674a08e5b06359f1aafbebcc",
11
+ "environment": {
12
+ "python": "3.11.18",
13
+ "transformers": "5.22.0.dev0",
14
+ "torch": "2.14.0+cu130",
15
+ "torchvision": "0.29.2",
16
+ "torchaudio": "2.11.0+cu130",
17
+ "tokenizers": "0.23.3",
18
+ "numpy": "2.4.6",
19
+ "pillow": "13.0.0",
20
+ "accelerate": "1.16.0.dev0",
21
+ "safetensors": "0.8.0",
22
+ "huggingface-hub": "2.3.0",
23
+ "sentencepiece": "0.2.2",
24
+ "protobuf": "7.36.2",
25
+ "librosa": "0.11.0",
26
+ "soundfile": "0.14.0",
27
+ "scipy": "1.17.1"
28
+ },
29
+ "seconds": 8.14,
30
+ "environment_differs": {
31
+ "torchvision": "0.29.2 (pinned 0.29.1)",
32
+ "numpy": "2.4.6 (pinned 2.3.5)",
33
+ "pillow": "13.0.0 (pinned 12.3.0)",
34
+ "accelerate": "1.16.0.dev0 (pinned 1.15.0)"
35
+ },
36
+ "platform": "cuda"
37
+ },
38
+ "outputs": {
39
+ "runtime": {
40
+ "device": "cuda",
41
+ "dtype": "float32",
42
+ "attn_implementation": "sdpa"
43
+ },
44
+ "next_token_ids": [
45
+ 32340,
46
+ 37963
47
+ ],
48
+ "next_token_text": [
49
+ "'(",
50
+ "\ud68c"
51
+ ],
52
+ "probe_logits": [
53
+ [
54
+ -0.10958769917488098,
55
+ -0.08578769862651825,
56
+ -0.14188802242279053,
57
+ -0.1431923508644104,
58
+ -0.1746828854084015
59
+ ],
60
+ [
61
+ -0.14452379941940308,
62
+ -0.1429538130760193,
63
+ 0.17886753380298615,
64
+ -0.09121351689100266,
65
+ -0.19060997664928436
66
+ ]
67
+ ],
68
+ "training": {
69
+ "loss": 10.8132963180542,
70
+ "gradients": {
71
+ "model.layers.0.self_attn.q_proj.weight": true,
72
+ "model.layers.0.mlp.c_fc.weight": true
73
+ },
74
+ "updated": true
75
+ }
76
+ }
77
+ }
integrations/transformers/usage.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # StarCoder2: causal language modeling with Transformers
2
+
3
+ This page is the Transformers contract of the StarCoder2 MIC and also a usage example. [doc-builder](https://github.com/huggingface/doc-builder/blob/main/docs/runnable-code-blocks.md) renders the `runnable` blocks below as documentation, and its pytest plugin runs them as written against `bigcode/starcoder2-3b`. The MIC runner runs the same blocks against the slim fixture and the checkpoint in [`integration.json`](../../integration.json). Lines marked `# doc-builder: hide` only matter there: they swap in the pinned checkpoint or variant and print the result record.
4
+
5
+ ## Next-token prediction
6
+
7
+ ```py runnable:starcoder2
8
+ import torch
9
+ from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed
10
+ import json # doc-builder: hide
11
+ import os # doc-builder: hide
12
+
13
+ model_id = "bigcode/starcoder2-3b"
14
+ model_id = os.environ.get("MIC_MODEL", model_id) # doc-builder: hide
15
+ variant = json.loads(os.environ.get("MIC_MODEL_KWARGS", "{}")) # doc-builder: hide
16
+ device = "cuda" if torch.cuda.is_available() else "cpu"
17
+ set_seed(0) # seeds torch, NumPy, and Python: loading and dropout draw random numbers
18
+
19
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
20
+ # StarCoder2 defines no pad token; left padding keeps the last position the real next-token slot.
21
+ if tokenizer.pad_token is None:
22
+ tokenizer.pad_token = tokenizer.eos_token
23
+ tokenizer.padding_side = "left"
24
+ model = AutoModelForCausalLM.from_pretrained(model_id).to(device)
25
+ if variant: # doc-builder: hide
26
+ del model # doc-builder: hide
27
+ model = AutoModelForCausalLM.from_pretrained(model_id, **variant).to(device) # doc-builder: hide
28
+ model.eval()
29
+
30
+ prompts = [
31
+ "def add(a, b):\n return a + b\n\ndef multiply(a, b):\n return",
32
+ "import numpy as np\n\ndef mean(xs):\n return np.",
33
+ ]
34
+ inputs = tokenizer(prompts, return_tensors="pt", padding=True).to(device)
35
+
36
+ with torch.no_grad():
37
+ logits = model(**inputs).logits
38
+ # Left padding: the last position of each row is the next-token prediction.
39
+ last_logits = logits[:, -1, :]
40
+ next_token_ids = last_logits.argmax(dim=-1)
41
+ next_token_text = tokenizer.batch_decode(next_token_ids.unsqueeze(-1))
42
+ print(next_token_text)
43
+ ```
44
+
45
+ ## One training step
46
+
47
+ ```py runnable:starcoder2:2
48
+ # Language-model labels: copy the ids and mask padded positions with -100.
49
+ labels = inputs["input_ids"].clone()
50
+ labels[inputs["attention_mask"] == 0] = -100
51
+
52
+ model.train()
53
+ optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
54
+ loss = model(**inputs, labels=labels).loss
55
+ loss.backward()
56
+ before = {n: p.detach().cpu().clone() for n, p in model.named_parameters() if p.requires_grad} # doc-builder: hide
57
+ optimizer.step()
58
+ print(f"loss: {loss.item():.4f}")
59
+
60
+ if os.environ.get("MIC_RUNNER"): # doc-builder: hide
61
+ named = dict(model.named_parameters())
62
+ checked = (
63
+ "model.layers.0.self_attn.q_proj.weight",
64
+ "model.layers.0.mlp.c_fc.weight",
65
+ )
66
+ probe_ids = next_token_ids.tolist()
67
+ result = {
68
+ "runtime": {
69
+ "device": model.device.type,
70
+ "dtype": str(model.dtype).removeprefix("torch."),
71
+ "attn_implementation": model.config._attn_implementation,
72
+ },
73
+ "next_token_ids": probe_ids,
74
+ "next_token_text": next_token_text,
75
+ "probe_logits": last_logits[:, :5].float().tolist(),
76
+ "training": {
77
+ "loss": loss.item(),
78
+ "gradients": {
79
+ n: bool(
80
+ named[n].grad is not None
81
+ and torch.count_nonzero(named[n].grad) > 0
82
+ and torch.isfinite(named[n].grad).all()
83
+ )
84
+ for n in checked
85
+ },
86
+ "updated": any(
87
+ not torch.equal(p.detach().cpu(), before[n])
88
+ for n, p in model.named_parameters()
89
+ if n in before
90
+ ),
91
+ },
92
+ }
93
+ print(json.dumps(result))
94
+ ```
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e02ed2bdffd25a57e35c3cebb45d5f51ddbecaf977919bfa46260d930e82247
3
+ size 12821560
special_tokens_map.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|endoftext|>",
4
+ "<fim_prefix>",
5
+ "<fim_middle>",
6
+ "<fim_suffix>",
7
+ "<fim_pad>",
8
+ "<repo_name>",
9
+ "<file_sep>",
10
+ "<issue_start>",
11
+ "<issue_comment>",
12
+ "<issue_closed>",
13
+ "<jupyter_start>",
14
+ "<jupyter_text>",
15
+ "<jupyter_code>",
16
+ "<jupyter_output>",
17
+ "<jupyter_script>",
18
+ "<empty_output>",
19
+ "<code_to_intermediate>",
20
+ "<intermediate_to_code>",
21
+ "<pr>",
22
+ "<pr_status>",
23
+ "<pr_is_merged>",
24
+ "<pr_base>",
25
+ "<pr_file>",
26
+ "<pr_base_code>",
27
+ "<pr_diff>",
28
+ "<pr_diff_hunk>",
29
+ "<pr_comment>",
30
+ "<pr_event_id>",
31
+ "<pr_review>",
32
+ "<pr_review_state>",
33
+ "<pr_review_comment>",
34
+ "<pr_in_reply_to_review_id>",
35
+ "<pr_in_reply_to_comment_id>",
36
+ "<pr_diff_hunk_comment_line>",
37
+ "<NAME>",
38
+ "<EMAIL>",
39
+ "<KEY>",
40
+ "<PASSWORD>"
41
+ ],
42
+ "bos_token": "<|endoftext|>",
43
+ "eos_token": "<|endoftext|>",
44
+ "unk_token": "<|endoftext|>"
45
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<fim_prefix>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "<fim_middle>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<fim_suffix>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<fim_pad>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "5": {
45
+ "content": "<repo_name>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "6": {
53
+ "content": "<file_sep>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "7": {
61
+ "content": "<issue_start>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "8": {
69
+ "content": "<issue_comment>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "9": {
77
+ "content": "<issue_closed>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "10": {
85
+ "content": "<jupyter_start>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "11": {
93
+ "content": "<jupyter_text>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "12": {
101
+ "content": "<jupyter_code>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "13": {
109
+ "content": "<jupyter_output>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "14": {
117
+ "content": "<jupyter_script>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": true
123
+ },
124
+ "15": {
125
+ "content": "<empty_output>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": true
131
+ },
132
+ "16": {
133
+ "content": "<code_to_intermediate>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": true
139
+ },
140
+ "17": {
141
+ "content": "<intermediate_to_code>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": true
147
+ },
148
+ "18": {
149
+ "content": "<pr>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": true
155
+ },
156
+ "19": {
157
+ "content": "<pr_status>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": true
163
+ },
164
+ "20": {
165
+ "content": "<pr_is_merged>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": true
171
+ },
172
+ "21": {
173
+ "content": "<pr_base>",
174
+ "lstrip": false,
175
+ "normalized": false,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": true
179
+ },
180
+ "22": {
181
+ "content": "<pr_file>",
182
+ "lstrip": false,
183
+ "normalized": false,
184
+ "rstrip": false,
185
+ "single_word": false,
186
+ "special": true
187
+ },
188
+ "23": {
189
+ "content": "<pr_base_code>",
190
+ "lstrip": false,
191
+ "normalized": false,
192
+ "rstrip": false,
193
+ "single_word": false,
194
+ "special": true
195
+ },
196
+ "24": {
197
+ "content": "<pr_diff>",
198
+ "lstrip": false,
199
+ "normalized": false,
200
+ "rstrip": false,
201
+ "single_word": false,
202
+ "special": true
203
+ },
204
+ "25": {
205
+ "content": "<pr_diff_hunk>",
206
+ "lstrip": false,
207
+ "normalized": false,
208
+ "rstrip": false,
209
+ "single_word": false,
210
+ "special": true
211
+ },
212
+ "26": {
213
+ "content": "<pr_comment>",
214
+ "lstrip": false,
215
+ "normalized": false,
216
+ "rstrip": false,
217
+ "single_word": false,
218
+ "special": true
219
+ },
220
+ "27": {
221
+ "content": "<pr_event_id>",
222
+ "lstrip": false,
223
+ "normalized": false,
224
+ "rstrip": false,
225
+ "single_word": false,
226
+ "special": true
227
+ },
228
+ "28": {
229
+ "content": "<pr_review>",
230
+ "lstrip": false,
231
+ "normalized": false,
232
+ "rstrip": false,
233
+ "single_word": false,
234
+ "special": true
235
+ },
236
+ "29": {
237
+ "content": "<pr_review_state>",
238
+ "lstrip": false,
239
+ "normalized": false,
240
+ "rstrip": false,
241
+ "single_word": false,
242
+ "special": true
243
+ },
244
+ "30": {
245
+ "content": "<pr_review_comment>",
246
+ "lstrip": false,
247
+ "normalized": false,
248
+ "rstrip": false,
249
+ "single_word": false,
250
+ "special": true
251
+ },
252
+ "31": {
253
+ "content": "<pr_in_reply_to_review_id>",
254
+ "lstrip": false,
255
+ "normalized": false,
256
+ "rstrip": false,
257
+ "single_word": false,
258
+ "special": true
259
+ },
260
+ "32": {
261
+ "content": "<pr_in_reply_to_comment_id>",
262
+ "lstrip": false,
263
+ "normalized": false,
264
+ "rstrip": false,
265
+ "single_word": false,
266
+ "special": true
267
+ },
268
+ "33": {
269
+ "content": "<pr_diff_hunk_comment_line>",
270
+ "lstrip": false,
271
+ "normalized": false,
272
+ "rstrip": false,
273
+ "single_word": false,
274
+ "special": true
275
+ },
276
+ "34": {
277
+ "content": "<NAME>",
278
+ "lstrip": false,
279
+ "normalized": false,
280
+ "rstrip": false,
281
+ "single_word": false,
282
+ "special": true
283
+ },
284
+ "35": {
285
+ "content": "<EMAIL>",
286
+ "lstrip": false,
287
+ "normalized": false,
288
+ "rstrip": false,
289
+ "single_word": false,
290
+ "special": true
291
+ },
292
+ "36": {
293
+ "content": "<KEY>",
294
+ "lstrip": false,
295
+ "normalized": false,
296
+ "rstrip": false,
297
+ "single_word": false,
298
+ "special": true
299
+ },
300
+ "37": {
301
+ "content": "<PASSWORD>",
302
+ "lstrip": false,
303
+ "normalized": false,
304
+ "rstrip": false,
305
+ "single_word": false,
306
+ "special": true
307
+ }
308
+ },
309
+ "additional_special_tokens": [
310
+ "<|endoftext|>",
311
+ "<fim_prefix>",
312
+ "<fim_middle>",
313
+ "<fim_suffix>",
314
+ "<fim_pad>",
315
+ "<repo_name>",
316
+ "<file_sep>",
317
+ "<issue_start>",
318
+ "<issue_comment>",
319
+ "<issue_closed>",
320
+ "<jupyter_start>",
321
+ "<jupyter_text>",
322
+ "<jupyter_code>",
323
+ "<jupyter_output>",
324
+ "<jupyter_script>",
325
+ "<empty_output>",
326
+ "<code_to_intermediate>",
327
+ "<intermediate_to_code>",
328
+ "<pr>",
329
+ "<pr_status>",
330
+ "<pr_is_merged>",
331
+ "<pr_base>",
332
+ "<pr_file>",
333
+ "<pr_base_code>",
334
+ "<pr_diff>",
335
+ "<pr_diff_hunk>",
336
+ "<pr_comment>",
337
+ "<pr_event_id>",
338
+ "<pr_review>",
339
+ "<pr_review_state>",
340
+ "<pr_review_comment>",
341
+ "<pr_in_reply_to_review_id>",
342
+ "<pr_in_reply_to_comment_id>",
343
+ "<pr_diff_hunk_comment_line>",
344
+ "<NAME>",
345
+ "<EMAIL>",
346
+ "<KEY>",
347
+ "<PASSWORD>"
348
+ ],
349
+ "bos_token": "<|endoftext|>",
350
+ "clean_up_tokenization_spaces": true,
351
+ "eos_token": "<|endoftext|>",
352
+ "model_max_length": 1000000000000000019884624838656,
353
+ "tokenizer_class": "GPT2Tokenizer",
354
+ "unk_token": "<|endoftext|>",
355
+ "vocab_size": 49152
356
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff