husnainbinmunawar commited on
Commit
3564272
·
verified ·
1 Parent(s): 48b32a2

Publish MicroLM structured semantics model

Browse files
Files changed (6) hide show
  1. README.md +11 -0
  2. config.json +12 -0
  3. data_manifest.json +55 -0
  4. evaluation.json +175 -0
  5. model.safetensors +3 -0
  6. training_manifest.json +222 -0
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - structured-output
6
+ - instruction-following
7
+ ---
8
+
9
+ # MicroLM structured semantics
10
+
11
+ A small model trained from random initialization on Apache-2.0 HuggingFaceH4 instruction records. It predicts category, subcategory, and a documented response-shape field, then emits constrained JSON. Category/subcategory metrics cover source-labeled records only; this is not a general instruction-following model.
config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "microlm_structured_semantics",
3
+ "vocab_size": 119,
4
+ "embedding_dim": 48,
5
+ "hidden_dim": 96,
6
+ "category_count": 6,
7
+ "subcategory_count": 21,
8
+ "shape_count": 5,
9
+ "real_data": true,
10
+ "source_dataset": "HuggingFaceH4/instruction-dataset",
11
+ "constrained_json": true
12
+ }
data_manifest.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_id": "microlm-h4-instruction-structured-v1",
3
+ "source_url": "https://huggingface.co/datasets/HuggingFaceH4/instruction-dataset/resolve/main/step3-eval.jsonl",
4
+ "source_dataset": "HuggingFaceH4/instruction-dataset",
5
+ "source_license": "Apache-2.0",
6
+ "redistribution_status": "PERMITTED_DERIVED_RECORDS_WITH_ATTRIBUTION",
7
+ "raw_sha256": "0111856e00a8cb645ed7e21b826930185a1416046d3f0468e0cc0f4de5397021",
8
+ "processed_sha256": "0cb19ef9191b7e26accc85f2cbb9604468488b6e0c61914036f953e925f23379",
9
+ "records_sha256": "7cb6efa2bab413e550a6942115ff1c9bdc8addb369244cc8c64573fab947c827",
10
+ "records": 327,
11
+ "train_records": 261,
12
+ "validation_records": 66,
13
+ "metadata_labeled_records": 75,
14
+ "categories": [
15
+ "Brainstorm",
16
+ "Commonsense/logic",
17
+ "Generation",
18
+ "Natural language to code",
19
+ "Question Answering",
20
+ "Summarization"
21
+ ],
22
+ "subcategories": [
23
+ "Adding comments",
24
+ "Chain of Thought - answer the question, but explain the reasoning that led to the answer",
25
+ "Conversation",
26
+ "Debugging",
27
+ "ELI5",
28
+ "Email",
29
+ "Factual",
30
+ "Food",
31
+ "Interative QA",
32
+ "Letters",
33
+ "Make a list",
34
+ "Math",
35
+ "Movie",
36
+ "News",
37
+ "Paper",
38
+ "Poetry generation",
39
+ "Rewriting",
40
+ "Story generation",
41
+ "World knowledge",
42
+ "code explanation",
43
+ "code generation"
44
+ ],
45
+ "response_shapes": [
46
+ "code",
47
+ "dialogue",
48
+ "list",
49
+ "numeric",
50
+ "prose"
51
+ ],
52
+ "max_length": 256,
53
+ "split": "deterministic shuffled 80/20; semantic labels remain source metadata where present; response_shape is a documented derived rule",
54
+ "raw_source_not_republished": false
55
+ }
evaluation.json ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "PASS",
3
+ "project_id": "07-MicroLM",
4
+ "checkpoint_sha256": "e21b9869c21e0b9137404569940a0fd21e09f4c7482343fcbb2a6f72427c6021",
5
+ "loaded_parameter_hash": "a161a8f5679fc3395dbc9fa301fd405811138449cb2eaad3d7a76b75b7223962",
6
+ "training_parameter_hash": "a161a8f5679fc3395dbc9fa301fd405811138449cb2eaad3d7a76b75b7223962",
7
+ "checkpoint_matches_manifest": true,
8
+ "validation_records": 66,
9
+ "metadata_labeled_validation_records": 14,
10
+ "category_accuracy": 0.42857142857142855,
11
+ "subcategory_accuracy": 0.21428571428571427,
12
+ "response_shape_accuracy": 0.696969696969697,
13
+ "category_majority_baseline": 0.42857142857142855,
14
+ "subcategory_majority_baseline": 0.14285714285714285,
15
+ "response_shape_majority_baseline": 0.696969696969697,
16
+ "schema_execution_rate": 1.0,
17
+ "constrained_pair_execution_rate": 1.0,
18
+ "response_shape_execution_rate": 0.696969696969697,
19
+ "valid_pair_count": 20,
20
+ "examples": [
21
+ {
22
+ "expected_category": "Summarization",
23
+ "predicted_category": "Generation",
24
+ "expected_subcategory": "Conversation",
25
+ "predicted_subcategory": "Make a list",
26
+ "expected_response_shape": "prose",
27
+ "predicted_response_shape": "prose",
28
+ "constrained_json": {
29
+ "instruction_id": 52,
30
+ "category": "Generation",
31
+ "subcategory": "Make a list",
32
+ "response_shape": "prose"
33
+ },
34
+ "execution_checks": {
35
+ "schema_valid": true,
36
+ "observed_category_subcategory_pair": true,
37
+ "response_shape_match": false
38
+ }
39
+ },
40
+ {
41
+ "expected_category": null,
42
+ "predicted_category": "Generation",
43
+ "expected_subcategory": null,
44
+ "predicted_subcategory": "Make a list",
45
+ "expected_response_shape": "prose",
46
+ "predicted_response_shape": "prose",
47
+ "constrained_json": {
48
+ "instruction_id": 118,
49
+ "category": "Generation",
50
+ "subcategory": "Make a list",
51
+ "response_shape": "prose"
52
+ },
53
+ "execution_checks": {
54
+ "schema_valid": true,
55
+ "observed_category_subcategory_pair": true,
56
+ "response_shape_match": true
57
+ }
58
+ },
59
+ {
60
+ "expected_category": null,
61
+ "predicted_category": "Natural language to code",
62
+ "expected_subcategory": null,
63
+ "predicted_subcategory": "Interative QA",
64
+ "expected_response_shape": "prose",
65
+ "predicted_response_shape": "prose",
66
+ "constrained_json": {
67
+ "instruction_id": 241,
68
+ "category": "Natural language to code",
69
+ "subcategory": "Interative QA",
70
+ "response_shape": "prose"
71
+ },
72
+ "execution_checks": {
73
+ "schema_valid": true,
74
+ "observed_category_subcategory_pair": true,
75
+ "response_shape_match": true
76
+ }
77
+ },
78
+ {
79
+ "expected_category": null,
80
+ "predicted_category": "Generation",
81
+ "expected_subcategory": null,
82
+ "predicted_subcategory": "Make a list",
83
+ "expected_response_shape": "prose",
84
+ "predicted_response_shape": "prose",
85
+ "constrained_json": {
86
+ "instruction_id": 146,
87
+ "category": "Generation",
88
+ "subcategory": "Make a list",
89
+ "response_shape": "prose"
90
+ },
91
+ "execution_checks": {
92
+ "schema_valid": true,
93
+ "observed_category_subcategory_pair": true,
94
+ "response_shape_match": true
95
+ }
96
+ },
97
+ {
98
+ "expected_category": null,
99
+ "predicted_category": "Generation",
100
+ "expected_subcategory": null,
101
+ "predicted_subcategory": "Story generation",
102
+ "expected_response_shape": "prose",
103
+ "predicted_response_shape": "prose",
104
+ "constrained_json": {
105
+ "instruction_id": 253,
106
+ "category": "Generation",
107
+ "subcategory": "Story generation",
108
+ "response_shape": "prose"
109
+ },
110
+ "execution_checks": {
111
+ "schema_valid": true,
112
+ "observed_category_subcategory_pair": true,
113
+ "response_shape_match": false
114
+ }
115
+ },
116
+ {
117
+ "expected_category": null,
118
+ "predicted_category": "Commonsense/logic",
119
+ "expected_subcategory": null,
120
+ "predicted_subcategory": "World knowledge",
121
+ "expected_response_shape": "prose",
122
+ "predicted_response_shape": "prose",
123
+ "constrained_json": {
124
+ "instruction_id": 177,
125
+ "category": "Commonsense/logic",
126
+ "subcategory": "World knowledge",
127
+ "response_shape": "prose"
128
+ },
129
+ "execution_checks": {
130
+ "schema_valid": true,
131
+ "observed_category_subcategory_pair": true,
132
+ "response_shape_match": false
133
+ }
134
+ },
135
+ {
136
+ "expected_category": "Generation",
137
+ "predicted_category": "Summarization",
138
+ "expected_subcategory": "Story generation",
139
+ "predicted_subcategory": "Paper",
140
+ "expected_response_shape": "prose",
141
+ "predicted_response_shape": "prose",
142
+ "constrained_json": {
143
+ "instruction_id": 9,
144
+ "category": "Summarization",
145
+ "subcategory": "Paper",
146
+ "response_shape": "prose"
147
+ },
148
+ "execution_checks": {
149
+ "schema_valid": true,
150
+ "observed_category_subcategory_pair": true,
151
+ "response_shape_match": false
152
+ }
153
+ },
154
+ {
155
+ "expected_category": "Generation",
156
+ "predicted_category": "Summarization",
157
+ "expected_subcategory": "Story generation",
158
+ "predicted_subcategory": "Paper",
159
+ "expected_response_shape": "prose",
160
+ "predicted_response_shape": "prose",
161
+ "constrained_json": {
162
+ "instruction_id": 20,
163
+ "category": "Summarization",
164
+ "subcategory": "Paper",
165
+ "response_shape": "prose"
166
+ },
167
+ "execution_checks": {
168
+ "schema_valid": true,
169
+ "observed_category_subcategory_pair": true,
170
+ "response_shape_match": true
171
+ }
172
+ }
173
+ ],
174
+ "disclosure": "Category/subcategory metrics apply only to records with source metadata; response_shape is derived from completion form. Constrained JSON guarantees structural validity and observed label pairs, not general semantic understanding."
175
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:398bd187e89da637d3e4284de3b8c616e6406dfa88618a62eade20eb9b414b01
3
+ size 92208
training_manifest.json ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "created_at": "2026-11-25T17:32:29+0500",
3
+ "experiment_id": "microlm-structured-semantics-1795609949",
4
+ "project_id": "07-MicroLM",
5
+ "model_architecture": "random-initialized mean-pooled character semantic classifier with category/subcategory/response-shape heads",
6
+ "parameter_count": 22832,
7
+ "random_seed": 20261125,
8
+ "dataset_path": "E:\\HuggingFace Portfolio Development\\07-MicroLM\\experiments\\structured\\structured_semantics.npz",
9
+ "dataset_manifest": "E:\\HuggingFace Portfolio Development\\07-MicroLM\\experiments\\structured\\structured_instruction_data_manifest.json",
10
+ "dataset_fingerprint": "0cb19ef9191b7e26accc85f2cbb9604468488b6e0c61914036f953e925f23379",
11
+ "training_samples": 261,
12
+ "validation_samples": 66,
13
+ "training_steps": 270,
14
+ "epochs": 30,
15
+ "training_duration_seconds": 2.522987100001046,
16
+ "cpu_configuration": {
17
+ "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]",
18
+ "platform": "Windows-11-10.0.22631-SP0",
19
+ "torch": "2.7.1+cpu",
20
+ "torch_threads": 2,
21
+ "torch_interop_threads": 1,
22
+ "omp": "2",
23
+ "mkl": "2",
24
+ "openblas": "2"
25
+ },
26
+ "resource_after": {
27
+ "pid": 7224,
28
+ "cpu_count": 4,
29
+ "free_disk_bytes": 190099193856,
30
+ "memory_total_bytes": 8459083776,
31
+ "memory_available_bytes": 2553135104,
32
+ "memory_percent": 69.8
33
+ },
34
+ "initial_parameter_hash": "c07c28ba557b00f2ce80cbcd8118b9170127684a03bd28d0aaaf9cad4a3019ce",
35
+ "final_parameter_hash": "a161a8f5679fc3395dbc9fa301fd405811138449cb2eaad3d7a76b75b7223962",
36
+ "checkpoint_path": "E:\\HuggingFace Portfolio Development\\07-MicroLM\\checkpoints\\microlm_structured_semantics.pt",
37
+ "checkpoint_sha256": "e21b9869c21e0b9137404569940a0fd21e09f4c7482343fcbb2a6f72427c6021",
38
+ "loss_history": [
39
+ {
40
+ "epoch": 1,
41
+ "category": 1.5755709542168512,
42
+ "subcategory": 2.7212373150719538,
43
+ "shape": 1.289902687072754
44
+ },
45
+ {
46
+ "epoch": 2,
47
+ "category": 1.5707872841093276,
48
+ "subcategory": 2.6604162057240806,
49
+ "shape": 0.7713275485568576
50
+ },
51
+ {
52
+ "epoch": 3,
53
+ "category": 1.7639912631776598,
54
+ "subcategory": 2.8945578469170465,
55
+ "shape": 0.6837917268276215
56
+ },
57
+ {
58
+ "epoch": 4,
59
+ "category": 1.5090852048661973,
60
+ "subcategory": 2.6116135120391846,
61
+ "shape": 0.6546087695492638
62
+ },
63
+ {
64
+ "epoch": 5,
65
+ "category": 1.6559739510218303,
66
+ "subcategory": 2.9196150567796497,
67
+ "shape": 0.7660661240418752
68
+ },
69
+ {
70
+ "epoch": 6,
71
+ "category": 1.6183914343516033,
72
+ "subcategory": 2.8126838207244873,
73
+ "shape": 0.6556061539385054
74
+ },
75
+ {
76
+ "epoch": 7,
77
+ "category": 1.666810115178426,
78
+ "subcategory": 2.85990399784512,
79
+ "shape": 0.6777275635136498
80
+ },
81
+ {
82
+ "epoch": 8,
83
+ "category": 1.63411545753479,
84
+ "subcategory": 2.8066883616977267,
85
+ "shape": 0.7116946114434136
86
+ },
87
+ {
88
+ "epoch": 9,
89
+ "category": 1.4840929905573528,
90
+ "subcategory": 2.6291724973254733,
91
+ "shape": 0.7036731375588311
92
+ },
93
+ {
94
+ "epoch": 10,
95
+ "category": 1.307754808002048,
96
+ "subcategory": 2.3736986584133573,
97
+ "shape": 0.6525594807333417
98
+ },
99
+ {
100
+ "epoch": 11,
101
+ "category": 1.3328481978840299,
102
+ "subcategory": 2.4901075628068714,
103
+ "shape": 0.6467757291264005
104
+ },
105
+ {
106
+ "epoch": 12,
107
+ "category": 1.228523804081811,
108
+ "subcategory": 2.445472690794203,
109
+ "shape": 0.639786915646659
110
+ },
111
+ {
112
+ "epoch": 13,
113
+ "category": 1.1045865482754178,
114
+ "subcategory": 2.2641823159323797,
115
+ "shape": 0.6049923068947263
116
+ },
117
+ {
118
+ "epoch": 14,
119
+ "category": 1.1463988025983174,
120
+ "subcategory": 2.2044076124827066,
121
+ "shape": 0.6242107252279917
122
+ },
123
+ {
124
+ "epoch": 15,
125
+ "category": 0.9875853260358175,
126
+ "subcategory": 2.0640588071611194,
127
+ "shape": 0.6270013385348849
128
+ },
129
+ {
130
+ "epoch": 16,
131
+ "category": 0.8831627633836534,
132
+ "subcategory": 1.849298848046197,
133
+ "shape": 0.589970178074307
134
+ },
135
+ {
136
+ "epoch": 17,
137
+ "category": 0.8005372087160746,
138
+ "subcategory": 1.6607982913653057,
139
+ "shape": 0.6166501972410414
140
+ },
141
+ {
142
+ "epoch": 18,
143
+ "category": 0.6986624267366197,
144
+ "subcategory": 1.5286969078911676,
145
+ "shape": 0.5784488717714945
146
+ },
147
+ {
148
+ "epoch": 19,
149
+ "category": 0.8649311165014902,
150
+ "subcategory": 1.7018776734670003,
151
+ "shape": 0.590764946407742
152
+ },
153
+ {
154
+ "epoch": 20,
155
+ "category": 0.7162091268433465,
156
+ "subcategory": 1.6295803520414565,
157
+ "shape": 0.5786904046932856
158
+ },
159
+ {
160
+ "epoch": 21,
161
+ "category": 0.6961483707030615,
162
+ "subcategory": 1.4940087265438504,
163
+ "shape": 0.6284483042028215
164
+ },
165
+ {
166
+ "epoch": 22,
167
+ "category": 0.7434483236736722,
168
+ "subcategory": 1.5075671540366278,
169
+ "shape": 0.6250970330503252
170
+ },
171
+ {
172
+ "epoch": 23,
173
+ "category": 0.6759242349200778,
174
+ "subcategory": 1.386982672744327,
175
+ "shape": 0.5757536855008867
176
+ },
177
+ {
178
+ "epoch": 24,
179
+ "category": 0.6126375165250566,
180
+ "subcategory": 1.2024913363986545,
181
+ "shape": 0.6393938064575195
182
+ },
183
+ {
184
+ "epoch": 25,
185
+ "category": 0.6226787078711722,
186
+ "subcategory": 1.2709604965315924,
187
+ "shape": 0.5676668650574155
188
+ },
189
+ {
190
+ "epoch": 26,
191
+ "category": 0.7890955093834136,
192
+ "subcategory": 1.3330248991648357,
193
+ "shape": 0.6821747124195099
194
+ },
195
+ {
196
+ "epoch": 27,
197
+ "category": 0.7156598700417413,
198
+ "subcategory": 1.338976310359107,
199
+ "shape": 0.6124653584427304
200
+ },
201
+ {
202
+ "epoch": 28,
203
+ "category": 0.573256741795275,
204
+ "subcategory": 1.2890794277191162,
205
+ "shape": 0.5712455411752065
206
+ },
207
+ {
208
+ "epoch": 29,
209
+ "category": 0.4997074355681737,
210
+ "subcategory": 1.2298186487621732,
211
+ "shape": 0.697247326374054
212
+ },
213
+ {
214
+ "epoch": 30,
215
+ "category": 0.4367860621876187,
216
+ "subcategory": 0.9853386084238688,
217
+ "shape": 0.5761487914456261
218
+ }
219
+ ],
220
+ "experiment_status": "PASS",
221
+ "data_disclosure": "Apache-2.0 instruction records; category/subcategory use source metadata where available and response_shape is a documented derived rule."
222
+ }