CoolFace
Datasetpublic

zeyuzy/DLLM-Planing-Task

DLLM-Planning-Task Benchmark datasets for evaluating planning capabilities of Diffusion Language Models (DLLMs). Dataset Description This dataset contains multiple planning and combinatorial reasoning tasks designed to evaluate discrete diffusion language models. Each task has train/test splits in either CSV or JSONL format. Tasks Task Format Description Sudoku CSV 9x9 Sudoku puzzles. Columns: quizzes, solutions. Path Finding (path-2-6)… See the full description on the dataset page: https://huggingface.co/datasets/zeyuzy/DLLM-Planing-Task.

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes353downloads
export_cipher17.py92 linesDownload Raw Back to root
1#!/usr/bin/env python32"""Generate Cipher-17 train/test JSONL under ``data/``.3 4Run from repo root::5 6    python data/export_cipher17.py7 8Writes::9 10    data/cipher_train.jsonl   # 1_000_000 rows11    data/cipher_test.jsonl    # 5_000 rows12 13Rules: ``anchored_global_dependency.py`` (same folder). See ``cipher_pipeline.md``.14"""15 16from __future__ import annotations17 18import importlib.util19import json20import random21from pathlib import Path22 23DATA_DIR = Path(__file__).resolve().parent24GENERATOR = DATA_DIR / "anchored_global_dependency.py"25 26SEED = 4227N = 1728K_OFFSET = 529POS_CONST = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2]30NUM_TRAIN = 1_000_00031NUM_TEST = 5_00032OUT_TRAIN = DATA_DIR / "cipher_train.jsonl"33OUT_TEST = DATA_DIR / "cipher_test.jsonl"34 35 36def _load_generator():37    if not GENERATOR.is_file():38        raise FileNotFoundError(f"Missing generator: {GENERATOR}")39    spec = importlib.util.spec_from_file_location("cipher_anchored_global", GENERATOR)40    if spec is None or spec.loader is None:41        raise ImportError(f"Cannot load {GENERATOR}")42    mod = importlib.util.module_from_spec(spec)43    spec.loader.exec_module(mod)44    return mod45 46 47def write_jsonl(path: Path, samples: list[dict[str, str]]) -> None:48    with path.open("w", encoding="utf-8") as f:49        for row in samples:50            f.write(json.dumps(row, ensure_ascii=False) + "\n")51 52 53def main() -> None:54    mod = _load_generator()55    print(f"generator: {GENERATOR}")56    print(f"out_dir:   {DATA_DIR}")57    print(f"train={NUM_TRAIN}  test={NUM_TEST}  seed={SEED}  n={N}")58 59    rng = random.Random(SEED)60    train = mod.generate_samples_anchored_global(61        num_samples=NUM_TRAIN,62        n=N,63        k_offset=K_OFFSET,64        pos_const=POS_CONST,65        rng=rng,66    )67    test = mod.generate_samples_anchored_global(68        num_samples=NUM_TEST,69        n=N,70        k_offset=K_OFFSET,71        pos_const=POS_CONST,72        rng=rng,73    )74 75    write_jsonl(OUT_TRAIN, train)76    write_jsonl(OUT_TEST, test)77 78    ok, _, _ = mod.verify_one_sample(79        sample=test[0], n=N, k_offset=K_OFFSET, pos_const=POS_CONST80    )81    status = "SUCCESS" if ok else "FAILED"82    print(f"wrote {OUT_TRAIN}  ({len(train)} rows)")83    print(f"wrote {OUT_TEST}  ({len(test)} rows)")84    print(f"verify first test sample: {status}")85    if not ok:86        raise SystemExit("verification failed")87    print("DONE")88 89 90if __name__ == "__main__":91    main()92