Spaces:
Sleeping
Sleeping
File size: 2,491 Bytes
dbc6675 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | """
Centralized experiment configuration for multi-tokenization comparison.
Defines tokenizer parameters, model hyperparameters, domains, and splits.
"""
DOMAINS = ["blocks", "gripper", "logistics", "visitall-from-everywhere"]
SPLITS_EVAL = ["validation", "test-interpolation", "test-extrapolation"]
SPLITS_ALL = ["train"] + SPLITS_EVAL
TOKENIZATION_CONFIGS = {
"wl": {
"module": "code.tokenization.wl",
"class": "WLTokenizer",
"params": {"iterations": 2},
"description": "Weisfeiler-Leman (k=2) color refinement",
"encoding_dir": "graphs", # Maps to existing data/encodings/graphs
},
"simhash": {
"module": "code.tokenization.simhash",
"class": "SimHashTokenizer",
"params": {"hash_dim": 128, "seed": 42},
"description": "Random projection hashing (SimHash)",
"encoding_dir": "simhash",
},
"shortest_path": {
"module": "code.tokenization.shortest_path",
"class": "ShortestPathTokenizer",
"params": {"max_path_length": 5},
"description": "Shortest-path kernel features",
"encoding_dir": "shortest_path",
},
"graphbpe": {
"module": "code.tokenization.graphbpe",
"class": "GraphBPETokenizer",
"params": {"vocab_size": 1000, "num_iterations": 100},
"description": "Byte-pair encoding on graph structures",
"encoding_dir": "graphbpe",
},
"random": {
"module": "code.tokenization.random",
"class": "RandomTokenizer",
"params": {"random_dim": 128, "seed": 42},
"description": "Deterministic random baseline embeddings",
"encoding_dir": "random",
},
}
MODEL_CONFIGS = {
"lstm": {
"state_mode": {
"hidden_dim": 256,
"epochs": 500,
"batch_size": 32,
"lr": 1e-2,
"no_projection": False,
},
"delta_mode": {
"hidden_dim": 256,
"epochs": 500,
"batch_size": 32,
"lr": 1e-2,
"no_projection": False,
},
},
"xgboost": {
"state_mode": {
"n_estimators": 1000,
"max_depth": 8,
"lr": 0.1,
"early_stopping": 10,
},
"delta_mode": {
"n_estimators": 1000,
"max_depth": 8,
"lr": 0.1,
"early_stopping": 10,
},
},
}
SEED = 13
|