appvoid commited on
Commit
4106468
·
verified ·
1 Parent(s): eeb4100

Make fixed 1000-task fast edition the default (0.2.0)

Browse files

Batch 64 with OOM backoff, length/budget buckets, cached decoding and no per-token CPU streamer. Versioned 96–256 output budgets. Preserve full2000 as an archived config. Full sandbox reference execution and GPU throughput remain unverified.

README.md CHANGED
@@ -10,32 +10,37 @@ tags:
10
  - multilingual
11
  configs:
12
  - config_name: default
 
13
  data_files:
14
  - split: test
15
  path: data/smolscript.parquet
 
 
 
 
16
  ---
17
  # SmolScript
18
 
19
- An original execution-based benchmark of basic programming for 25M–350M parameter language models. Version **0.1.0**, **2,000 examples**, nine languages, MIT license.
20
 
21
- **Release status: execution-unverified candidate.** All 2,000 records have been generated and statically validated. No complete reference execution run or model baseline is claimed. The authoring environment has no Docker/Podman daemon; all 2,000 reference solutions and their negative controls still require execution in the supplied sandbox image. See `validation_report.json` for the machine-readable audit. Do not treat this candidate as a validated leaderboard release until `python validate.py` succeeds.
22
 
23
  ## Composition
24
 
25
  | Language | Easy | Medium | Moderate | Total |
26
  |---|---:|---:|---:|---:|
27
- | Python | 150 | 75 | 25 | 250 |
28
- | JavaScript | 150 | 75 | 25 | 250 |
29
- | HTML | 120 | 60 | 20 | 200 |
30
- | CSS | 120 | 60 | 20 | 200 |
31
- | C++ | 135 | 68 | 22 | 225 |
32
- | C | 135 | 68 | 22 | 225 |
33
- | Lua | 120 | 60 | 20 | 200 |
34
- | C# | 135 | 67 | 23 | 225 |
35
- | Rust | 135 | 67 | 23 | 225 |
36
- | **Total** | **1,200** | **600** | **200** | **2,000** |
37
-
38
- Programming tasks cover arithmetic and conditions, ASCII string transformations, filtered collection reductions, frequency tables, and short combinations of basic operations. JavaScript includes 20 browser DOM/event tasks. HTML tasks check elements, attributes, text, and nesting. CSS tasks check computed properties, selector scope, unaffected distractors, flex row/column geometry, and responsive breakpoints. No generated solution uses external packages.
39
 
40
  Tasks are original compositions from an explicit operation grammar, not scraped HumanEval/MBPP/MultiPL-E questions. Variants change operations and observable behavior, not just names or numbers. Shared tasks across programming languages are intentional translations for comparative coverage. Within each language, deterministic behavioral probe fingerprints reject equivalent programming tasks. Web tasks have unique structural specs. Trigram similarity flags are reported; the seven retained pairs differ in count versus sum and have distinct behavior. This is a finite behavioral/structural audit, not a mathematical proof of semantic uniqueness. Difficulty labels are design judgments; empirical calibration on small models remains future work.
41
 
@@ -66,7 +71,7 @@ python -m unittest discover -s tests -v
66
  python generators/build.py # Deterministically regenerate all artifacts
67
  ```
68
 
69
- `validate.py` checks every reference against every hidden test and rejects a deliberately wrong solution for every task. For programming tasks it also checks a plausible near-miss mutation where the hidden inputs distinguish it (missing transformation stage, mapping, or filter). Failure stops validation with the task ID. Missing sandbox/runtime exits 2 and records unverified coverage. Static-only success never marks execution as passed. The reference ASTs for all 250 Python tasks are also parsed by the local unit suite.
70
 
71
  ## Evaluate a model
72
 
@@ -76,7 +81,7 @@ python evaluate.py --model HuggingFaceTB/SmolLM2-135M --output results.json --re
76
  python evaluate.py --model HuggingFaceTB/SmolLM2-135M --language python rust --difficulty easy --output subset.json
77
  ```
78
 
79
- One fixed completion prompt (`smolscript-completion-v1`), one generation, seed 0, greedy decoding, no beam search, and a fixed 384-token output cap. The same completion template is used for base and instruction models; no model-specific chat template is applied. The model revision resolves to an immutable commit and is retained on resume. Use `--revision SHA` for an explicit pin. Prompts contain only instructions, signature, input domain, and web fixture/base styles. References, public examples, hidden tests, and expected answers are never sent to the model.
80
 
81
  Existing files require `--resume`. Settings, dataset/runner hashes, image ID and selected IDs must match. Completed task results are checkpointed atomically; a generated response is saved before execution, so an execution interruption can reuse it. Partial runs never receive a full score. Use one process per output path (a file lock enforces this). Context overflow is an explicit failure; input prompts are never silently truncated.
82
 
@@ -108,3 +113,12 @@ metadata = json.loads(rows[0]['metadata'])
108
  ```
109
 
110
  The generator, runners and audit reports are included in this repository. Record the Hugging Face repository commit, manifest checksums, generation settings, dependency versions and image ID with any reported result.
 
 
 
 
 
 
 
 
 
 
10
  - multilingual
11
  configs:
12
  - config_name: default
13
+ default: true
14
  data_files:
15
  - split: test
16
  path: data/smolscript.parquet
17
+ - config_name: full2000
18
+ data_files:
19
+ - split: test
20
+ path: archive/v0.1.0/smolscript.parquet
21
  ---
22
  # SmolScript
23
 
24
+ An original execution-based benchmark of basic programming for 25M–350M parameter language models. Version **0.2.0**, **1,000 default examples**, nine languages, MIT license.
25
 
26
+ **Release status: execution-unverified candidate.** All 1,000 default records have been generated and statically validated. No complete reference execution run or model baseline is claimed. The authoring environment has no Docker/Podman daemon; all 1,000 default reference solutions and their negative controls still require execution in the supplied sandbox image. See `validation_report.json` for the machine-readable audit. Do not treat this candidate as a validated leaderboard release until `python validate.py` succeeds.
27
 
28
  ## Composition
29
 
30
  | Language | Easy | Medium | Moderate | Total |
31
  |---|---:|---:|---:|---:|
32
+ | Python | 75 | 38 | 12 | 125 |
33
+ | JavaScript | 75 | 37 | 13 | 125 |
34
+ | HTML | 60 | 30 | 10 | 100 |
35
+ | CSS | 60 | 30 | 10 | 100 |
36
+ | C++ | 68 | 34 | 11 | 113 |
37
+ | C | 68 | 34 | 11 | 113 |
38
+ | Lua | 60 | 30 | 10 | 100 |
39
+ | C# | 67 | 34 | 11 | 112 |
40
+ | Rust | 67 | 33 | 12 | 112 |
41
+ | **Total** | **600** | **300** | **100** | **1,000** |
42
+
43
+ Programming tasks cover arithmetic and conditions, ASCII string transformations, filtered collection reductions, frequency tables, and short combinations of basic operations. JavaScript includes 10 browser DOM/event tasks in the default subset. HTML tasks check elements, attributes, text, and nesting. CSS tasks check computed properties, selector scope, unaffected distractors, flex row/column geometry, and responsive breakpoints. No generated solution uses external packages.
44
 
45
  Tasks are original compositions from an explicit operation grammar, not scraped HumanEval/MBPP/MultiPL-E questions. Variants change operations and observable behavior, not just names or numbers. Shared tasks across programming languages are intentional translations for comparative coverage. Within each language, deterministic behavioral probe fingerprints reject equivalent programming tasks. Web tasks have unique structural specs. Trigram similarity flags are reported; the seven retained pairs differ in count versus sum and have distinct behavior. This is a finite behavioral/structural audit, not a mathematical proof of semantic uniqueness. Difficulty labels are design judgments; empirical calibration on small models remains future work.
46
 
 
71
  python generators/build.py # Deterministically regenerate all artifacts
72
  ```
73
 
74
+ `validate.py` checks every reference against every hidden test and rejects a deliberately wrong solution for every task. For programming tasks it also checks a plausible near-miss mutation where the hidden inputs distinguish it (missing transformation stage, mapping, or filter). Failure stops validation with the task ID. Missing sandbox/runtime exits 2 and records unverified coverage. Static-only success never marks execution as passed. The reference ASTs for all 125 Python tasks are also parsed by the local unit suite.
75
 
76
  ## Evaluate a model
77
 
 
81
  python evaluate.py --model HuggingFaceTB/SmolLM2-135M --language python rust --difficulty easy --output subset.json
82
  ```
83
 
84
+ One fixed completion prompt (`smolscript-completion-v1`), one generation, seed 0, greedy decoding, no beam search, and versioned task budgets from 96 to 256 tokens. Starting batch size is 64, with automatic CUDA OOM backoff. Prompts are grouped by token budget and length; KV caching and supported last-token logits optimizations are enabled. Progress is reported between batches, avoiding per-token GPU-to-CPU synchronization. The same completion template is used for base and instruction models; no model-specific chat template is applied. The model revision resolves to an immutable commit and is retained on resume. Use `--revision SHA` for an explicit pin. Prompts contain only instructions, signature, input domain, and web fixture/base styles. References, public examples, hidden tests, and expected answers are never sent to the model.
85
 
86
  Existing files require `--resume`. Settings, dataset/runner hashes, image ID and selected IDs must match. Completed task results are checkpointed atomically; a generated response is saved before execution, so an execution interruption can reuse it. Partial runs never receive a full score. Use one process per output path (a file lock enforces this). Context overflow is an explicit failure; input prompts are never silently truncated.
87
 
 
113
  ```
114
 
115
  The generator, runners and audit reports are included in this repository. Record the Hugging Face repository commit, manifest checksums, generation settings, dependency versions and image ID with any reported result.
116
+
117
+
118
+ ## Fast default (0.2.0)
119
+
120
+ The default split and both local/Modal evaluators now use the same fixed 1,000 IDs, selected from the original edition by deterministic SHA256 ranking within language, difficulty, family and category strata. The selection manifest lists every ID and its hash. IDs, instructions, references and tests are preserved for selected tasks. The original 2,000-task edition is archived under `archive/v0.1.0`; Hugging Face users can request config `full2000`. Current evaluation commands use the 1,000-task edition.
121
+
122
+ The language budgets (before a 32-token moderate-task allowance, capped at 256) are Python 128, JavaScript 192, HTML 160, CSS 96, C++ 224, C 256, Lua 160, C# 256, Rust 256. They depend only on language/difficulty, never reference solutions. `--max-new-tokens N` overrides these budgets for a separately recorded experiment; `--batch-size N` overrides the default 64. A response that hits its cap is scored as generated; incorrect or incomplete code still fails the normal execution tests. Generation statistics include token-limit completions, OOM retries, final batch size, elapsed generation time and measured token throughput.
123
+
124
+ Example: `python evaluate.py --model HuggingFaceTB/SmolLM2-135M --batch-size 64 --output results-v020.json`. Generated batches are checkpointed before execution, and resume skips their inference. Numerical batching differences can change greedy outputs for near-tied logits. This release changes both the task count and output budgets, so its scores must not be merged with 0.1.0 results. Template IDs are `smolscript-0.2.0` and `cognirank2-v2`; use a new output path. No GPU throughput speedup is claimed without a measured run.
SHA256SUMS CHANGED
@@ -1,27 +1,35 @@
1
  ff73ee904edc9381bd1ea24847e41c6176aec22ba4b63321e8354562f24ba5ce .gitignore
2
  8719af4397a8387b8f04140613943545f8ecd90f06529dcab9e68a94927d13fe LICENSE
3
- 24908849b2c3cac77e1c0cc1aa82b943c4f8c377bc3930b526f0e4f49e1fa7de README.md
4
- 1926bca1b0c6b2244554577135a9c3c305b18fd834c654803b4e8480fff0d3d9 data/smolscript.jsonl
5
- 7bf25948750648aa036bdf277cfd7c38597c98aa06131e805628b9055a7938d9 data/smolscript.parquet
6
- d6e1f0dddbe61bbcfa660cd2eaeaf4c2af2ebff06938f4bc046fce1223fc573a evaluate.py
7
- b6a465089448e1c2eb7f26c981a1ad3e962d73a0433a337d4e781f4ca9525b65 examples/local-test-report.json
 
 
 
 
8
  713855348ffc53f49b03a0df47b67294fe2d3593054636eec12b9f184fb3534e examples/result-format.json
 
9
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 generators/__init__.py
10
- eeb947e9704931e5b23ed79aee180e4dd49708f9294d7481f51c7da2f5c33e7e generators/build.py
11
  e1cf493b995f15470c56c097b73e7403ae06f74f5d12cbb3a43ce522514d8577 generators/code.py
12
  60be0a7ac6fcd3dfd8b663fc19af189aba3acfdd923219dc6cc1972033380240 generators/specs.py
 
13
  ae6a8d5109035027b71df7eb7297e7c0b811a4a98c649e1729a3fe2a2c09c5bf generators/web.py
14
- 62a01609810b5c488f4a5abe284063b41b780c382046a9da7cc2a6ca755b5488 manifest.json
15
  6bac32e6045f1788e8b68e96ff6ee41f1b2152cca1b17de24be405025f294930 metrics.py
16
- 2447d09ae445094c1ae59df644b46e3ca2f4cc64de630966b94bd5db8b8bf0ac private_tests/hidden.jsonl
17
- a2de1bc75c21817ba1883ee4c5aa04b60a0f4288f3f45893e1c7e71e435f1997 pyproject.toml
18
- 84d3411fe45189c62ae50fbd31c1dc5795bc099d5037c3a817e3d280f6097e83 references/solutions.jsonl
19
  5a3cb2a82cf3784c41fc9f9046fe6806d5bbe7ce8ae415a9ed1c373abcfe7826 runners/__init__.py
20
  965bc9e3dabfc3fba4b745994b43118c456be477edcc34a3ba929ebf39e19ce9 runners/c_runner.py
21
  47eaf32ac4ce76fcfbd01d515f6befccfcd2bf6c277447a73e8b7b58fa7e96f8 runners/common.py
22
  17c846633f3730669790ee2f11fc93661648eedc950c96d47996d0db4514672b runners/cpp_runner.py
23
  e87545f911f6f25238b1f84ed0ac1602900676b77cb3dd5f1560cd62e0b931e4 runners/csharp_runner.py
24
  96e542ceb76e18759aa8f19fd87beef3612e535f7b9f04944a6bdf1e2fddffec runners/css_runner.py
 
 
25
  3a02716d96a0061567f50514b5e5df3b30812ed21b524f772ebcb12de915f585 runners/html_runner.py
26
  21c05c048f2cfcc6e263645b6322527cd8869e6530f3bc8dc11aaf54bb777f5e runners/javascript_runner.py
27
  2941363382d517261153a7d38a9f49c63fd2dbb4c52b851bc0d1726f8196f4e9 runners/lua_runner.py
@@ -30,9 +38,9 @@ efabd7a4b829eb917116a2f51358a8fa8056370dbb57f6b6a9646c1cd342ffc5 runners/python
30
  63514e35b2687742ea6453e15d089da5a6cb4ab57ca0100da6189b187511ecf7 runners/rust_runner.py
31
  824119581e0bf1c913059fdf506c26494c9aa2f65f718f08630ff5fe74779ff3 runners/sandbox.py
32
  4fb1552346d86503372e6762f3ddcb0fc7e7e0be2cc1209f419b7c5e37aeccdc sandbox/Dockerfile
33
- 39adc44592af2d485b8755baa0b90b94e987b8a76b37dd70cc7c879285b6faaa sandbox/worker.py
34
- eb5c448ef50f2a7f4f08be8d9b6a0d9719180c6c144b56b8514803312338902b tests/test_core.py
35
- 44d0be27ea6bb4050d2e6cfdcc0926400999e8cea3f62ed0bba5303231a424ab validate.py
36
- cb6e2f58736c45a63635c574ed989ff7910ad2cb81ad59f8a444594c78066ab4 validation_report.json
37
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 validators/__init__.py
38
- c21a19dd9e2b362c6634eac0334765d0b6edf0a567bba61a234b3d40bdb13612 validators/dataset.py
 
1
  ff73ee904edc9381bd1ea24847e41c6176aec22ba4b63321e8354562f24ba5ce .gitignore
2
  8719af4397a8387b8f04140613943545f8ecd90f06529dcab9e68a94927d13fe LICENSE
3
+ e7fa9e12b2c6af5e6a6bc568386c408d279f8b71804f9c19eebb2c3968abd850 README.md
4
+ 2447d09ae445094c1ae59df644b46e3ca2f4cc64de630966b94bd5db8b8bf0ac archive/v0.1.0/hidden.jsonl
5
+ 1926bca1b0c6b2244554577135a9c3c305b18fd834c654803b4e8480fff0d3d9 archive/v0.1.0/smolscript.jsonl
6
+ 7bf25948750648aa036bdf277cfd7c38597c98aa06131e805628b9055a7938d9 archive/v0.1.0/smolscript.parquet
7
+ 84d3411fe45189c62ae50fbd31c1dc5795bc099d5037c3a817e3d280f6097e83 archive/v0.1.0/solutions.jsonl
8
+ 1c17c3515e86e2c4bc25c84b45b9f086c87efd98e1d75a7f4b42772b9d88176e data/smolscript.jsonl
9
+ 358eae399dac7564ea5fb8753734f189aea3932994a22779d543bdcce847e050 data/smolscript.parquet
10
+ e2fb32b17e0cb933d08ee8cb87a19f5fa23861a5c37821946a45d9130b04305e evaluate.py
11
+ 6bfe2567a060ed374e969977fdeba471888469abae6b177c8bfc142b8ab1d034 examples/local-test-report.json
12
  713855348ffc53f49b03a0df47b67294fe2d3593054636eec12b9f184fb3534e examples/result-format.json
13
+ 504a839870b7e2c5612004fac14977d71affbf1601a151e7d7dc559e1ee4afc4 generation_settings.py
14
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 generators/__init__.py
15
+ 7747bc86067cc139f4e2803375ab1734ab6d6cb84b70c9e4aca75f099aac3f10 generators/build.py
16
  e1cf493b995f15470c56c097b73e7403ae06f74f5d12cbb3a43ce522514d8577 generators/code.py
17
  60be0a7ac6fcd3dfd8b663fc19af189aba3acfdd923219dc6cc1972033380240 generators/specs.py
18
+ 1e7fbc836f69bceef811880a81baf44cee6c087b884480c58937882eacbb4145 generators/subset.py
19
  ae6a8d5109035027b71df7eb7297e7c0b811a4a98c649e1729a3fe2a2c09c5bf generators/web.py
20
+ dea4320cec258423c726362d0ba88f76e4dec089da0b9d2315b8f84d832bdf8d manifest.json
21
  6bac32e6045f1788e8b68e96ff6ee41f1b2152cca1b17de24be405025f294930 metrics.py
22
+ 55c240d74282889fa2829fb307bf42649fb04876f5ebeb9e6f95cd934bcc105a private_tests/hidden.jsonl
23
+ 21600943097b1154d2492a51d6c859ea0efcf37ff3b1c5c7c8a81f66c178135d pyproject.toml
24
+ 34c7244ea9160ba090e7c3bc1802ca68cc882f8ee9c29736ea8529d499977677 references/solutions.jsonl
25
  5a3cb2a82cf3784c41fc9f9046fe6806d5bbe7ce8ae415a9ed1c373abcfe7826 runners/__init__.py
26
  965bc9e3dabfc3fba4b745994b43118c456be477edcc34a3ba929ebf39e19ce9 runners/c_runner.py
27
  47eaf32ac4ce76fcfbd01d515f6befccfcd2bf6c277447a73e8b7b58fa7e96f8 runners/common.py
28
  17c846633f3730669790ee2f11fc93661648eedc950c96d47996d0db4514672b runners/cpp_runner.py
29
  e87545f911f6f25238b1f84ed0ac1602900676b77cb3dd5f1560cd62e0b931e4 runners/csharp_runner.py
30
  96e542ceb76e18759aa8f19fd87beef3612e535f7b9f04944a6bdf1e2fddffec runners/css_runner.py
31
+ 09518f5cd7cc4898e3814bdf24750631f528c65ee1dce16acbf8941424a8fbfc runners/hf_runtime.py
32
+ 72ec02e2935256b3480af0516ff827e047841dbcd46aca9f5bcfef7e0e9b1677 runners/hf_tokens.py
33
  3a02716d96a0061567f50514b5e5df3b30812ed21b524f772ebcb12de915f585 runners/html_runner.py
34
  21c05c048f2cfcc6e263645b6322527cd8869e6530f3bc8dc11aaf54bb777f5e runners/javascript_runner.py
35
  2941363382d517261153a7d38a9f49c63fd2dbb4c52b851bc0d1726f8196f4e9 runners/lua_runner.py
 
38
  63514e35b2687742ea6453e15d089da5a6cb4ab57ca0100da6189b187511ecf7 runners/rust_runner.py
39
  824119581e0bf1c913059fdf506c26494c9aa2f65f718f08630ff5fe74779ff3 runners/sandbox.py
40
  4fb1552346d86503372e6762f3ddcb0fc7e7e0be2cc1209f419b7c5e37aeccdc sandbox/Dockerfile
41
+ 331503e3e4ef8dfce8c82caee8face396275c272b43c7cd61bcca1f535db76ad sandbox/worker.py
42
+ 97cbf114bf5c4a9fa5065888b6f8499ae68a49d98f8133674c31b5a2697ddac2 tests/test_core.py
43
+ 402d9fc0fce6516ae7aa962d5441cbd6f8b15ba4eab1131d3effc9b20344c20a validate.py
44
+ a445f277404f0265fd1aec441067e9e9bb34fb03b36becbe95f7bc6de94ff9c5 validation_report.json
45
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 validators/__init__.py
46
+ c13c13f6c5bc16c3e36a3f2b811164fbef2ba8af44857d9ff6a725ec79325a98 validators/dataset.py
archive/v0.1.0/hidden.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
archive/v0.1.0/smolscript.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
archive/v0.1.0/smolscript.parquet ADDED
Binary file (63.4 kB). View file
 
archive/v0.1.0/solutions.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/smolscript.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
data/smolscript.parquet CHANGED
Binary files a/data/smolscript.parquet and b/data/smolscript.parquet differ
 
evaluate.py CHANGED
@@ -11,6 +11,7 @@ from runners.sandbox import Sandbox
11
  from metrics import aggregate
12
  ROOT=Path(__file__).resolve().parent
13
  PROMPT_VERSION='smolscript-completion-v1'
 
14
 
15
  def prompt(row):
16
  # Only these public fields reach the model. No tests, answers or references.
@@ -26,16 +27,17 @@ def main():
26
  p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model');p.add_argument('--revision',default='main');p.add_argument('--output',type=Path,required=True)
27
  p.add_argument('--language',nargs='+',choices=LANGUAGES);p.add_argument('--difficulty',nargs='+',choices=('easy','medium','moderate'))
28
  p.add_argument('--resume',action='store_true');p.add_argument('--predictions',type=Path,help='JSONL with id and code; bypass model inference')
29
- p.add_argument('--image',default='smolscript-runtime:0.1.0');p.add_argument('--engine',default='docker');p.add_argument('--max-new-tokens',type=int,default=384);p.add_argument('--device',default='auto');a=p.parse_args()
30
  if not a.model and not a.predictions:p.error('--model or --predictions required')
31
- if a.max_new_tokens<1:p.error('--max-new-tokens must be positive')
 
32
  sandbox=Sandbox(a.image,a.engine)
33
  rows=[r for r in load(ROOT/'data/smolscript.jsonl') if (not a.language or r['language'] in a.language) and (not a.difficulty or r['difficulty'] in a.difficulty)]
34
  hidden={r['id']:r for r in load(ROOT/'private_tests/hidden.jsonl')}
35
- files=['data/smolscript.jsonl','private_tests/hidden.jsonl','evaluate.py','metrics.py']+[str(p.relative_to(ROOT)) for p in sorted((ROOT/'runners').glob('*.py'))]+['sandbox/worker.py']
36
  fingerprint={f:hashlib.sha256((ROOT/f).read_bytes()).hexdigest() for f in files}
37
  settings={'model':a.model,'requested_revision':a.revision,'language':a.language,'difficulty':a.difficulty,
38
- 'max_new_tokens':a.max_new_tokens,'prompt_version':PROMPT_VERSION,'dataset':fingerprint,'sandbox':sandbox.identity,
39
  'predictions_sha':hashlib.sha256(a.predictions.read_bytes()).hexdigest() if a.predictions else None}
40
  if a.output.exists() and not a.resume:p.error('Output exists; use --resume or a new path')
41
  state=json.loads(a.output.read_text()) if a.output.exists() else {'settings':settings,'results':[],'complete':False}
@@ -63,20 +65,31 @@ def main():
63
  done={r['id'] for r in state['results']}
64
  if len(done)!=len(state['results']) or done-set(r['id'] for r in rows):raise ValueError('Corrupt resume IDs')
65
  save(a.output,state)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  for row in rows:
67
  if row['id'] in done:continue
68
- if state.get('pending',{}).get('id')==row['id']:
69
- text=state['pending']['generation']
70
- elif a.predictions:
71
  if row['id'] not in codes:raise ValueError('Missing prediction '+row['id'])
72
  text=codes[row['id']]
73
- else:
74
- encoded=tokenizer(prompt(row),return_tensors='pt',return_token_type_ids=False).to(model.device)
75
- native=getattr(model.config,'max_position_embeddings',getattr(model.config,'n_positions',4096))
76
- if encoded['input_ids'].shape[1]+a.max_new_tokens>native:
77
- raise ValueError('Insufficient context for fixed generation settings: '+row['id'])
78
- with torch.inference_mode():out=model.generate(**encoded,max_new_tokens=a.max_new_tokens,do_sample=False,num_beams=1,pad_token_id=tokenizer.pad_token_id if tokenizer.pad_token_id is not None else tokenizer.eos_token_id)
79
- text=tokenizer.decode(out[0,encoded['input_ids'].shape[1]:],skip_special_tokens=True)
80
  state['pending']={'id':row['id'],'generation':text};save(a.output,state)
81
  try:code=extract_code(text)
82
  except ValueError as e:result={'passed':False,'syntax_success':False,'tests':[],'error':str(e)}
 
11
  from metrics import aggregate
12
  ROOT=Path(__file__).resolve().parent
13
  PROMPT_VERSION='smolscript-completion-v1'
14
+ from generation_settings import PROTOCOL,DEFAULT_BATCH_SIZE,token_budget
15
 
16
  def prompt(row):
17
  # Only these public fields reach the model. No tests, answers or references.
 
27
  p=argparse.ArgumentParser(description=__doc__);p.add_argument('--model');p.add_argument('--revision',default='main');p.add_argument('--output',type=Path,required=True)
28
  p.add_argument('--language',nargs='+',choices=LANGUAGES);p.add_argument('--difficulty',nargs='+',choices=('easy','medium','moderate'))
29
  p.add_argument('--resume',action='store_true');p.add_argument('--predictions',type=Path,help='JSONL with id and code; bypass model inference')
30
+ p.add_argument('--image',default='smolscript-runtime:0.1.0');p.add_argument('--engine',default='docker');p.add_argument('--max-new-tokens',type=int,default=None);p.add_argument('--device',default='auto');p.add_argument('--batch-size',type=int,default=DEFAULT_BATCH_SIZE);a=p.parse_args()
31
  if not a.model and not a.predictions:p.error('--model or --predictions required')
32
+ if a.max_new_tokens is not None and a.max_new_tokens<1:p.error('--max-new-tokens must be positive')
33
+ if a.batch_size<1:p.error('--batch-size must be positive')
34
  sandbox=Sandbox(a.image,a.engine)
35
  rows=[r for r in load(ROOT/'data/smolscript.jsonl') if (not a.language or r['language'] in a.language) and (not a.difficulty or r['difficulty'] in a.difficulty)]
36
  hidden={r['id']:r for r in load(ROOT/'private_tests/hidden.jsonl')}
37
+ files=['data/smolscript.jsonl','private_tests/hidden.jsonl','evaluate.py','metrics.py','generation_settings.py']+[str(p.relative_to(ROOT)) for p in sorted((ROOT/'runners').glob('*.py'))]+['sandbox/worker.py']
38
  fingerprint={f:hashlib.sha256((ROOT/f).read_bytes()).hexdigest() for f in files}
39
  settings={'model':a.model,'requested_revision':a.revision,'language':a.language,'difficulty':a.difficulty,
40
+ 'max_new_tokens':a.max_new_tokens,'batch_size':a.batch_size,'decode_protocol':PROTOCOL,'prompt_version':PROMPT_VERSION,'dataset':fingerprint,'sandbox':sandbox.identity,
41
  'predictions_sha':hashlib.sha256(a.predictions.read_bytes()).hexdigest() if a.predictions else None}
42
  if a.output.exists() and not a.resume:p.error('Output exists; use --resume or a new path')
43
  state=json.loads(a.output.read_text()) if a.output.exists() else {'settings':settings,'results':[],'complete':False}
 
65
  done={r['id'] for r in state['results']}
66
  if len(done)!=len(state['results']) or done-set(r['id'] for r in rows):raise ValueError('Corrupt resume IDs')
67
  save(a.output,state)
68
+ if not a.predictions:
69
+ from runners.hf_runtime import Progress,generate_batches
70
+ generated=state.setdefault('generations',{})
71
+ if state.get('pending'):generated[state['pending']['id']]=state['pending']['generation']
72
+ pending=[r for r in rows if r['id'] not in done and r['id'] not in generated]
73
+ if tokenizer.pad_token_id is None:tokenizer.pad_token=tokenizer.eos_token
74
+ tokenizer.padding_side='left'
75
+ encoded=tokenizer([prompt(r) for r in pending],return_token_type_ids=False) if pending else {'input_ids':[],'attention_mask':[]}
76
+ compiled={r['id']:{'input_ids':encoded['input_ids'][i],'attention_mask':encoded['attention_mask'][i]} for i,r in enumerate(pending)}
77
+ budgets={r['id']:a.max_new_tokens or token_budget(r) for r in pending}
78
+ native=getattr(model.config,'max_position_embeddings',getattr(model.config,'n_positions',4096))
79
+ for r in pending:
80
+ if len(compiled[r['id']]['input_ids'])+budgets[r['id']]>native:
81
+ raise ValueError('Insufficient context for generation: '+r['id'])
82
+ def emit(batch):
83
+ generated.update({rid:text for rid,text,_ in batch});save(a.output,state)
84
+ with Progress('SmolScript',len(pending)) as progress:
85
+ state['generation_stats']=generate_batches(model,tokenizer,compiled,pending,
86
+ lambda r:budgets[r['id']],a.batch_size,emit,progress,stream_tokens=False)
87
  for row in rows:
88
  if row['id'] in done:continue
89
+ if a.predictions:
 
 
90
  if row['id'] not in codes:raise ValueError('Missing prediction '+row['id'])
91
  text=codes[row['id']]
92
+ else:text=state['generations'][row['id']]
 
 
 
 
 
 
93
  state['pending']={'id':row['id'],'generation':text};save(a.output,state)
94
  try:code=extract_code(text)
95
  except ValueError as e:result={'passed':False,'syntax_success':False,'tests':[],'error':str(e)}
examples/local-test-report.json CHANGED
@@ -1,25 +1,26 @@
1
  {
2
  "unit_tests": {
3
- "passed": 8,
4
  "command": "python -m unittest discover -s tests -q"
5
  },
6
- "python_reference_ast_parse": 250,
7
  "candidate_execution_on_host": false,
8
  "reference_execution": {
9
  "verified": 0,
10
- "unverified": 2000
11
  },
12
  "unverified_by_language": {
13
- "python": 250,
14
- "javascript": 250,
15
- "html": 200,
16
- "css": 200,
17
- "cpp": 225,
18
- "c": 225,
19
- "lua": 200,
20
- "csharp": 225,
21
- "rust": 225
22
  },
23
- "blocked_reason": "Docker/Podman unavailable; no isolated runtime for reference and negative-control execution.",
24
- "model_baselines": "not run"
 
25
  }
 
1
  {
2
  "unit_tests": {
3
+ "passed": 10,
4
  "command": "python -m unittest discover -s tests -q"
5
  },
6
+ "python_reference_ast_parse": 125,
7
  "candidate_execution_on_host": false,
8
  "reference_execution": {
9
  "verified": 0,
10
+ "unverified": 1000
11
  },
12
  "unverified_by_language": {
13
+ "python": 125,
14
+ "javascript": 125,
15
+ "html": 100,
16
+ "css": 100,
17
+ "cpp": 113,
18
+ "c": 113,
19
+ "lua": 100,
20
+ "csharp": 112,
21
+ "rust": 112
22
  },
23
+ "blocked_reason": "Docker/Podman unavailable; full isolated reference and negative-control execution remains unverified.",
24
+ "model_baselines": "not run",
25
+ "gpu_throughput_benchmark": "not run"
26
  }
generation_settings.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ """Versioned decoding policy; never reads references or hidden answers."""
2
+ PROTOCOL='smolscript-0.2.0'
3
+ DEFAULT_BATCH_SIZE=64
4
+ MAX_NEW_TOKENS=256
5
+
6
+ def token_budget(row):
7
+ base={'python':128,'javascript':192,'html':160,'css':96,'cpp':224,'c':256,'lua':160,'csharp':256,'rust':256}[row['language']]
8
+ return min(MAX_NEW_TOKENS,base+(32 if row['difficulty']=='moderate' else 0))
generators/build.py CHANGED
@@ -9,10 +9,11 @@ from generators.specs import task_specs,oracle,probes
9
  from generators.code import render,signature
10
  from generators.web import html_tasks,css_tasks,dom_tasks,BASE_CSS
11
 
12
- ALLOCATION={'python':(150,75,25),'javascript':(150,75,25),'html':(120,60,20),'css':(120,60,20),
13
  'cpp':(135,68,22),'c':(135,68,22),'lua':(120,60,20),'csharp':(135,67,23),'rust':(135,67,23)}
14
  NAMES={'python':'Python','javascript':'JavaScript','html':'HTML','css':'CSS','cpp':'C++','c':'C','lua':'Lua','csharp':'C#','rust':'Rust'}
15
  VERSION='smolscript-0.1.0'
 
16
 
17
  def stable(value):return json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=False)
18
  def sha(value):return hashlib.sha256(stable(value).encode()).hexdigest()
@@ -38,7 +39,7 @@ def build():
38
  if discrimination(best)==0:raise ValueError('Cannot distinguish hidden tasks')
39
  chosen.append(best)
40
  suites[kind]=chosen
41
- for lang,counts in ALLOCATION.items():
42
  items=[]
43
  if lang in ('html','css'):items=html_tasks() if lang=='html' else css_tasks()
44
  else:
@@ -94,6 +95,19 @@ def build():
94
  'timeout_seconds':3,'metadata':metadata}
95
  public.append(row);private.append({'id':rid,'tests':hidden,'spec':spec});references.append({'id':rid,'reference_solution':reference})
96
  assert len(public)==2000
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  for directory in ('data','private_tests','references'): (ROOT/directory).mkdir(exist_ok=True)
98
  write_rows(ROOT/'data/smolscript.jsonl',public)
99
  write_rows(ROOT/'private_tests/hidden.jsonl',private)
@@ -103,12 +117,14 @@ def build():
103
  # HF-compatible nested metadata; JSON strings give consistent test schemas across modalities.
104
  parquet_rows=[{**r,'tests':stable(r['tests']),'metadata':stable(r['metadata'])} for r in public]
105
  pq.write_table(pa.Table.from_pylist(parquet_rows),ROOT/'data/smolscript.parquet',compression='zstd')
106
- manifest={'version':VERSION,'examples':2000,'languages':{k:sum(v) for k,v in ALLOCATION.items()},
107
- 'difficulty':{'easy':1200,'medium':600,'moderate':200},'generator_seed':7301,
108
- 'validation_status':'execution_unverified','files':{}}
 
 
109
  for name in ('data/smolscript.jsonl','data/smolscript.parquet','private_tests/hidden.jsonl','references/solutions.jsonl'):
110
  manifest['files'][name]=hashlib.sha256((ROOT/name).read_bytes()).hexdigest()
111
  (ROOT/'manifest.json').write_text(json.dumps(manifest,indent=2)+'\n')
112
- print('Generated exactly 2000 examples and matching private tests/references.')
113
 
114
  if __name__=='__main__':build()
 
9
  from generators.code import render,signature
10
  from generators.web import html_tasks,css_tasks,dom_tasks,BASE_CSS
11
 
12
+ FULL_ALLOCATION={'python':(150,75,25),'javascript':(150,75,25),'html':(120,60,20),'css':(120,60,20),
13
  'cpp':(135,68,22),'c':(135,68,22),'lua':(120,60,20),'csharp':(135,67,23),'rust':(135,67,23)}
14
  NAMES={'python':'Python','javascript':'JavaScript','html':'HTML','css':'CSS','cpp':'C++','c':'C','lua':'Lua','csharp':'C#','rust':'Rust'}
15
  VERSION='smolscript-0.1.0'
16
+ from generators.subset import ALLOCATION,select,VERSION as DEFAULT_VERSION
17
 
18
  def stable(value):return json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=False)
19
  def sha(value):return hashlib.sha256(stable(value).encode()).hexdigest()
 
39
  if discrimination(best)==0:raise ValueError('Cannot distinguish hidden tasks')
40
  chosen.append(best)
41
  suites[kind]=chosen
42
+ for lang,counts in FULL_ALLOCATION.items():
43
  items=[]
44
  if lang in ('html','css'):items=html_tasks() if lang=='html' else css_tasks()
45
  else:
 
95
  'timeout_seconds':3,'metadata':metadata}
96
  public.append(row);private.append({'id':rid,'tests':hidden,'spec':spec});references.append({'id':rid,'reference_solution':reference})
97
  assert len(public)==2000
98
+ # Preserve the original edition outside the default HF split.
99
+ archive=ROOT/'archive/v0.1.0'
100
+ archive.mkdir(parents=True,exist_ok=True)
101
+ write_rows(archive/'smolscript.jsonl',public)
102
+ write_rows(archive/'hidden.jsonl',private)
103
+ write_rows(archive/'solutions.jsonl',references)
104
+ import pyarrow as pa
105
+ import pyarrow.parquet as pq
106
+ pq.write_table(pa.Table.from_pylist([{**r,'tests':stable(r['tests']),'metadata':stable(r['metadata'])} for r in public]),archive/'smolscript.parquet',compression='zstd')
107
+ public=select(public)
108
+ ids={r['id'] for r in public}
109
+ private=[r for r in private if r['id'] in ids]
110
+ references=[r for r in references if r['id'] in ids]
111
  for directory in ('data','private_tests','references'): (ROOT/directory).mkdir(exist_ok=True)
112
  write_rows(ROOT/'data/smolscript.jsonl',public)
113
  write_rows(ROOT/'private_tests/hidden.jsonl',private)
 
117
  # HF-compatible nested metadata; JSON strings give consistent test schemas across modalities.
118
  parquet_rows=[{**r,'tests':stable(r['tests']),'metadata':stable(r['metadata'])} for r in public]
119
  pq.write_table(pa.Table.from_pylist(parquet_rows),ROOT/'data/smolscript.parquet',compression='zstd')
120
+ manifest={'version':DEFAULT_VERSION,'examples':1000,'languages':{k:sum(v) for k,v in ALLOCATION.items()},
121
+ 'difficulty':{'easy':600,'medium':300,'moderate':100},'generator_seed':7301,
122
+ 'validation_status':'execution_unverified','selection_protocol':DEFAULT_VERSION,
123
+ 'selected_ids':[r['id'] for r in public],
124
+ 'selection_sha256':hashlib.sha256(('\n'.join(r['id'] for r in public)+'\n').encode()).hexdigest(),'files':{}}
125
  for name in ('data/smolscript.jsonl','data/smolscript.parquet','private_tests/hidden.jsonl','references/solutions.jsonl'):
126
  manifest['files'][name]=hashlib.sha256((ROOT/name).read_bytes()).hexdigest()
127
  (ROOT/'manifest.json').write_text(json.dumps(manifest,indent=2)+'\n')
128
+ print('Generated fixed 1000-example default; archived original 2000 tasks.')
129
 
130
  if __name__=='__main__':build()
generators/subset.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Fixed 1,000-task default, stratified by language/difficulty/task family."""
2
+ from collections import defaultdict
3
+ import hashlib
4
+ ALLOCATION={'python':(75,38,12),'javascript':(75,37,13),'html':(60,30,10),'css':(60,30,10),
5
+ 'cpp':(68,34,11),'c':(68,34,11),'lua':(60,30,10),'csharp':(67,34,11),'rust':(67,33,12)}
6
+ VERSION='smolscript-0.2.0'
7
+
8
+ def select(rows):
9
+ chosen=set()
10
+ for lang,counts in ALLOCATION.items():
11
+ for diff,count in zip(('easy','medium','moderate'),counts):
12
+ groups=defaultdict(list)
13
+ for r in rows:
14
+ if r['language']==lang and r['difficulty']==diff:groups[(r['metadata']['family'],r['category'])].append(r)
15
+ total=sum(map(len,groups.values()))
16
+ quotas={k:count*len(v)//total for k,v in groups.items()}
17
+ for k in sorted(groups,key=lambda k:(-(count*len(groups[k])%total),k))[:count-sum(quotas.values())]:quotas[k]+=1
18
+ for k,group in groups.items():
19
+ ranked=sorted(group,key=lambda r:hashlib.sha256((VERSION+':'+r['id']).encode()).digest())
20
+ chosen.update(r['id'] for r in ranked[:quotas[k]])
21
+ result=[{**r,'metadata':{**r['metadata'],'protocol':VERSION}} for r in rows if r['id'] in chosen]
22
+ assert len(result)==1000
23
+ return result
manifest.json CHANGED
@@ -1,28 +1,1032 @@
1
  {
2
- "version": "smolscript-0.1.0",
3
- "examples": 2000,
4
  "languages": {
5
- "python": 250,
6
- "javascript": 250,
7
- "html": 200,
8
- "css": 200,
9
- "cpp": 225,
10
- "c": 225,
11
- "lua": 200,
12
- "csharp": 225,
13
- "rust": 225
14
  },
15
  "difficulty": {
16
- "easy": 1200,
17
- "medium": 600,
18
- "moderate": 200
19
  },
20
  "generator_seed": 7301,
21
  "validation_status": "execution_unverified",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "files": {
23
- "data/smolscript.jsonl": "1926bca1b0c6b2244554577135a9c3c305b18fd834c654803b4e8480fff0d3d9",
24
- "data/smolscript.parquet": "7bf25948750648aa036bdf277cfd7c38597c98aa06131e805628b9055a7938d9",
25
- "private_tests/hidden.jsonl": "2447d09ae445094c1ae59df644b46e3ca2f4cc64de630966b94bd5db8b8bf0ac",
26
- "references/solutions.jsonl": "84d3411fe45189c62ae50fbd31c1dc5795bc099d5037c3a817e3d280f6097e83"
27
  }
28
  }
 
1
  {
2
+ "version": "smolscript-0.2.0",
3
+ "examples": 1000,
4
  "languages": {
5
+ "python": 125,
6
+ "javascript": 125,
7
+ "html": 100,
8
+ "css": 100,
9
+ "cpp": 113,
10
+ "c": 113,
11
+ "lua": 100,
12
+ "csharp": 112,
13
+ "rust": 112
14
  },
15
  "difficulty": {
16
+ "easy": 600,
17
+ "medium": 300,
18
+ "moderate": 100
19
  },
20
  "generator_seed": 7301,
21
  "validation_status": "execution_unverified",
22
+ "selection_protocol": "smolscript-0.2.0",
23
+ "selected_ids": [
24
+ "smolscript-python-0003",
25
+ "smolscript-python-0004",
26
+ "smolscript-python-0006",
27
+ "smolscript-python-0007",
28
+ "smolscript-python-0008",
29
+ "smolscript-python-0011",
30
+ "smolscript-python-0015",
31
+ "smolscript-python-0020",
32
+ "smolscript-python-0023",
33
+ "smolscript-python-0024",
34
+ "smolscript-python-0025",
35
+ "smolscript-python-0027",
36
+ "smolscript-python-0028",
37
+ "smolscript-python-0030",
38
+ "smolscript-python-0033",
39
+ "smolscript-python-0035",
40
+ "smolscript-python-0036",
41
+ "smolscript-python-0038",
42
+ "smolscript-python-0039",
43
+ "smolscript-python-0041",
44
+ "smolscript-python-0044",
45
+ "smolscript-python-0047",
46
+ "smolscript-python-0048",
47
+ "smolscript-python-0050",
48
+ "smolscript-python-0054",
49
+ "smolscript-python-0056",
50
+ "smolscript-python-0058",
51
+ "smolscript-python-0059",
52
+ "smolscript-python-0061",
53
+ "smolscript-python-0066",
54
+ "smolscript-python-0067",
55
+ "smolscript-python-0068",
56
+ "smolscript-python-0069",
57
+ "smolscript-python-0070",
58
+ "smolscript-python-0073",
59
+ "smolscript-python-0074",
60
+ "smolscript-python-0075",
61
+ "smolscript-python-0076",
62
+ "smolscript-python-0078",
63
+ "smolscript-python-0080",
64
+ "smolscript-python-0081",
65
+ "smolscript-python-0082",
66
+ "smolscript-python-0084",
67
+ "smolscript-python-0087",
68
+ "smolscript-python-0091",
69
+ "smolscript-python-0092",
70
+ "smolscript-python-0095",
71
+ "smolscript-python-0098",
72
+ "smolscript-python-0099",
73
+ "smolscript-python-0101",
74
+ "smolscript-python-0104",
75
+ "smolscript-python-0107",
76
+ "smolscript-python-0108",
77
+ "smolscript-python-0113",
78
+ "smolscript-python-0114",
79
+ "smolscript-python-0115",
80
+ "smolscript-python-0119",
81
+ "smolscript-python-0123",
82
+ "smolscript-python-0126",
83
+ "smolscript-python-0130",
84
+ "smolscript-python-0131",
85
+ "smolscript-python-0132",
86
+ "smolscript-python-0133",
87
+ "smolscript-python-0134",
88
+ "smolscript-python-0135",
89
+ "smolscript-python-0136",
90
+ "smolscript-python-0137",
91
+ "smolscript-python-0138",
92
+ "smolscript-python-0139",
93
+ "smolscript-python-0141",
94
+ "smolscript-python-0143",
95
+ "smolscript-python-0145",
96
+ "smolscript-python-0147",
97
+ "smolscript-python-0148",
98
+ "smolscript-python-0149",
99
+ "smolscript-python-0152",
100
+ "smolscript-python-0153",
101
+ "smolscript-python-0155",
102
+ "smolscript-python-0156",
103
+ "smolscript-python-0158",
104
+ "smolscript-python-0159",
105
+ "smolscript-python-0160",
106
+ "smolscript-python-0161",
107
+ "smolscript-python-0167",
108
+ "smolscript-python-0168",
109
+ "smolscript-python-0169",
110
+ "smolscript-python-0174",
111
+ "smolscript-python-0176",
112
+ "smolscript-python-0177",
113
+ "smolscript-python-0179",
114
+ "smolscript-python-0181",
115
+ "smolscript-python-0183",
116
+ "smolscript-python-0184",
117
+ "smolscript-python-0188",
118
+ "smolscript-python-0190",
119
+ "smolscript-python-0192",
120
+ "smolscript-python-0193",
121
+ "smolscript-python-0194",
122
+ "smolscript-python-0196",
123
+ "smolscript-python-0197",
124
+ "smolscript-python-0199",
125
+ "smolscript-python-0200",
126
+ "smolscript-python-0203",
127
+ "smolscript-python-0205",
128
+ "smolscript-python-0208",
129
+ "smolscript-python-0209",
130
+ "smolscript-python-0213",
131
+ "smolscript-python-0215",
132
+ "smolscript-python-0217",
133
+ "smolscript-python-0218",
134
+ "smolscript-python-0219",
135
+ "smolscript-python-0222",
136
+ "smolscript-python-0223",
137
+ "smolscript-python-0226",
138
+ "smolscript-python-0229",
139
+ "smolscript-python-0230",
140
+ "smolscript-python-0231",
141
+ "smolscript-python-0232",
142
+ "smolscript-python-0236",
143
+ "smolscript-python-0237",
144
+ "smolscript-python-0238",
145
+ "smolscript-python-0242",
146
+ "smolscript-python-0243",
147
+ "smolscript-python-0245",
148
+ "smolscript-python-0246",
149
+ "smolscript-javascript-0001",
150
+ "smolscript-javascript-0002",
151
+ "smolscript-javascript-0004",
152
+ "smolscript-javascript-0009",
153
+ "smolscript-javascript-0010",
154
+ "smolscript-javascript-0012",
155
+ "smolscript-javascript-0014",
156
+ "smolscript-javascript-0015",
157
+ "smolscript-javascript-0016",
158
+ "smolscript-javascript-0017",
159
+ "smolscript-javascript-0018",
160
+ "smolscript-javascript-0021",
161
+ "smolscript-javascript-0024",
162
+ "smolscript-javascript-0025",
163
+ "smolscript-javascript-0027",
164
+ "smolscript-javascript-0029",
165
+ "smolscript-javascript-0030",
166
+ "smolscript-javascript-0031",
167
+ "smolscript-javascript-0035",
168
+ "smolscript-javascript-0036",
169
+ "smolscript-javascript-0037",
170
+ "smolscript-javascript-0038",
171
+ "smolscript-javascript-0039",
172
+ "smolscript-javascript-0040",
173
+ "smolscript-javascript-0042",
174
+ "smolscript-javascript-0043",
175
+ "smolscript-javascript-0044",
176
+ "smolscript-javascript-0047",
177
+ "smolscript-javascript-0049",
178
+ "smolscript-javascript-0051",
179
+ "smolscript-javascript-0052",
180
+ "smolscript-javascript-0054",
181
+ "smolscript-javascript-0055",
182
+ "smolscript-javascript-0056",
183
+ "smolscript-javascript-0059",
184
+ "smolscript-javascript-0060",
185
+ "smolscript-javascript-0063",
186
+ "smolscript-javascript-0065",
187
+ "smolscript-javascript-0066",
188
+ "smolscript-javascript-0067",
189
+ "smolscript-javascript-0074",
190
+ "smolscript-javascript-0077",
191
+ "smolscript-javascript-0078",
192
+ "smolscript-javascript-0081",
193
+ "smolscript-javascript-0082",
194
+ "smolscript-javascript-0088",
195
+ "smolscript-javascript-0093",
196
+ "smolscript-javascript-0094",
197
+ "smolscript-javascript-0095",
198
+ "smolscript-javascript-0096",
199
+ "smolscript-javascript-0097",
200
+ "smolscript-javascript-0099",
201
+ "smolscript-javascript-0101",
202
+ "smolscript-javascript-0102",
203
+ "smolscript-javascript-0103",
204
+ "smolscript-javascript-0106",
205
+ "smolscript-javascript-0108",
206
+ "smolscript-javascript-0111",
207
+ "smolscript-javascript-0114",
208
+ "smolscript-javascript-0116",
209
+ "smolscript-javascript-0118",
210
+ "smolscript-javascript-0119",
211
+ "smolscript-javascript-0122",
212
+ "smolscript-javascript-0123",
213
+ "smolscript-javascript-0124",
214
+ "smolscript-javascript-0125",
215
+ "smolscript-javascript-0131",
216
+ "smolscript-javascript-0132",
217
+ "smolscript-javascript-0135",
218
+ "smolscript-javascript-0138",
219
+ "smolscript-javascript-0144",
220
+ "smolscript-javascript-0145",
221
+ "smolscript-javascript-0146",
222
+ "smolscript-javascript-0149",
223
+ "smolscript-javascript-0150",
224
+ "smolscript-javascript-0151",
225
+ "smolscript-javascript-0152",
226
+ "smolscript-javascript-0153",
227
+ "smolscript-javascript-0154",
228
+ "smolscript-javascript-0156",
229
+ "smolscript-javascript-0157",
230
+ "smolscript-javascript-0159",
231
+ "smolscript-javascript-0161",
232
+ "smolscript-javascript-0163",
233
+ "smolscript-javascript-0164",
234
+ "smolscript-javascript-0165",
235
+ "smolscript-javascript-0166",
236
+ "smolscript-javascript-0167",
237
+ "smolscript-javascript-0168",
238
+ "smolscript-javascript-0169",
239
+ "smolscript-javascript-0170",
240
+ "smolscript-javascript-0171",
241
+ "smolscript-javascript-0177",
242
+ "smolscript-javascript-0178",
243
+ "smolscript-javascript-0179",
244
+ "smolscript-javascript-0182",
245
+ "smolscript-javascript-0185",
246
+ "smolscript-javascript-0187",
247
+ "smolscript-javascript-0188",
248
+ "smolscript-javascript-0194",
249
+ "smolscript-javascript-0199",
250
+ "smolscript-javascript-0201",
251
+ "smolscript-javascript-0204",
252
+ "smolscript-javascript-0209",
253
+ "smolscript-javascript-0210",
254
+ "smolscript-javascript-0213",
255
+ "smolscript-javascript-0216",
256
+ "smolscript-javascript-0217",
257
+ "smolscript-javascript-0219",
258
+ "smolscript-javascript-0220",
259
+ "smolscript-javascript-0223",
260
+ "smolscript-javascript-0226",
261
+ "smolscript-javascript-0227",
262
+ "smolscript-javascript-0228",
263
+ "smolscript-javascript-0229",
264
+ "smolscript-javascript-0232",
265
+ "smolscript-javascript-0234",
266
+ "smolscript-javascript-0235",
267
+ "smolscript-javascript-0240",
268
+ "smolscript-javascript-0241",
269
+ "smolscript-javascript-0242",
270
+ "smolscript-javascript-0243",
271
+ "smolscript-javascript-0246",
272
+ "smolscript-javascript-0247",
273
+ "smolscript-javascript-0250",
274
+ "smolscript-html-0003",
275
+ "smolscript-html-0004",
276
+ "smolscript-html-0007",
277
+ "smolscript-html-0008",
278
+ "smolscript-html-0015",
279
+ "smolscript-html-0017",
280
+ "smolscript-html-0019",
281
+ "smolscript-html-0020",
282
+ "smolscript-html-0022",
283
+ "smolscript-html-0023",
284
+ "smolscript-html-0025",
285
+ "smolscript-html-0027",
286
+ "smolscript-html-0028",
287
+ "smolscript-html-0031",
288
+ "smolscript-html-0034",
289
+ "smolscript-html-0035",
290
+ "smolscript-html-0036",
291
+ "smolscript-html-0037",
292
+ "smolscript-html-0038",
293
+ "smolscript-html-0039",
294
+ "smolscript-html-0040",
295
+ "smolscript-html-0042",
296
+ "smolscript-html-0045",
297
+ "smolscript-html-0047",
298
+ "smolscript-html-0048",
299
+ "smolscript-html-0049",
300
+ "smolscript-html-0050",
301
+ "smolscript-html-0054",
302
+ "smolscript-html-0059",
303
+ "smolscript-html-0061",
304
+ "smolscript-html-0062",
305
+ "smolscript-html-0065",
306
+ "smolscript-html-0067",
307
+ "smolscript-html-0069",
308
+ "smolscript-html-0074",
309
+ "smolscript-html-0075",
310
+ "smolscript-html-0076",
311
+ "smolscript-html-0079",
312
+ "smolscript-html-0080",
313
+ "smolscript-html-0082",
314
+ "smolscript-html-0088",
315
+ "smolscript-html-0089",
316
+ "smolscript-html-0091",
317
+ "smolscript-html-0093",
318
+ "smolscript-html-0094",
319
+ "smolscript-html-0095",
320
+ "smolscript-html-0096",
321
+ "smolscript-html-0097",
322
+ "smolscript-html-0098",
323
+ "smolscript-html-0100",
324
+ "smolscript-html-0101",
325
+ "smolscript-html-0106",
326
+ "smolscript-html-0107",
327
+ "smolscript-html-0110",
328
+ "smolscript-html-0112",
329
+ "smolscript-html-0114",
330
+ "smolscript-html-0116",
331
+ "smolscript-html-0118",
332
+ "smolscript-html-0119",
333
+ "smolscript-html-0120",
334
+ "smolscript-html-0121",
335
+ "smolscript-html-0122",
336
+ "smolscript-html-0123",
337
+ "smolscript-html-0125",
338
+ "smolscript-html-0127",
339
+ "smolscript-html-0129",
340
+ "smolscript-html-0130",
341
+ "smolscript-html-0132",
342
+ "smolscript-html-0133",
343
+ "smolscript-html-0135",
344
+ "smolscript-html-0141",
345
+ "smolscript-html-0142",
346
+ "smolscript-html-0143",
347
+ "smolscript-html-0146",
348
+ "smolscript-html-0150",
349
+ "smolscript-html-0152",
350
+ "smolscript-html-0159",
351
+ "smolscript-html-0160",
352
+ "smolscript-html-0161",
353
+ "smolscript-html-0163",
354
+ "smolscript-html-0164",
355
+ "smolscript-html-0165",
356
+ "smolscript-html-0166",
357
+ "smolscript-html-0167",
358
+ "smolscript-html-0169",
359
+ "smolscript-html-0170",
360
+ "smolscript-html-0171",
361
+ "smolscript-html-0176",
362
+ "smolscript-html-0178",
363
+ "smolscript-html-0179",
364
+ "smolscript-html-0182",
365
+ "smolscript-html-0184",
366
+ "smolscript-html-0186",
367
+ "smolscript-html-0188",
368
+ "smolscript-html-0190",
369
+ "smolscript-html-0192",
370
+ "smolscript-html-0195",
371
+ "smolscript-html-0198",
372
+ "smolscript-html-0199",
373
+ "smolscript-html-0200",
374
+ "smolscript-css-0006",
375
+ "smolscript-css-0007",
376
+ "smolscript-css-0009",
377
+ "smolscript-css-0010",
378
+ "smolscript-css-0011",
379
+ "smolscript-css-0012",
380
+ "smolscript-css-0013",
381
+ "smolscript-css-0015",
382
+ "smolscript-css-0019",
383
+ "smolscript-css-0020",
384
+ "smolscript-css-0021",
385
+ "smolscript-css-0023",
386
+ "smolscript-css-0026",
387
+ "smolscript-css-0027",
388
+ "smolscript-css-0028",
389
+ "smolscript-css-0030",
390
+ "smolscript-css-0035",
391
+ "smolscript-css-0037",
392
+ "smolscript-css-0039",
393
+ "smolscript-css-0041",
394
+ "smolscript-css-0042",
395
+ "smolscript-css-0043",
396
+ "smolscript-css-0044",
397
+ "smolscript-css-0046",
398
+ "smolscript-css-0047",
399
+ "smolscript-css-0049",
400
+ "smolscript-css-0050",
401
+ "smolscript-css-0054",
402
+ "smolscript-css-0055",
403
+ "smolscript-css-0056",
404
+ "smolscript-css-0058",
405
+ "smolscript-css-0060",
406
+ "smolscript-css-0061",
407
+ "smolscript-css-0062",
408
+ "smolscript-css-0063",
409
+ "smolscript-css-0066",
410
+ "smolscript-css-0067",
411
+ "smolscript-css-0068",
412
+ "smolscript-css-0071",
413
+ "smolscript-css-0072",
414
+ "smolscript-css-0073",
415
+ "smolscript-css-0074",
416
+ "smolscript-css-0076",
417
+ "smolscript-css-0079",
418
+ "smolscript-css-0086",
419
+ "smolscript-css-0091",
420
+ "smolscript-css-0095",
421
+ "smolscript-css-0096",
422
+ "smolscript-css-0102",
423
+ "smolscript-css-0103",
424
+ "smolscript-css-0106",
425
+ "smolscript-css-0108",
426
+ "smolscript-css-0109",
427
+ "smolscript-css-0110",
428
+ "smolscript-css-0111",
429
+ "smolscript-css-0112",
430
+ "smolscript-css-0113",
431
+ "smolscript-css-0114",
432
+ "smolscript-css-0115",
433
+ "smolscript-css-0120",
434
+ "smolscript-css-0122",
435
+ "smolscript-css-0123",
436
+ "smolscript-css-0124",
437
+ "smolscript-css-0127",
438
+ "smolscript-css-0133",
439
+ "smolscript-css-0135",
440
+ "smolscript-css-0136",
441
+ "smolscript-css-0138",
442
+ "smolscript-css-0140",
443
+ "smolscript-css-0143",
444
+ "smolscript-css-0146",
445
+ "smolscript-css-0147",
446
+ "smolscript-css-0149",
447
+ "smolscript-css-0153",
448
+ "smolscript-css-0156",
449
+ "smolscript-css-0157",
450
+ "smolscript-css-0158",
451
+ "smolscript-css-0159",
452
+ "smolscript-css-0160",
453
+ "smolscript-css-0163",
454
+ "smolscript-css-0165",
455
+ "smolscript-css-0166",
456
+ "smolscript-css-0168",
457
+ "smolscript-css-0169",
458
+ "smolscript-css-0170",
459
+ "smolscript-css-0171",
460
+ "smolscript-css-0173",
461
+ "smolscript-css-0176",
462
+ "smolscript-css-0178",
463
+ "smolscript-css-0179",
464
+ "smolscript-css-0181",
465
+ "smolscript-css-0187",
466
+ "smolscript-css-0189",
467
+ "smolscript-css-0190",
468
+ "smolscript-css-0191",
469
+ "smolscript-css-0195",
470
+ "smolscript-css-0196",
471
+ "smolscript-css-0197",
472
+ "smolscript-css-0199",
473
+ "smolscript-css-0200",
474
+ "smolscript-cpp-0001",
475
+ "smolscript-cpp-0003",
476
+ "smolscript-cpp-0007",
477
+ "smolscript-cpp-0008",
478
+ "smolscript-cpp-0012",
479
+ "smolscript-cpp-0013",
480
+ "smolscript-cpp-0018",
481
+ "smolscript-cpp-0020",
482
+ "smolscript-cpp-0022",
483
+ "smolscript-cpp-0023",
484
+ "smolscript-cpp-0025",
485
+ "smolscript-cpp-0029",
486
+ "smolscript-cpp-0032",
487
+ "smolscript-cpp-0033",
488
+ "smolscript-cpp-0035",
489
+ "smolscript-cpp-0037",
490
+ "smolscript-cpp-0038",
491
+ "smolscript-cpp-0040",
492
+ "smolscript-cpp-0044",
493
+ "smolscript-cpp-0046",
494
+ "smolscript-cpp-0048",
495
+ "smolscript-cpp-0049",
496
+ "smolscript-cpp-0050",
497
+ "smolscript-cpp-0053",
498
+ "smolscript-cpp-0054",
499
+ "smolscript-cpp-0058",
500
+ "smolscript-cpp-0059",
501
+ "smolscript-cpp-0060",
502
+ "smolscript-cpp-0061",
503
+ "smolscript-cpp-0062",
504
+ "smolscript-cpp-0064",
505
+ "smolscript-cpp-0065",
506
+ "smolscript-cpp-0067",
507
+ "smolscript-cpp-0072",
508
+ "smolscript-cpp-0073",
509
+ "smolscript-cpp-0074",
510
+ "smolscript-cpp-0077",
511
+ "smolscript-cpp-0078",
512
+ "smolscript-cpp-0079",
513
+ "smolscript-cpp-0080",
514
+ "smolscript-cpp-0081",
515
+ "smolscript-cpp-0082",
516
+ "smolscript-cpp-0084",
517
+ "smolscript-cpp-0085",
518
+ "smolscript-cpp-0086",
519
+ "smolscript-cpp-0087",
520
+ "smolscript-cpp-0089",
521
+ "smolscript-cpp-0090",
522
+ "smolscript-cpp-0093",
523
+ "smolscript-cpp-0094",
524
+ "smolscript-cpp-0095",
525
+ "smolscript-cpp-0096",
526
+ "smolscript-cpp-0097",
527
+ "smolscript-cpp-0098",
528
+ "smolscript-cpp-0099",
529
+ "smolscript-cpp-0100",
530
+ "smolscript-cpp-0101",
531
+ "smolscript-cpp-0107",
532
+ "smolscript-cpp-0108",
533
+ "smolscript-cpp-0111",
534
+ "smolscript-cpp-0113",
535
+ "smolscript-cpp-0115",
536
+ "smolscript-cpp-0118",
537
+ "smolscript-cpp-0121",
538
+ "smolscript-cpp-0122",
539
+ "smolscript-cpp-0126",
540
+ "smolscript-cpp-0132",
541
+ "smolscript-cpp-0135",
542
+ "smolscript-cpp-0136",
543
+ "smolscript-cpp-0137",
544
+ "smolscript-cpp-0140",
545
+ "smolscript-cpp-0142",
546
+ "smolscript-cpp-0143",
547
+ "smolscript-cpp-0144",
548
+ "smolscript-cpp-0146",
549
+ "smolscript-cpp-0147",
550
+ "smolscript-cpp-0149",
551
+ "smolscript-cpp-0150",
552
+ "smolscript-cpp-0151",
553
+ "smolscript-cpp-0153",
554
+ "smolscript-cpp-0154",
555
+ "smolscript-cpp-0155",
556
+ "smolscript-cpp-0156",
557
+ "smolscript-cpp-0157",
558
+ "smolscript-cpp-0160",
559
+ "smolscript-cpp-0164",
560
+ "smolscript-cpp-0165",
561
+ "smolscript-cpp-0168",
562
+ "smolscript-cpp-0169",
563
+ "smolscript-cpp-0175",
564
+ "smolscript-cpp-0176",
565
+ "smolscript-cpp-0177",
566
+ "smolscript-cpp-0178",
567
+ "smolscript-cpp-0181",
568
+ "smolscript-cpp-0184",
569
+ "smolscript-cpp-0186",
570
+ "smolscript-cpp-0187",
571
+ "smolscript-cpp-0191",
572
+ "smolscript-cpp-0194",
573
+ "smolscript-cpp-0197",
574
+ "smolscript-cpp-0199",
575
+ "smolscript-cpp-0201",
576
+ "smolscript-cpp-0204",
577
+ "smolscript-cpp-0205",
578
+ "smolscript-cpp-0207",
579
+ "smolscript-cpp-0210",
580
+ "smolscript-cpp-0212",
581
+ "smolscript-cpp-0213",
582
+ "smolscript-cpp-0215",
583
+ "smolscript-cpp-0216",
584
+ "smolscript-cpp-0218",
585
+ "smolscript-cpp-0220",
586
+ "smolscript-cpp-0222",
587
+ "smolscript-c-0001",
588
+ "smolscript-c-0002",
589
+ "smolscript-c-0008",
590
+ "smolscript-c-0013",
591
+ "smolscript-c-0014",
592
+ "smolscript-c-0016",
593
+ "smolscript-c-0017",
594
+ "smolscript-c-0019",
595
+ "smolscript-c-0022",
596
+ "smolscript-c-0023",
597
+ "smolscript-c-0024",
598
+ "smolscript-c-0025",
599
+ "smolscript-c-0026",
600
+ "smolscript-c-0030",
601
+ "smolscript-c-0031",
602
+ "smolscript-c-0032",
603
+ "smolscript-c-0034",
604
+ "smolscript-c-0037",
605
+ "smolscript-c-0038",
606
+ "smolscript-c-0039",
607
+ "smolscript-c-0041",
608
+ "smolscript-c-0044",
609
+ "smolscript-c-0045",
610
+ "smolscript-c-0051",
611
+ "smolscript-c-0057",
612
+ "smolscript-c-0058",
613
+ "smolscript-c-0060",
614
+ "smolscript-c-0062",
615
+ "smolscript-c-0066",
616
+ "smolscript-c-0067",
617
+ "smolscript-c-0068",
618
+ "smolscript-c-0072",
619
+ "smolscript-c-0073",
620
+ "smolscript-c-0075",
621
+ "smolscript-c-0077",
622
+ "smolscript-c-0078",
623
+ "smolscript-c-0081",
624
+ "smolscript-c-0083",
625
+ "smolscript-c-0085",
626
+ "smolscript-c-0086",
627
+ "smolscript-c-0089",
628
+ "smolscript-c-0091",
629
+ "smolscript-c-0092",
630
+ "smolscript-c-0096",
631
+ "smolscript-c-0097",
632
+ "smolscript-c-0098",
633
+ "smolscript-c-0099",
634
+ "smolscript-c-0100",
635
+ "smolscript-c-0101",
636
+ "smolscript-c-0102",
637
+ "smolscript-c-0103",
638
+ "smolscript-c-0105",
639
+ "smolscript-c-0107",
640
+ "smolscript-c-0108",
641
+ "smolscript-c-0109",
642
+ "smolscript-c-0114",
643
+ "smolscript-c-0115",
644
+ "smolscript-c-0116",
645
+ "smolscript-c-0117",
646
+ "smolscript-c-0118",
647
+ "smolscript-c-0123",
648
+ "smolscript-c-0124",
649
+ "smolscript-c-0128",
650
+ "smolscript-c-0130",
651
+ "smolscript-c-0131",
652
+ "smolscript-c-0132",
653
+ "smolscript-c-0133",
654
+ "smolscript-c-0134",
655
+ "smolscript-c-0139",
656
+ "smolscript-c-0140",
657
+ "smolscript-c-0143",
658
+ "smolscript-c-0145",
659
+ "smolscript-c-0146",
660
+ "smolscript-c-0147",
661
+ "smolscript-c-0148",
662
+ "smolscript-c-0151",
663
+ "smolscript-c-0153",
664
+ "smolscript-c-0154",
665
+ "smolscript-c-0155",
666
+ "smolscript-c-0156",
667
+ "smolscript-c-0161",
668
+ "smolscript-c-0162",
669
+ "smolscript-c-0166",
670
+ "smolscript-c-0168",
671
+ "smolscript-c-0169",
672
+ "smolscript-c-0173",
673
+ "smolscript-c-0175",
674
+ "smolscript-c-0179",
675
+ "smolscript-c-0180",
676
+ "smolscript-c-0181",
677
+ "smolscript-c-0182",
678
+ "smolscript-c-0183",
679
+ "smolscript-c-0185",
680
+ "smolscript-c-0187",
681
+ "smolscript-c-0190",
682
+ "smolscript-c-0191",
683
+ "smolscript-c-0192",
684
+ "smolscript-c-0193",
685
+ "smolscript-c-0194",
686
+ "smolscript-c-0198",
687
+ "smolscript-c-0202",
688
+ "smolscript-c-0203",
689
+ "smolscript-c-0204",
690
+ "smolscript-c-0205",
691
+ "smolscript-c-0207",
692
+ "smolscript-c-0208",
693
+ "smolscript-c-0210",
694
+ "smolscript-c-0214",
695
+ "smolscript-c-0215",
696
+ "smolscript-c-0217",
697
+ "smolscript-c-0221",
698
+ "smolscript-c-0223",
699
+ "smolscript-c-0224",
700
+ "smolscript-lua-0001",
701
+ "smolscript-lua-0002",
702
+ "smolscript-lua-0004",
703
+ "smolscript-lua-0005",
704
+ "smolscript-lua-0006",
705
+ "smolscript-lua-0011",
706
+ "smolscript-lua-0015",
707
+ "smolscript-lua-0016",
708
+ "smolscript-lua-0019",
709
+ "smolscript-lua-0020",
710
+ "smolscript-lua-0024",
711
+ "smolscript-lua-0026",
712
+ "smolscript-lua-0027",
713
+ "smolscript-lua-0030",
714
+ "smolscript-lua-0036",
715
+ "smolscript-lua-0037",
716
+ "smolscript-lua-0039",
717
+ "smolscript-lua-0042",
718
+ "smolscript-lua-0045",
719
+ "smolscript-lua-0046",
720
+ "smolscript-lua-0053",
721
+ "smolscript-lua-0054",
722
+ "smolscript-lua-0055",
723
+ "smolscript-lua-0056",
724
+ "smolscript-lua-0057",
725
+ "smolscript-lua-0061",
726
+ "smolscript-lua-0062",
727
+ "smolscript-lua-0063",
728
+ "smolscript-lua-0064",
729
+ "smolscript-lua-0065",
730
+ "smolscript-lua-0067",
731
+ "smolscript-lua-0069",
732
+ "smolscript-lua-0070",
733
+ "smolscript-lua-0072",
734
+ "smolscript-lua-0073",
735
+ "smolscript-lua-0075",
736
+ "smolscript-lua-0077",
737
+ "smolscript-lua-0078",
738
+ "smolscript-lua-0079",
739
+ "smolscript-lua-0080",
740
+ "smolscript-lua-0081",
741
+ "smolscript-lua-0082",
742
+ "smolscript-lua-0084",
743
+ "smolscript-lua-0086",
744
+ "smolscript-lua-0089",
745
+ "smolscript-lua-0090",
746
+ "smolscript-lua-0095",
747
+ "smolscript-lua-0097",
748
+ "smolscript-lua-0099",
749
+ "smolscript-lua-0100",
750
+ "smolscript-lua-0105",
751
+ "smolscript-lua-0106",
752
+ "smolscript-lua-0107",
753
+ "smolscript-lua-0112",
754
+ "smolscript-lua-0114",
755
+ "smolscript-lua-0116",
756
+ "smolscript-lua-0117",
757
+ "smolscript-lua-0118",
758
+ "smolscript-lua-0119",
759
+ "smolscript-lua-0120",
760
+ "smolscript-lua-0122",
761
+ "smolscript-lua-0123",
762
+ "smolscript-lua-0125",
763
+ "smolscript-lua-0127",
764
+ "smolscript-lua-0128",
765
+ "smolscript-lua-0129",
766
+ "smolscript-lua-0130",
767
+ "smolscript-lua-0135",
768
+ "smolscript-lua-0139",
769
+ "smolscript-lua-0140",
770
+ "smolscript-lua-0141",
771
+ "smolscript-lua-0142",
772
+ "smolscript-lua-0143",
773
+ "smolscript-lua-0144",
774
+ "smolscript-lua-0145",
775
+ "smolscript-lua-0151",
776
+ "smolscript-lua-0152",
777
+ "smolscript-lua-0153",
778
+ "smolscript-lua-0155",
779
+ "smolscript-lua-0158",
780
+ "smolscript-lua-0159",
781
+ "smolscript-lua-0162",
782
+ "smolscript-lua-0164",
783
+ "smolscript-lua-0165",
784
+ "smolscript-lua-0167",
785
+ "smolscript-lua-0168",
786
+ "smolscript-lua-0169",
787
+ "smolscript-lua-0173",
788
+ "smolscript-lua-0174",
789
+ "smolscript-lua-0177",
790
+ "smolscript-lua-0181",
791
+ "smolscript-lua-0183",
792
+ "smolscript-lua-0186",
793
+ "smolscript-lua-0188",
794
+ "smolscript-lua-0191",
795
+ "smolscript-lua-0192",
796
+ "smolscript-lua-0193",
797
+ "smolscript-lua-0195",
798
+ "smolscript-lua-0196",
799
+ "smolscript-lua-0199",
800
+ "smolscript-csharp-0003",
801
+ "smolscript-csharp-0004",
802
+ "smolscript-csharp-0005",
803
+ "smolscript-csharp-0006",
804
+ "smolscript-csharp-0007",
805
+ "smolscript-csharp-0008",
806
+ "smolscript-csharp-0009",
807
+ "smolscript-csharp-0010",
808
+ "smolscript-csharp-0012",
809
+ "smolscript-csharp-0013",
810
+ "smolscript-csharp-0018",
811
+ "smolscript-csharp-0019",
812
+ "smolscript-csharp-0021",
813
+ "smolscript-csharp-0023",
814
+ "smolscript-csharp-0024",
815
+ "smolscript-csharp-0025",
816
+ "smolscript-csharp-0028",
817
+ "smolscript-csharp-0032",
818
+ "smolscript-csharp-0033",
819
+ "smolscript-csharp-0034",
820
+ "smolscript-csharp-0039",
821
+ "smolscript-csharp-0040",
822
+ "smolscript-csharp-0041",
823
+ "smolscript-csharp-0042",
824
+ "smolscript-csharp-0047",
825
+ "smolscript-csharp-0051",
826
+ "smolscript-csharp-0052",
827
+ "smolscript-csharp-0053",
828
+ "smolscript-csharp-0056",
829
+ "smolscript-csharp-0057",
830
+ "smolscript-csharp-0065",
831
+ "smolscript-csharp-0068",
832
+ "smolscript-csharp-0070",
833
+ "smolscript-csharp-0073",
834
+ "smolscript-csharp-0075",
835
+ "smolscript-csharp-0076",
836
+ "smolscript-csharp-0078",
837
+ "smolscript-csharp-0080",
838
+ "smolscript-csharp-0081",
839
+ "smolscript-csharp-0082",
840
+ "smolscript-csharp-0084",
841
+ "smolscript-csharp-0085",
842
+ "smolscript-csharp-0086",
843
+ "smolscript-csharp-0087",
844
+ "smolscript-csharp-0090",
845
+ "smolscript-csharp-0093",
846
+ "smolscript-csharp-0097",
847
+ "smolscript-csharp-0099",
848
+ "smolscript-csharp-0101",
849
+ "smolscript-csharp-0103",
850
+ "smolscript-csharp-0105",
851
+ "smolscript-csharp-0108",
852
+ "smolscript-csharp-0112",
853
+ "smolscript-csharp-0113",
854
+ "smolscript-csharp-0114",
855
+ "smolscript-csharp-0116",
856
+ "smolscript-csharp-0117",
857
+ "smolscript-csharp-0119",
858
+ "smolscript-csharp-0120",
859
+ "smolscript-csharp-0122",
860
+ "smolscript-csharp-0123",
861
+ "smolscript-csharp-0125",
862
+ "smolscript-csharp-0126",
863
+ "smolscript-csharp-0128",
864
+ "smolscript-csharp-0129",
865
+ "smolscript-csharp-0132",
866
+ "smolscript-csharp-0134",
867
+ "smolscript-csharp-0136",
868
+ "smolscript-csharp-0139",
869
+ "smolscript-csharp-0143",
870
+ "smolscript-csharp-0145",
871
+ "smolscript-csharp-0146",
872
+ "smolscript-csharp-0148",
873
+ "smolscript-csharp-0149",
874
+ "smolscript-csharp-0155",
875
+ "smolscript-csharp-0156",
876
+ "smolscript-csharp-0157",
877
+ "smolscript-csharp-0158",
878
+ "smolscript-csharp-0159",
879
+ "smolscript-csharp-0165",
880
+ "smolscript-csharp-0166",
881
+ "smolscript-csharp-0167",
882
+ "smolscript-csharp-0169",
883
+ "smolscript-csharp-0172",
884
+ "smolscript-csharp-0173",
885
+ "smolscript-csharp-0174",
886
+ "smolscript-csharp-0175",
887
+ "smolscript-csharp-0176",
888
+ "smolscript-csharp-0178",
889
+ "smolscript-csharp-0179",
890
+ "smolscript-csharp-0180",
891
+ "smolscript-csharp-0181",
892
+ "smolscript-csharp-0182",
893
+ "smolscript-csharp-0185",
894
+ "smolscript-csharp-0187",
895
+ "smolscript-csharp-0190",
896
+ "smolscript-csharp-0192",
897
+ "smolscript-csharp-0195",
898
+ "smolscript-csharp-0197",
899
+ "smolscript-csharp-0201",
900
+ "smolscript-csharp-0202",
901
+ "smolscript-csharp-0204",
902
+ "smolscript-csharp-0205",
903
+ "smolscript-csharp-0209",
904
+ "smolscript-csharp-0210",
905
+ "smolscript-csharp-0212",
906
+ "smolscript-csharp-0213",
907
+ "smolscript-csharp-0215",
908
+ "smolscript-csharp-0216",
909
+ "smolscript-csharp-0217",
910
+ "smolscript-csharp-0222",
911
+ "smolscript-csharp-0224",
912
+ "smolscript-rust-0002",
913
+ "smolscript-rust-0003",
914
+ "smolscript-rust-0005",
915
+ "smolscript-rust-0006",
916
+ "smolscript-rust-0007",
917
+ "smolscript-rust-0008",
918
+ "smolscript-rust-0014",
919
+ "smolscript-rust-0015",
920
+ "smolscript-rust-0016",
921
+ "smolscript-rust-0017",
922
+ "smolscript-rust-0019",
923
+ "smolscript-rust-0021",
924
+ "smolscript-rust-0022",
925
+ "smolscript-rust-0023",
926
+ "smolscript-rust-0029",
927
+ "smolscript-rust-0030",
928
+ "smolscript-rust-0031",
929
+ "smolscript-rust-0032",
930
+ "smolscript-rust-0033",
931
+ "smolscript-rust-0034",
932
+ "smolscript-rust-0040",
933
+ "smolscript-rust-0041",
934
+ "smolscript-rust-0044",
935
+ "smolscript-rust-0045",
936
+ "smolscript-rust-0046",
937
+ "smolscript-rust-0047",
938
+ "smolscript-rust-0050",
939
+ "smolscript-rust-0051",
940
+ "smolscript-rust-0052",
941
+ "smolscript-rust-0054",
942
+ "smolscript-rust-0055",
943
+ "smolscript-rust-0056",
944
+ "smolscript-rust-0057",
945
+ "smolscript-rust-0059",
946
+ "smolscript-rust-0060",
947
+ "smolscript-rust-0063",
948
+ "smolscript-rust-0065",
949
+ "smolscript-rust-0069",
950
+ "smolscript-rust-0070",
951
+ "smolscript-rust-0071",
952
+ "smolscript-rust-0073",
953
+ "smolscript-rust-0078",
954
+ "smolscript-rust-0082",
955
+ "smolscript-rust-0083",
956
+ "smolscript-rust-0087",
957
+ "smolscript-rust-0089",
958
+ "smolscript-rust-0090",
959
+ "smolscript-rust-0091",
960
+ "smolscript-rust-0092",
961
+ "smolscript-rust-0094",
962
+ "smolscript-rust-0096",
963
+ "smolscript-rust-0098",
964
+ "smolscript-rust-0099",
965
+ "smolscript-rust-0101",
966
+ "smolscript-rust-0102",
967
+ "smolscript-rust-0105",
968
+ "smolscript-rust-0106",
969
+ "smolscript-rust-0112",
970
+ "smolscript-rust-0113",
971
+ "smolscript-rust-0115",
972
+ "smolscript-rust-0116",
973
+ "smolscript-rust-0118",
974
+ "smolscript-rust-0120",
975
+ "smolscript-rust-0121",
976
+ "smolscript-rust-0132",
977
+ "smolscript-rust-0133",
978
+ "smolscript-rust-0134",
979
+ "smolscript-rust-0136",
980
+ "smolscript-rust-0138",
981
+ "smolscript-rust-0140",
982
+ "smolscript-rust-0142",
983
+ "smolscript-rust-0143",
984
+ "smolscript-rust-0146",
985
+ "smolscript-rust-0148",
986
+ "smolscript-rust-0150",
987
+ "smolscript-rust-0151",
988
+ "smolscript-rust-0152",
989
+ "smolscript-rust-0155",
990
+ "smolscript-rust-0156",
991
+ "smolscript-rust-0158",
992
+ "smolscript-rust-0159",
993
+ "smolscript-rust-0160",
994
+ "smolscript-rust-0162",
995
+ "smolscript-rust-0164",
996
+ "smolscript-rust-0165",
997
+ "smolscript-rust-0167",
998
+ "smolscript-rust-0171",
999
+ "smolscript-rust-0172",
1000
+ "smolscript-rust-0176",
1001
+ "smolscript-rust-0178",
1002
+ "smolscript-rust-0182",
1003
+ "smolscript-rust-0184",
1004
+ "smolscript-rust-0188",
1005
+ "smolscript-rust-0190",
1006
+ "smolscript-rust-0194",
1007
+ "smolscript-rust-0196",
1008
+ "smolscript-rust-0197",
1009
+ "smolscript-rust-0198",
1010
+ "smolscript-rust-0199",
1011
+ "smolscript-rust-0200",
1012
+ "smolscript-rust-0203",
1013
+ "smolscript-rust-0204",
1014
+ "smolscript-rust-0210",
1015
+ "smolscript-rust-0213",
1016
+ "smolscript-rust-0214",
1017
+ "smolscript-rust-0215",
1018
+ "smolscript-rust-0216",
1019
+ "smolscript-rust-0218",
1020
+ "smolscript-rust-0220",
1021
+ "smolscript-rust-0221",
1022
+ "smolscript-rust-0224",
1023
+ "smolscript-rust-0225"
1024
+ ],
1025
+ "selection_sha256": "9937192b809cc8548b16bcc6c56ab9cbc762816be03a44e46c08170b48213e0a",
1026
  "files": {
1027
+ "data/smolscript.jsonl": "1c17c3515e86e2c4bc25c84b45b9f086c87efd98e1d75a7f4b42772b9d88176e",
1028
+ "data/smolscript.parquet": "358eae399dac7564ea5fb8753734f189aea3932994a22779d543bdcce847e050",
1029
+ "private_tests/hidden.jsonl": "55c240d74282889fa2829fb307bf42649fb04876f5ebeb9e6f95cd934bcc105a",
1030
+ "references/solutions.jsonl": "34c7244ea9160ba090e7c3bc1802ca68cc882f8ee9c29736ea8529d499977677"
1031
  }
1032
  }
private_tests/hidden.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
pyproject.toml CHANGED
@@ -3,7 +3,7 @@ requires = ["setuptools>=68"]
3
  build-backend = "setuptools.build_meta"
4
  [project]
5
  name = "smolscript"
6
- version = "0.1.0"
7
  description = "A small-model multilingual execution benchmark"
8
  requires-python = ">=3.11"
9
  license = {text = "MIT"}
 
3
  build-backend = "setuptools.build_meta"
4
  [project]
5
  name = "smolscript"
6
+ version = "0.2.0"
7
  description = "A small-model multilingual execution benchmark"
8
  requires-python = ">=3.11"
9
  license = {text = "MIT"}
references/solutions.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
runners/hf_runtime.py ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Shared batched generation and measured, log-friendly progress (no prompt text)."""
2
+ import gc
3
+ import inspect
4
+ import sys
5
+ import threading
6
+ import time
7
+ from itertools import groupby
8
+
9
+ from .hf_tokens import padded_batch
10
+
11
+
12
+ class Progress:
13
+ def __init__(self, label, total=0, quiet=False, interval=5):
14
+ self.label, self.total, self.quiet = label, total, quiet
15
+ self.interval = interval
16
+ self.done = self.tokens = 0
17
+ self.stage = 'starting'
18
+ self.started = time.monotonic()
19
+ self.last = 0.0
20
+ self.lock = threading.RLock()
21
+ self.stop = threading.Event()
22
+
23
+ def update(self, stage=None, done=None, tokens=None, force=False):
24
+ with self.lock:
25
+ if stage is not None:
26
+ self.stage = stage
27
+ if done is not None:
28
+ self.done = done
29
+ if tokens is not None:
30
+ self.tokens = tokens
31
+ self.render(force)
32
+
33
+ def render(self, force=False):
34
+ now = time.monotonic()
35
+ if self.quiet or (not force and now-self.last < self.interval):
36
+ return
37
+ self.last = now
38
+ elapsed = max(now-self.started, 1e-6)
39
+ rate = self.done/elapsed
40
+ eta = f'{(self.total-self.done)/rate:.0f}s' if rate and self.total else 'pending'
41
+ print(f'{self.label}: {self.stage} | {self.done}/{self.total} complete | '
42
+ f'{self.tokens} generated tokens | {rate:.2f}/s | elapsed {elapsed:.0f}s | ETA {eta}',
43
+ file=sys.stderr, flush=True)
44
+
45
+ def __enter__(self):
46
+ self.update(force=True)
47
+ def heartbeat():
48
+ while not self.stop.wait(self.interval):
49
+ with self.lock:
50
+ self.render()
51
+ self.thread = threading.Thread(target=heartbeat, daemon=True)
52
+ if not self.quiet:
53
+ self.thread.start()
54
+ return self
55
+
56
+ def __exit__(self, kind, value, tb):
57
+ self.stop.set()
58
+ if self.thread.is_alive():
59
+ self.thread.join(timeout=1)
60
+ self.update(stage='failed' if kind else 'finished', force=True)
61
+
62
+
63
+ def eos_ids(model, tokenizer):
64
+ value = getattr(model.generation_config, 'eos_token_id', None)
65
+ if value is None:
66
+ value = tokenizer.eos_token_id
67
+ return set(value if isinstance(value, (list, tuple)) else [] if value is None else [value])
68
+
69
+
70
+ class TokenProgress:
71
+ """Transformers streamer: count actual decode steps without decoding text."""
72
+ def __init__(self, progress, batch_size, eos, base_tokens=0):
73
+ self.progress = progress
74
+ self.active = [True]*batch_size
75
+ self.eos = eos
76
+ self.first = True
77
+ self.count = 0
78
+ self.base = base_tokens
79
+
80
+ def put(self, value):
81
+ if self.first: # Initial prompt (or decoder-start IDs), not generated tokens.
82
+ self.first = False
83
+ return
84
+ values = value.tolist()
85
+ for i, token in enumerate(values):
86
+ if self.active[i]:
87
+ self.count += 1
88
+ if token in self.eos:
89
+ self.active[i] = False
90
+ self.progress.update(stage='decoding', tokens=self.base+self.count)
91
+
92
+ def end(self):
93
+ pass
94
+
95
+
96
+ def trim_after_eos(sequences, eos):
97
+ result = []
98
+ for tokens in sequences:
99
+ end = next((i+1 for i,t in enumerate(tokens) if t in eos), len(tokens))
100
+ result.append(tokens[:end])
101
+ return result
102
+
103
+
104
+ def generate_batches(model, tokenizer, compiled, rows, budget_for, batch_size, emit,
105
+ progress, is_seq2seq=False, keep_special_tokens=False, stream_tokens=True):
106
+ """Length/budget buckets, KV cache, greedy decoding, and CUDA OOM backoff."""
107
+ import torch
108
+ ordered = sorted(rows, key=lambda q: (budget_for(q), len(compiled[q['id']]['input_ids'])))
109
+ eos = eos_ids(model, tokenizer)
110
+ started=time.monotonic()
111
+ done = tokens_done = 0
112
+ effective_batch = batch_size
113
+ stats = dict(batches=0, oom_retries=0, generated_tokens=0, input_tokens=0, padded_input_tokens=0, eos_completions=0, token_limit_completions=0,
114
+ token_limit_question_ids=[])
115
+ # Models exposing this documented optimization need only the next-token logits
116
+ # during generation, not a vocabulary projection for every prefill position.
117
+ generation_options = {}
118
+ forward = getattr(model, 'forward', None)
119
+ if forward is not None and not is_seq2seq:
120
+ parameters = inspect.signature(forward).parameters
121
+ for name in ('logits_to_keep', 'num_logits_to_keep'):
122
+ if name in parameters:
123
+ generation_options[name] = 1
124
+ break
125
+ stats['token_streamer'] = stream_tokens
126
+ stats['last_token_logits'] = bool(generation_options)
127
+ # Tokenizers can emit segment IDs even when their paired model rejects them.
128
+ # Keep cached IDs intact, but pass them only to models declaring support.
129
+ include_token_types = any(
130
+ method is not None and 'token_type_ids' in inspect.signature(method).parameters
131
+ for method in (forward, getattr(model, 'prepare_inputs_for_generation', None))
132
+ )
133
+
134
+ def generate(group, budget):
135
+ data = padded_batch([compiled[q['id']] for q in group], tokenizer.pad_token_id,
136
+ tokenizer.padding_side, include_token_types=include_token_types)
137
+ width = data['input_ids'].shape[1]
138
+ device = model.get_input_embeddings().weight.device
139
+ data = {k:v.to(device) for k,v in data.items()}
140
+ progress.update(stage=f'prefill batch={len(group)} input_width={width}', force=True)
141
+ stream = TokenProgress(progress, len(group), eos, tokens_done)
142
+ # Explicit defaults prevent a checkpoint's sampling/beam config changing the task.
143
+ output = model.generate(**data, max_new_tokens=budget, do_sample=False, num_beams=1,
144
+ num_return_sequences=1, pad_token_id=tokenizer.pad_token_id,
145
+ use_cache=True, streamer=stream if stream_tokens else None, return_dict_in_generate=False,
146
+ output_scores=False, **generation_options)
147
+ prefix = 1 if is_seq2seq else width
148
+ sequences = trim_after_eos(output[:, prefix:].tolist(), eos)
149
+ answers = tokenizer.batch_decode(sequences, skip_special_tokens=not keep_special_tokens,
150
+ clean_up_tokenization_spaces=False)
151
+ if len(answers) != len(group):
152
+ raise RuntimeError('Generation returned an unexpected number of sequences')
153
+ return answers, [len(s) for s in sequences], width, [bool(s and s[-1] in eos) for s in sequences]
154
+
155
+ with torch.inference_mode():
156
+ for budget, family in groupby(ordered, key=budget_for):
157
+ family = list(family)
158
+ offset = 0
159
+ while offset < len(family):
160
+ group = family[offset:offset+effective_batch]
161
+ try:
162
+ answers, lengths, width, ended = generate(group, budget)
163
+ except torch.cuda.OutOfMemoryError:
164
+ if len(group) == 1:
165
+ raise
166
+ effective_batch = max(1, len(group)//2)
167
+ stats['oom_retries'] += 1
168
+ progress.update(stage=f'CUDA OOM; retry batch={effective_batch}', tokens=tokens_done, force=True)
169
+ else:
170
+ emit([(q['id'], text, length) for q,text,length in zip(group,answers,lengths)])
171
+ done += len(group)
172
+ tokens_done += sum(lengths)
173
+ stats['batches'] += 1
174
+ stats['eos_completions'] += sum(ended)
175
+ limited = [q['id'] for q,n,end in zip(group,lengths,ended) if n >= budget and not end]
176
+ stats['token_limit_completions'] += len(limited)
177
+ stats['token_limit_question_ids'] = (stats['token_limit_question_ids'] + limited)[:25]
178
+ stats['input_tokens'] += sum(len(compiled[q['id']]['input_ids']) for q in group)
179
+ stats['padded_input_tokens'] += width*len(group)
180
+ progress.update(stage='batch saved', done=done, tokens=tokens_done, force=True)
181
+ offset += len(group)
182
+ continue
183
+ # Release the exception traceback (and its tensors) before GC.
184
+ gc.collect()
185
+ if torch.cuda.is_available():
186
+ torch.cuda.empty_cache()
187
+ elapsed=max(time.monotonic()-started,1e-9)
188
+ stats.update(generated_tokens=tokens_done, final_batch_size=effective_batch,
189
+ generation_wall_seconds=elapsed, generated_tokens_per_second=tokens_done/elapsed)
190
+ return stats
runners/hf_tokens.py ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Content-addressed, model-specific token compilation for SmolCUA.
3
+
4
+ This module is intentionally independent of torch/vLLM. Fast HF tokenizers
5
+ process *all* selected benchmark prompts in CPU batches before inference;
6
+ inference engines only consume token IDs. A content-addressed persistent cache
7
+ skips that CPU work on later runs of the same model and dataset revision.
8
+ """
9
+ from __future__ import annotations
10
+
11
+ import hashlib
12
+ import json
13
+ import os
14
+ from pathlib import Path
15
+ import statistics
16
+ import time
17
+
18
+ VERSION = 2
19
+
20
+
21
+ def stable_json(value):
22
+ return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(',', ':'), default=str)
23
+
24
+
25
+ def sha(value):
26
+ return hashlib.sha256(value if isinstance(value, bytes) else str(value).encode('utf-8')).hexdigest()
27
+
28
+
29
+ def tokenizer_fingerprint(tokenizer):
30
+ """Fingerprint the *actual* tokenizer, not only its HF repository name.
31
+
32
+ The backend tokenization graph changes if merges/vocabulary/pre-tokenizer
33
+ change without a revision bump. Slow custom tokenizers use their vocab.
34
+ """
35
+ fp = hashlib.sha256()
36
+ for obj in (type(tokenizer).__module__ + '.' + type(tokenizer).__qualname__,
37
+ getattr(tokenizer, 'init_kwargs', {}),
38
+ getattr(tokenizer, 'special_tokens_map', {}),
39
+ getattr(tokenizer, 'added_tokens_decoder', {}),
40
+ getattr(tokenizer, 'chat_template', None),
41
+ getattr(tokenizer, 'bos_token_id', None),
42
+ getattr(tokenizer, 'eos_token_id', None)):
43
+ fp.update(sha(stable_json(obj)).encode())
44
+ backend = getattr(tokenizer, 'backend_tokenizer', None)
45
+ if backend is not None and hasattr(backend, 'to_str'):
46
+ fp.update(sha(backend.to_str()).encode())
47
+ elif hasattr(tokenizer, 'get_vocab'):
48
+ fp.update(sha(stable_json(tokenizer.get_vocab())).encode())
49
+ return fp.hexdigest()
50
+
51
+
52
+ def compile_key(rows, tokenizer, args, dataset_sha):
53
+ settings = {
54
+ 'cache_version': VERSION,
55
+ 'dataset_sha256': dataset_sha,
56
+ 'selected_ids_sha256': sha(stable_json([r['id'] for r in rows])),
57
+ 'tokenizer_repo': getattr(args, 'tokenizer', None) or args.model,
58
+ 'tokenizer_revision': getattr(args, 'tokenizer_revision', None) or args.revision,
59
+ 'tokenizer_fingerprint': tokenizer_fingerprint(tokenizer),
60
+ 'prompt_mode': args.prompt_mode,
61
+ 'chat_template_kwargs': args.chat_template_kwargs,
62
+ 'prompt_formatter_version': getattr(args, 'prompt_formatter_version', 'smolcua:2-direct-answer'),
63
+ 'prompt_content_sha256': sha(stable_json(rows)),
64
+ }
65
+ return sha(stable_json(settings)), settings
66
+
67
+
68
+ def effective_style(tokenizer, mode):
69
+ has_template = bool(getattr(tokenizer, 'chat_template', None))
70
+ if mode == 'chat' and not has_template:
71
+ raise ValueError('This tokenizer has no chat template: use --prompt-mode plain')
72
+ return ('chat' if has_template else 'plain') if mode == 'auto' else mode
73
+
74
+
75
+ def build_text(row, tokenizer, mode, template_kwargs, format_prompt):
76
+ prompt = format_prompt(row)
77
+ if effective_style(tokenizer, mode) == 'plain':
78
+ return prompt + '\n\nAnswer:\n'
79
+ return tokenizer.apply_chat_template(
80
+ [{'role': 'user', 'content': prompt}], tokenize=False,
81
+ add_generation_prompt=True, **template_kwargs)
82
+
83
+
84
+ def token_stats(items):
85
+ lengths = sorted(len(v['input_ids']) for v in items.values())
86
+ if not lengths:
87
+ return {'count': 0, 'input_tokens': 0, 'max_input_tokens': 0, 'p50_input_tokens': 0, 'p95_input_tokens': 0}
88
+ return {'count': len(lengths), 'input_tokens': sum(lengths),
89
+ 'max_input_tokens': lengths[-1],
90
+ 'p50_input_tokens': int(statistics.median(lengths)),
91
+ 'p95_input_tokens': lengths[min(len(lengths)-1, int((len(lengths)-1)*.95))]}
92
+
93
+
94
+ def compile_tokens(rows, tokenizer, args, dataset_sha, format_prompt, prompt_builder=None):
95
+ """Return (id -> tokenized prompt, performance info).
96
+
97
+ The entire list is compiled *before* the first model.generate call. Reused
98
+ caches preserve exact token sequences and do not repeat tokenizer calls.
99
+ Cache files are local to the evaluating user; never upload token caches or
100
+ real model responses with the public benchmark questions.
101
+ """
102
+ progress = getattr(args, '_progress', None)
103
+ if progress:
104
+ progress.update(stage=f'checking token cache ({len(rows)} prompts)', force=True)
105
+ started = time.perf_counter()
106
+ key, settings = compile_key(rows, tokenizer, args, dataset_sha)
107
+ cache_root = Path(getattr(args, 'token_cache_dir', None) or '~/.cache/smolcua/tokens').expanduser()
108
+ use_disk = not getattr(args, 'no_token_cache', False)
109
+ rebuild = getattr(args, 'rebuild_token_cache', False)
110
+ path = cache_root / (key + '.json') if use_disk else None
111
+ wanted_ids = [r['id'] for r in rows]
112
+
113
+ if path is not None and path.exists() and not rebuild:
114
+ try:
115
+ obj = json.loads(path.read_text(encoding='utf-8'))
116
+ valid = (obj.get('settings') == settings and
117
+ list(obj.get('items', {})) == wanted_ids and
118
+ obj.get('tokens_sha256') == sha(stable_json(obj.get('items', {}))))
119
+ if valid:
120
+ items = obj['items']
121
+ valid = all(isinstance(p.get('input_ids'), list) and p['input_ids'] and
122
+ all(isinstance(t, int) and t >= 0 for t in p['input_ids'])
123
+ for p in items.values())
124
+ if valid:
125
+ if progress:
126
+ progress.update(stage=f'token cache hit: {len(items)}/{len(rows)} prompts', force=True)
127
+ return items, {
128
+ 'status': 'hit', 'path': str(path), 'elapsed_seconds': round(time.perf_counter()-started, 4),
129
+ **token_stats(items)}
130
+ except (OSError, ValueError, KeyError, TypeError, AttributeError):
131
+ pass # A stale/partial cache is rebuilt, not silently used.
132
+
133
+ batch_size = int(getattr(args, 'tokenize_batch_size', 512))
134
+ if batch_size <= 0:
135
+ raise ValueError('--tokenize-batch-size must be positive')
136
+ items = {}
137
+ for off in range(0, len(rows), batch_size):
138
+ group = rows[off:off+batch_size]
139
+ prompts = [prompt_builder(q) if prompt_builder else build_text(q, tokenizer, args.prompt_mode, args.chat_template_kwargs, format_prompt)
140
+ for q in group]
141
+ # Batched Rust tokenizer threads when available; no padding and NEVER truncate.
142
+ # Chat templates already inject their own special tokens, so disable
143
+ # add_special_tokens to avoid BOS/EOS duplication.
144
+ enc = tokenizer(prompts, add_special_tokens=False, padding=False,
145
+ truncation=False, return_attention_mask=False)
146
+ ids = enc['input_ids']
147
+ if len(ids) != len(group):
148
+ raise ValueError('Tokenizer returned incorrect number of sequences')
149
+ types = enc.get('token_type_ids') if hasattr(enc, 'get') else None
150
+ for i, (row, sequence) in enumerate(zip(group, ids)):
151
+ seq = [int(t) for t in sequence]
152
+ if not seq or min(seq) < 0:
153
+ raise ValueError(f'Empty/invalid tokenized benchmark prompt: {row["id"]}')
154
+ if row['id'] in items:
155
+ raise ValueError(f'Duplicate row ID: {row["id"]}')
156
+ item = {'input_ids': seq}
157
+ if types is not None:
158
+ t = [int(x) for x in types[i]]
159
+ if len(t) != len(seq):
160
+ raise ValueError('token_type_ids shape mismatch')
161
+ item['token_type_ids'] = t
162
+ items[row['id']] = item
163
+ if progress:
164
+ progress.update(stage=f'pretokenized {len(items)}/{len(rows)} prompts', force=True)
165
+ elif not getattr(args, 'quiet', False):
166
+ print(f'Pretokenized {len(items)}/{len(rows)} prompts', flush=True)
167
+ if path is not None:
168
+ cache_root.mkdir(parents=True, exist_ok=True, mode=0o700)
169
+ tmp = path.with_name(path.name + f'.{os.getpid()}.tmp')
170
+ try:
171
+ with open(tmp, 'w', encoding='utf-8') as f:
172
+ os.chmod(tmp, 0o600)
173
+ json.dump({'settings': settings, 'items': items, 'tokens_sha256': sha(stable_json(items))},
174
+ f, ensure_ascii=False, separators=(',', ':'))
175
+ os.replace(tmp, path)
176
+ finally:
177
+ if tmp.exists():
178
+ tmp.unlink()
179
+ return items, {'status': 'built' if use_disk else 'memory', 'path': str(path) if path else None,
180
+ 'elapsed_seconds': round(time.perf_counter()-started, 4), **token_stats(items)}
181
+
182
+
183
+ def padded_batch(group, pad_token_id, padding_side='left', include_token_types=True):
184
+ """Pad cached token IDs directly into torch tensors without tokenizer calls."""
185
+ import torch
186
+ if not group:
187
+ raise ValueError('Cannot pad an empty group')
188
+ if pad_token_id is None:
189
+ raise ValueError('Tokenizer must have a valid pad token ID for Transformers batching')
190
+ maxlen = max(len(t['input_ids']) for t in group)
191
+ input_ids = torch.full((len(group), maxlen), int(pad_token_id), dtype=torch.long)
192
+ attention_mask = torch.zeros((len(group), maxlen), dtype=torch.long)
193
+ has_types = include_token_types and all('token_type_ids' in t for t in group)
194
+ types = torch.zeros((len(group), maxlen), dtype=torch.long) if has_types else None
195
+ for i, item in enumerate(group):
196
+ toks = item['input_ids']
197
+ start = (maxlen - len(toks)) if padding_side == 'left' else 0
198
+ end = start + len(toks)
199
+ input_ids[i, start:end] = torch.as_tensor(toks, dtype=torch.long)
200
+ attention_mask[i, start:end] = 1
201
+ if has_types:
202
+ types[i, start:end] = torch.as_tensor(item['token_type_ids'], dtype=torch.long)
203
+ out = {'input_ids': input_ids, 'attention_mask': attention_mask}
204
+ if has_types:
205
+ out['token_type_ids'] = types
206
+ return out
sandbox/worker.py CHANGED
@@ -10,17 +10,17 @@ import tempfile
10
  from protocol import COMMANDS,wrap_source
11
 
12
 
13
- def limits(seconds):
14
  os.setsid()
15
  resource.setrlimit(resource.RLIMIT_CPU,(seconds,seconds+1))
16
- resource.setrlimit(resource.RLIMIT_FSIZE,(1024*1024,1024*1024))
17
  resource.setrlimit(resource.RLIMIT_CORE,(0,0))
18
 
19
 
20
- def execute(command,stdin,seconds):
21
  with tempfile.TemporaryFile() as out,tempfile.TemporaryFile() as err:
22
  p=subprocess.Popen(command,stdin=subprocess.PIPE,stdout=out,stderr=err,
23
- preexec_fn=lambda:limits(seconds),env={'PATH':os.environ['PATH'],'HOME':'/tmp','LANG':'C.UTF-8',
24
  'LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONHASHSEED':'0','MONO_THREADS_PER_CPU':'1'})
25
  timed_out=False
26
  try:p.communicate(stdin.encode(),timeout=seconds+1)
@@ -38,7 +38,7 @@ def execute(command,stdin,seconds):
38
  def program(request):
39
  filename,compile_cmd,run_cmd=COMMANDS[request['language']]
40
  Path(filename).write_text(wrap_source(request['language'],request['kind'],request['code']))
41
- compilation=execute(compile_cmd,'',30)
42
  syntax=compilation['exit_code']==0 and not compilation['timeout']
43
  if not syntax:return {'syntax_success':False,'compilation':compilation,'observations':[]}
44
  observations=[]
 
10
  from protocol import COMMANDS,wrap_source
11
 
12
 
13
+ def limits(seconds,file_limit):
14
  os.setsid()
15
  resource.setrlimit(resource.RLIMIT_CPU,(seconds,seconds+1))
16
+ resource.setrlimit(resource.RLIMIT_FSIZE,(file_limit,file_limit))
17
  resource.setrlimit(resource.RLIMIT_CORE,(0,0))
18
 
19
 
20
+ def execute(command,stdin,seconds,file_limit=1024*1024):
21
  with tempfile.TemporaryFile() as out,tempfile.TemporaryFile() as err:
22
  p=subprocess.Popen(command,stdin=subprocess.PIPE,stdout=out,stderr=err,
23
+ preexec_fn=lambda:limits(seconds,file_limit),env={'PATH':os.environ['PATH'],'HOME':'/tmp','LANG':'C.UTF-8',
24
  'LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONHASHSEED':'0','MONO_THREADS_PER_CPU':'1'})
25
  timed_out=False
26
  try:p.communicate(stdin.encode(),timeout=seconds+1)
 
38
  def program(request):
39
  filename,compile_cmd,run_cmd=COMMANDS[request['language']]
40
  Path(filename).write_text(wrap_source(request['language'],request['kind'],request['code']))
41
+ compilation=execute(compile_cmd,'',30,file_limit=64*1024*1024)
42
  syntax=compilation['exit_code']==0 and not compilation['timeout']
43
  if not syntax:return {'syntax_success':False,'compilation':compilation,'observations':[]}
44
  observations=[]
tests/test_core.py CHANGED
@@ -12,6 +12,24 @@ from runners.sandbox import Sandbox,SandboxUnavailable
12
  from validators.dataset import load
13
 
14
  class CoreTests(unittest.TestCase):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  def test_prompt_has_no_reference_or_tests(self):
16
  row=load(ROOT/'data/smolscript.jsonl')[0];row['tests']=[{'input':'SECRET_TEST','expected':'SECRET_ANSWER'}];row['reference_solution']='SECRET_REFERENCE'
17
  text=prompt(row)
 
12
  from validators.dataset import load
13
 
14
  class CoreTests(unittest.TestCase):
15
+ def test_default_subset_is_fixed_and_preserves_original_tasks(self):
16
+ from generators.subset import select
17
+ from collections import Counter
18
+ archive=load(ROOT/'archive/v0.1.0/smolscript.jsonl')
19
+ rows=load(ROOT/'data/smolscript.jsonl')
20
+ self.assertEqual(len(rows),1000)
21
+ self.assertEqual(select(archive),rows)
22
+ self.assertEqual(select(list(reversed(archive)))[::-1],rows)
23
+ self.assertEqual(Counter(r['difficulty'] for r in rows),{'easy':600,'medium':300,'moderate':100})
24
+ original={r['id']:r for r in archive}
25
+ for r in rows:
26
+ for key in ('prompt','output_format','tests'):self.assertEqual(r[key],original[r['id']][key])
27
+ def test_decode_settings_do_not_read_solutions(self):
28
+ from generation_settings import DEFAULT_BATCH_SIZE,token_budget
29
+ self.assertEqual(DEFAULT_BATCH_SIZE,64)
30
+ rows=load(ROOT/'data/smolscript.jsonl')
31
+ self.assertTrue(all(96<=token_budget(r)<=256 for r in rows))
32
+
33
  def test_prompt_has_no_reference_or_tests(self):
34
  row=load(ROOT/'data/smolscript.jsonl')[0];row['tests']=[{'input':'SECRET_TEST','expected':'SECRET_ANSWER'}];row['reference_solution']='SECRET_REFERENCE'
35
  text=prompt(row)
validate.py CHANGED
@@ -13,7 +13,7 @@ def main():
13
  report=check(ROOT);report['reference_execution']='unverified';report['negative_controls']='unverified'
14
  try:
15
  if a.static_only:
16
- report['remaining']='All 2000 references and negative controls require sandbox execution.';return 0
17
  sandbox=Sandbox(a.image,a.engine)
18
  report['sandbox']=sandbox.identity
19
  report['runtimes']=sandbox.run({'diagnostic':True},60)['runtimes']
@@ -48,7 +48,7 @@ def main():
48
  if not result['passed'] or negative['passed'] or (mutant and mutant['passed']):
49
  raise ValueError('Reference or negative control failed: '+rid)
50
  if len(results)%25==0:
51
- print(f'Validated {len(results)}/2000',flush=True);a.output.write_text(json.dumps(report,indent=2)+'\n')
52
  report['reference_execution']='passed';report['negative_controls']='passed';return 0
53
  except SandboxUnavailable as e:
54
  report['blocked_reason']=str(e);report['unverified_languages']=['python','javascript','html','css','cpp','c','lua','csharp','rust'];print(str(e));return 2
 
13
  report=check(ROOT);report['reference_execution']='unverified';report['negative_controls']='unverified'
14
  try:
15
  if a.static_only:
16
+ report['remaining']='All 1000 references and negative controls require sandbox execution.';return 0
17
  sandbox=Sandbox(a.image,a.engine)
18
  report['sandbox']=sandbox.identity
19
  report['runtimes']=sandbox.run({'diagnostic':True},60)['runtimes']
 
48
  if not result['passed'] or negative['passed'] or (mutant and mutant['passed']):
49
  raise ValueError('Reference or negative control failed: '+rid)
50
  if len(results)%25==0:
51
+ print(f'Validated {len(results)}/1000',flush=True);a.output.write_text(json.dumps(report,indent=2)+'\n')
52
  report['reference_execution']='passed';report['negative_controls']='passed';return 0
53
  except SandboxUnavailable as e:
54
  report['blocked_reason']=str(e);report['unverified_languages']=['python','javascript','html','css','cpp','c','lua','csharp','rust'];print(str(e));return 2
validation_report.json CHANGED
@@ -1,30 +1,30 @@
1
  {
2
  "static_validation": "passed",
3
- "examples": 2000,
4
  "languages": {
5
- "python": 250,
6
- "javascript": 250,
7
- "html": 200,
8
- "css": 200,
9
- "cpp": 225,
10
- "c": 225,
11
- "lua": 200,
12
- "csharp": 225,
13
- "rust": 225
14
  },
15
  "difficulty": {
16
- "easy": 1200,
17
- "medium": 600,
18
- "moderate": 200
19
  },
20
  "categories": {
21
- "arithmetic_conditions": 492,
22
- "strings": 468,
23
- "collections_loops": 540,
24
- "frequency_tables": 80,
25
- "dom_events": 20,
26
- "semantic_structure": 200,
27
- "styles_layout": 200
28
  },
29
  "prompt_words": {
30
  "min": 13,
@@ -38,26 +38,6 @@
38
  "exact_duplicates": 0,
39
  "semantic_duplicates_within_language": 0,
40
  "near_text_pairs": [
41
- {
42
- "a": "smolscript-python-0173",
43
- "b": "smolscript-python-0188",
44
- "trigram_jaccard": 0.8667
45
- },
46
- {
47
- "a": "smolscript-javascript-0173",
48
- "b": "smolscript-javascript-0188",
49
- "trigram_jaccard": 0.8667
50
- },
51
- {
52
- "a": "smolscript-cpp-0158",
53
- "b": "smolscript-cpp-0173",
54
- "trigram_jaccard": 0.8667
55
- },
56
- {
57
- "a": "smolscript-c-0158",
58
- "b": "smolscript-c-0173",
59
- "trigram_jaccard": 0.8667
60
- },
61
  {
62
  "a": "smolscript-lua-0143",
63
  "b": "smolscript-lua-0158",
@@ -67,27 +47,11 @@
67
  "a": "smolscript-csharp-0158",
68
  "b": "smolscript-csharp-0173",
69
  "trigram_jaccard": 0.8667
70
- },
71
- {
72
- "a": "smolscript-rust-0158",
73
- "b": "smolscript-rust-0173",
74
- "trigram_jaccard": 0.8667
75
  }
76
  ],
77
  "semantic_check_scope": "finite deterministic probes plus exact DSL/DOM/CSS spec equality; not a general equivalence proof",
78
  "cross_language_policy": "Aligned original tasks intentionally recur across languages for comparable coverage.",
79
  "reference_execution": "unverified",
80
  "negative_controls": "unverified",
81
- "blocked_reason": "docker is unavailable; install Docker/Podman and build sandbox/Dockerfile. No host fallback exists.",
82
- "unverified_languages": [
83
- "python",
84
- "javascript",
85
- "html",
86
- "css",
87
- "cpp",
88
- "c",
89
- "lua",
90
- "csharp",
91
- "rust"
92
- ]
93
  }
 
1
  {
2
  "static_validation": "passed",
3
+ "examples": 1000,
4
  "languages": {
5
+ "python": 125,
6
+ "javascript": 125,
7
+ "html": 100,
8
+ "css": 100,
9
+ "cpp": 113,
10
+ "c": 113,
11
+ "lua": 100,
12
+ "csharp": 112,
13
+ "rust": 112
14
  },
15
  "difficulty": {
16
+ "easy": 600,
17
+ "medium": 300,
18
+ "moderate": 100
19
  },
20
  "categories": {
21
+ "arithmetic_conditions": 246,
22
+ "strings": 234,
23
+ "collections_loops": 271,
24
+ "frequency_tables": 39,
25
+ "dom_events": 10,
26
+ "semantic_structure": 100,
27
+ "styles_layout": 100
28
  },
29
  "prompt_words": {
30
  "min": 13,
 
38
  "exact_duplicates": 0,
39
  "semantic_duplicates_within_language": 0,
40
  "near_text_pairs": [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  {
42
  "a": "smolscript-lua-0143",
43
  "b": "smolscript-lua-0158",
 
47
  "a": "smolscript-csharp-0158",
48
  "b": "smolscript-csharp-0173",
49
  "trigram_jaccard": 0.8667
 
 
 
 
 
50
  }
51
  ],
52
  "semantic_check_scope": "finite deterministic probes plus exact DSL/DOM/CSS spec equality; not a general equivalence proof",
53
  "cross_language_policy": "Aligned original tasks intentionally recur across languages for comparable coverage.",
54
  "reference_execution": "unverified",
55
  "negative_controls": "unverified",
56
+ "remaining": "All 1000 references and negative controls require sandbox execution."
 
 
 
 
 
 
 
 
 
 
 
57
  }
validators/dataset.py CHANGED
@@ -16,11 +16,11 @@ def load(path):
16
 
17
  def check(root):
18
  rows=load(root/'data/smolscript.jsonl');hidden=load(root/'private_tests/hidden.jsonl');refs=load(root/'references/solutions.jsonl')
19
- assert len(rows)==2000,'Expected exactly 2000 examples'
20
  assert Counter(r['language'] for r in rows)=={k:sum(v) for k,v in ALLOCATION.items()},'Language allocation'
21
- assert Counter(r['difficulty'] for r in rows)=={'easy':1200,'medium':600,'moderate':200},'Difficulty allocation'
22
  assert {r['id'] for r in rows}=={r['id'] for r in hidden}=={r['id'] for r in refs},'Private/public ID mismatch'
23
- assert len({r['prompt'] for r in rows})==2000,'Duplicate prompts'
24
  hm={r['id']:r for r in hidden};rm={r['id']:r for r in refs}
25
  hidden_behavior={};seen={};behavior={};categories=Counter();lengths=[];solutions=[];similarity=[]
26
  by_language=defaultdict(list)
 
16
 
17
  def check(root):
18
  rows=load(root/'data/smolscript.jsonl');hidden=load(root/'private_tests/hidden.jsonl');refs=load(root/'references/solutions.jsonl')
19
+ assert len(rows)==1000,'Expected exactly 1000 examples'
20
  assert Counter(r['language'] for r in rows)=={k:sum(v) for k,v in ALLOCATION.items()},'Language allocation'
21
+ assert Counter(r['difficulty'] for r in rows)=={'easy':600,'medium':300,'moderate':100},'Difficulty allocation'
22
  assert {r['id'] for r in rows}=={r['id'] for r in hidden}=={r['id'] for r in refs},'Private/public ID mismatch'
23
+ assert len({r['prompt'] for r in rows})==1000,'Duplicate prompts'
24
  hm={r['id']:r for r in hidden};rm={r['id']:r for r in refs}
25
  hidden_behavior={};seen={};behavior={};categories=Counter();lengths=[];solutions=[];similarity=[]
26
  by_language=defaultdict(list)