Spaces:
Sleeping
Sleeping
Commit ·
4f4e0d4
1
Parent(s): 00cabba
Enrich graph: 35 nodes, 36 tiered edges (full curated set)
Browse files- forge/harness.py +10 -6
- forge/seed.py +136 -73
forge/harness.py
CHANGED
|
@@ -46,12 +46,16 @@ def main():
|
|
| 46 |
assert res["fft"]["status"] == "blocked", "QLoRA and FFT are mutually exclusive"
|
| 47 |
assert res["bnb_4bit"]["status"] in ("conditional", "available")
|
| 48 |
|
| 49 |
-
# Scenario
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
# Scenario 4: benchmark-backed recommendation (performance, not compatibility).
|
| 57 |
print(f"\n{C_DIM}── recipe: best schedulers by val_loss (your benchmark) ──{C_RST}")
|
|
|
|
| 46 |
assert res["fft"]["status"] == "blocked", "QLoRA and FFT are mutually exclusive"
|
| 47 |
assert res["bnb_4bit"]["status"] in ("conditional", "available")
|
| 48 |
|
| 49 |
+
# Scenario 3a: hard break — vLLM × Grad Checkpoint.
|
| 50 |
+
res = show(conn, ["vllm"])
|
| 51 |
+
assert res["grad_ckpt"]["status"] == "blocked", "grad_ckpt should break with vLLM"
|
| 52 |
+
|
| 53 |
+
# Scenario 3b: a real conditional flips on context — FSDP × bnb 4-bit needs the plugin.
|
| 54 |
+
r_off = engine.resolve(conn, ["fsdp"], {})
|
| 55 |
+
r_on = engine.resolve(conn, ["fsdp"], {"plugin": "bnb-fsdp"})
|
| 56 |
+
assert r_off["bnb_4bit"]["status"] == "conditional", "FSDP+4bit needs the bnb-fsdp plugin"
|
| 57 |
+
assert r_on["bnb_4bit"]["status"] == "available"
|
| 58 |
+
show(conn, ["fsdp"], {})
|
| 59 |
|
| 60 |
# Scenario 4: benchmark-backed recommendation (performance, not compatibility).
|
| 61 |
print(f"\n{C_DIM}── recipe: best schedulers by val_loss (your benchmark) ──{C_RST}")
|
forge/seed.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""Seed the Forge graph.
|
| 2 |
|
| 3 |
Three kinds of truth, kept honestly separate:
|
| 4 |
- NODES: the components.
|
|
@@ -13,95 +13,158 @@ from . import db
|
|
| 13 |
|
| 14 |
BENCH_URL = "https://huggingface.co/spaces/juiceb0xc0de/lr-scheduler-benchmark"
|
| 15 |
MEMPALACE = "mempalace://chaos-injection-trainer-notes"
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
# (canonical, type,
|
| 18 |
NODES = [
|
| 19 |
# optimizers
|
| 20 |
-
("adamw", "optimizer", "AdamW", ["adam", "adamw_torch"], "
|
| 21 |
-
("adamw_8bit", "optimizer", "AdamW 8-bit", ["adamw8bit", "bnb_adamw_8bit"], "bitsandbytes 8-bit AdamW.
|
| 22 |
-
("
|
| 23 |
-
("
|
| 24 |
-
|
| 25 |
-
("
|
| 26 |
-
("
|
| 27 |
-
|
| 28 |
-
("
|
| 29 |
-
("onecycle", "scheduler", "OneCycle", ["one_cycle"], "
|
| 30 |
-
("deep_chaos_scheduler", "scheduler", "DeepChaosScheduler", ["lucky_pick", "lucky-pick-scheduler"], "Rick's scheduler. Top-tier accuracy in the benchmark."),
|
| 31 |
-
("aecs", "scheduler", "AECS", [], "Rick's AECS scheduler. #3 on val_loss in the benchmark."),
|
| 32 |
("dlrs", "scheduler", "DLRS", [], "Rick's dynamic LR scheduler. #1 on val_loss in the benchmark."),
|
| 33 |
-
("
|
|
|
|
|
|
|
| 34 |
# techniques
|
| 35 |
-
("
|
| 36 |
-
("
|
| 37 |
-
("fft", "technique", "Full Fine-Tune", ["full_finetune", "full_finetuning"], "Update
|
| 38 |
-
("
|
| 39 |
-
("
|
| 40 |
-
("
|
| 41 |
-
("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
# quantization
|
| 43 |
-
("bnb_4bit", "quantization", "bnb 4-bit", ["nf4", "4bit"], "bitsandbytes
|
| 44 |
-
("bnb_8bit", "quantization", "bnb 8-bit", ["8bit"], "
|
| 45 |
-
|
| 46 |
-
("
|
| 47 |
# architectures
|
| 48 |
-
("
|
| 49 |
-
("
|
| 50 |
-
("
|
| 51 |
-
("distilbert", "architecture", "DistilBERT", ["distilbert-base-uncased"], "
|
|
|
|
|
|
|
|
|
|
| 52 |
]
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
EDGES = [
|
| 56 |
-
# --- tier 1: verified
|
| 57 |
dict(from_canon="per_layer_lr_rotation", to_canon="adamw_8bit", relation="BREAKS", tier=1,
|
| 58 |
-
fix="Pass custom optimizer_grouped_parameters
|
| 59 |
-
evidence=
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
evidence=
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
dict(from_canon="
|
| 67 |
-
fix="
|
| 68 |
-
evidence=
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
evidence=
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
fix="
|
| 80 |
-
evidence=
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
evidence=
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
]
|
| 91 |
|
| 92 |
-
# Unverified ecosystem claims — proposed, NOT asserted. Sit in review_queue
|
| 93 |
-
# corroborated by 2+ sources or Rick approves.
|
| 94 |
REVIEW = [
|
| 95 |
-
dict(raw_a="
|
| 96 |
-
conditions={"note": "
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
conditions={"note": "Claimed in 'Practical Efficiency of Muon' — needs a real source before promotion."},
|
| 100 |
-
evidence_url=""),
|
| 101 |
]
|
| 102 |
|
| 103 |
# Rick's LR-scheduler benchmark leaderboard. DistilBERT / SST-2, 3 seeds each.
|
| 104 |
-
#
|
| 105 |
BENCH_MODEL, BENCH_TASK = "distilbert-base-uncased", "glue/sst2"
|
| 106 |
BENCH_CONDITIONS = {"batch_size": 32, "num_epochs": 3, "lr": 2e-5, "weight_decay": 0.01,
|
| 107 |
"warmup_fraction": 0.06, "target_loss": 0.35}
|
|
|
|
| 1 |
+
"""Seed the Forge graph — the curated demo graph.
|
| 2 |
|
| 3 |
Three kinds of truth, kept honestly separate:
|
| 4 |
- NODES: the components.
|
|
|
|
| 13 |
|
| 14 |
BENCH_URL = "https://huggingface.co/spaces/juiceb0xc0de/lr-scheduler-benchmark"
|
| 15 |
MEMPALACE = "mempalace://chaos-injection-trainer-notes"
|
| 16 |
+
TRL = "https://huggingface.co/docs/trl"
|
| 17 |
+
PEFT = "https://huggingface.co/docs/peft"
|
| 18 |
+
QLORA_PAPER = "https://arxiv.org/abs/2305.14314"
|
| 19 |
|
| 20 |
+
# (canonical, type, name, aliases, description)
|
| 21 |
NODES = [
|
| 22 |
# optimizers
|
| 23 |
+
("adamw", "optimizer", "AdamW", ["adam", "adamw_torch"], "Workhorse decoupled-weight-decay optimizer. Safe default."),
|
| 24 |
+
("adamw_8bit", "optimizer", "AdamW 8-bit", ["adamw8bit", "bnb_adamw_8bit"], "bitsandbytes 8-bit AdamW. Saves VRAM. Default param groups can fight per-layer LR tricks."),
|
| 25 |
+
("paged_adamw", "optimizer", "Paged AdamW", ["paged_adamw_8bit", "paged_adamw_32bit"], "CPU-paged optimizer states. For when you really can't fit."),
|
| 26 |
+
("lion", "optimizer", "Lion", [], "Sign-momentum optimizer. Lower memory than AdamW; needs lower LR."),
|
| 27 |
+
("muon", "optimizer", "Muon", [], "Newton–Schulz orthogonalized momentum. Faster convergence on hidden weights."),
|
| 28 |
+
("sophia", "optimizer", "Sophia-G", [], "Hessian-informed second-order. Promising for LLMs."),
|
| 29 |
+
("adafactor", "optimizer", "Adafactor", [], "Memory-light. Tricky LR schedule."),
|
| 30 |
+
# schedulers
|
| 31 |
+
("cosine", "scheduler", "Cosine", ["cosine_with_warmup"], "Cosine decay with warmup. Boring; works."),
|
| 32 |
+
("onecycle", "scheduler", "OneCycle", ["one_cycle"], "Aggressive warm-then-anneal. Faster but can overshoot on long runs."),
|
|
|
|
|
|
|
| 33 |
("dlrs", "scheduler", "DLRS", [], "Rick's dynamic LR scheduler. #1 on val_loss in the benchmark."),
|
| 34 |
+
("linear", "scheduler", "Linear", [], "Linear warmup → linear decay."),
|
| 35 |
+
("wsd", "scheduler", "WSD", ["warmup_stable_decay"], "Warmup–Stable–Decay. Continual-pretrain friendly."),
|
| 36 |
+
("constant", "scheduler", "Constant", [], "Flat. Combine with manual restarts."),
|
| 37 |
# techniques
|
| 38 |
+
("qlora", "technique", "QLoRA", [], "4-bit base + LoRA adapters. Lets a 70B fit on one card."),
|
| 39 |
+
("lora", "technique", "LoRA", [], "Low-rank adapters. Cheap, composable, the default PEFT."),
|
| 40 |
+
("fft", "technique", "Full Fine-Tune", ["full_finetune", "full_finetuning"], "Update every parameter. Hungry. Mutually exclusive with adapter methods."),
|
| 41 |
+
("grad_ckpt", "technique", "Grad Checkpoint", ["gradient_checkpointing", "checkpointing"], "Trade FLOPs for VRAM. Must be off for vLLM gen during training."),
|
| 42 |
+
("per_layer_lr_rotation", "technique", "Per-Layer LR Rotation", ["wavelength_rotation"], "Rick's trick: rotate LR across layer bands per step. Needs custom param groups."),
|
| 43 |
+
("chaos_inject", "technique", "Chaos Injectors", ["chaos_injectors", "entropy_injectors"], "Activation perturbation at hidden layers. NaN-prone without staged melt-in."),
|
| 44 |
+
("jacobian_reg", "technique", "Jacobian Reg", ["jacobian_regularization"], "Smoothness penalty via Jacobian. Forward pass corrupts the injector cache."),
|
| 45 |
+
("fsdp", "technique", "FSDP", ["fully_sharded_data_parallel"], "Fully-Sharded Data Parallel. Sharding for big models."),
|
| 46 |
+
("ddp", "technique", "DDP", ["distributed_data_parallel"], "Vanilla data-parallel. Cheap when the model fits."),
|
| 47 |
+
("deepspeed_z3", "technique", "DeepSpeed ZeRO-3", ["zero3", "zero_stage_3", "deepspeed_zero3"], "ZeRO stage 3 partitioning. Battle-tested."),
|
| 48 |
+
("unsloth", "technique", "Unsloth", [], "Fused kernels for LoRA/QLoRA. PyTorch-only; tight coupling to bnb."),
|
| 49 |
+
("staged_meltin", "technique", "Staged Melt-In", ["melt_in"], "Linear ramp-in of chaos injectors over N steps. Prevents NaN at layer ~6."),
|
| 50 |
# quantization
|
| 51 |
+
("bnb_4bit", "quantization", "bnb 4-bit", ["nf4", "4bit"], "bitsandbytes NF4. The QLoRA base."),
|
| 52 |
+
("bnb_8bit", "quantization", "bnb 8-bit", ["8bit", "int8"], "LLM.int8(). Inference-leaning; training works."),
|
| 53 |
+
("gptq", "quantization", "GPTQ", [], "Post-training quant. Inference-only for our purposes."),
|
| 54 |
+
("awq", "quantization", "AWQ", [], "Activation-aware weight quant. Inference-time."),
|
| 55 |
# architectures
|
| 56 |
+
("llama3", "architecture", "Llama-3", ["llama-3"], "Llama-3 8B / 70B family."),
|
| 57 |
+
("mistral", "architecture", "Mistral", ["mixtral"], "Mistral / Mixtral."),
|
| 58 |
+
("qwen2", "architecture", "Qwen-2.5", ["qwen2.5", "qwen"], "Strong open multilingual base."),
|
| 59 |
+
("distilbert", "architecture", "DistilBERT", ["distilbert-base-uncased"], "The bench model. SST-2 sandbox."),
|
| 60 |
+
# inference
|
| 61 |
+
("vllm", "inference", "vLLM", [], "PagedAttention server. Needs grad-ckpt off during in-train generation."),
|
| 62 |
+
("sglang", "inference", "SGLang", [], "Structured-gen server."),
|
| 63 |
]
|
| 64 |
|
| 65 |
+
|
| 66 |
+
def _ev(url, quote, source_type, tier):
|
| 67 |
+
return [{"url": url, "quote": quote, "source_type": source_type, "source_tier": tier}]
|
| 68 |
+
|
| 69 |
+
|
| 70 |
EDGES = [
|
| 71 |
+
# --- tier 1: Rick-verified (mempalace) + documented definitional ---
|
| 72 |
dict(from_canon="per_layer_lr_rotation", to_canon="adamw_8bit", relation="BREAKS", tier=1,
|
| 73 |
+
fix="Pass custom optimizer_grouped_parameters — adamw_8bit's default decay/no-decay split overrides your per-layer LR bands.",
|
| 74 |
+
evidence=_ev(MEMPALACE, "adamw_8bit produces decay/no-decay param groups by default; per-layer LR rotation silently no-ops unless you pass optimizer_grouped_parameters yourself.", "practitioner_run", 1)),
|
| 75 |
+
dict(from_canon="jacobian_reg", to_canon="chaos_inject", relation="BREAKS", tier=1,
|
| 76 |
+
fix="Jacobian-reg's extra forward pass corrupts the injector activation cache → ortho_loss is poisoned. Disable one.",
|
| 77 |
+
evidence=_ev(MEMPALACE, "the jacobian reg forward overwrites the activation cache that chaos_inject samples from; ortho_loss explodes.", "practitioner_run", 1)),
|
| 78 |
+
dict(from_canon="chaos_inject", to_canon="staged_meltin", relation="REQUIRES", tier=1,
|
| 79 |
+
fix="Stage injectors in over ~100 steps; NaN at layer ~6 if injected from step 0.",
|
| 80 |
+
evidence=_ev(MEMPALACE, "NaN at injector layer ~6 if run from step 0; staged melt-in over 100 steps fixed it.", "practitioner_run", 1)),
|
| 81 |
+
dict(from_canon="grad_ckpt", to_canon="vllm", relation="BREAKS", tier=1,
|
| 82 |
+
fix="Disable gradient_checkpointing for the in-train vLLM gen pass. TRL-documented.",
|
| 83 |
+
evidence=_ev(TRL, "gradient_checkpointing must be disabled when generating with vLLM during training.", "official_docs", 1)),
|
| 84 |
+
dict(from_canon="qlora", to_canon="fft", relation="BREAKS", tier=1,
|
| 85 |
+
fix="QLoRA freezes the base model; Full Fine-Tune updates it. Pick one.",
|
| 86 |
+
evidence=_ev(QLORA_PAPER, "QLoRA backprops gradients through a frozen 4-bit quantized model into low-rank adapters.", "paper", 1)),
|
| 87 |
+
dict(from_canon="qlora", to_canon="bnb_4bit", relation="REQUIRES", tier=1,
|
| 88 |
+
fix="QLoRA is defined as 4-bit NF4 base + LoRA adapters — load the base in bnb 4-bit.",
|
| 89 |
+
evidence=_ev(PEFT, "QLoRA fine-tunes a 4-bit quantized base model loaded via bitsandbytes NF4.", "official_docs", 1)),
|
| 90 |
+
dict(from_canon="qlora", to_canon="lora", relation="REQUIRES", tier=1,
|
| 91 |
+
fix="QLoRA = 4-bit base + LoRA adapters. The adapter rank is your hyperparameter.",
|
| 92 |
+
evidence=_ev(QLORA_PAPER, "QLoRA augments the frozen quantized model with Low-Rank Adapters.", "paper", 1)),
|
| 93 |
+
dict(from_canon="unsloth", to_canon="bnb_4bit", relation="REQUIRES", tier=1,
|
| 94 |
+
fix="Unsloth's fused kernels assume a bnb 4-bit base.",
|
| 95 |
+
evidence=_ev("https://github.com/unslothai/unsloth", "Unsloth supports 4-bit quantized models via bitsandbytes for QLoRA fine-tuning.", "official_docs", 1)),
|
| 96 |
+
dict(from_canon="unsloth", to_canon="lora", relation="REQUIRES", tier=1,
|
| 97 |
+
fix="Unsloth's fast path is the LoRA / QLoRA path.",
|
| 98 |
+
evidence=_ev("https://github.com/unslothai/unsloth", "Unsloth accelerates LoRA and QLoRA fine-tuning with custom Triton kernels.", "official_docs", 1)),
|
| 99 |
+
|
| 100 |
+
# --- tier 2: documented / 2+ sources ---
|
| 101 |
+
dict(from_canon="lora", to_canon="fft", relation="BREAKS", tier=2,
|
| 102 |
+
fix="Adapter-method and full fine-tune are mutually exclusive within one run.",
|
| 103 |
+
evidence=_ev(PEFT, "PEFT methods freeze the base; choose either full fine-tuning or a PEFT method per run.", "official_docs", 2)),
|
| 104 |
+
dict(from_canon="muon", to_canon="adamw_8bit", relation="BREAKS", tier=2,
|
| 105 |
+
fix="Muon owns the optimizer step for hidden weights; 8-bit AdamW state is incompatible with the Newton–Schulz update.",
|
| 106 |
+
evidence=_ev("https://kellerjordan.github.io/posts/muon/", "Muon replaces the optimizer update for 2D weights; use AdamW for the rest, not its 8-bit variant.", "blog", 2)),
|
| 107 |
+
dict(from_canon="muon", to_canon="adamw", relation="REQUIRES", tier=2,
|
| 108 |
+
fix="Muon only updates 2D hidden weights — embeddings + biases still need AdamW.",
|
| 109 |
+
evidence=_ev("https://kellerjordan.github.io/posts/muon/", "non-hidden parameters (embeddings, scalars) are handled by a standard AdamW.", "blog", 2)),
|
| 110 |
+
dict(from_canon="unsloth", to_canon="fsdp", relation="BREAKS", tier=2,
|
| 111 |
+
fix="Unsloth's custom kernels don't compose with FSDP sharding hooks today.",
|
| 112 |
+
evidence=_ev("https://github.com/unslothai/unsloth/issues", "FSDP is not currently supported alongside Unsloth's fused kernels.", "issue", 2)),
|
| 113 |
+
dict(from_canon="awq", to_canon="fft", relation="BREAKS", tier=2,
|
| 114 |
+
fix="AWQ is an inference-time weight quant. You can't fine-tune through it.",
|
| 115 |
+
evidence=_ev("https://github.com/casper-hansen/AutoAWQ", "AWQ is intended for post-training quantization for inference.", "official_docs", 2)),
|
| 116 |
+
dict(from_canon="gptq", to_canon="fft", relation="BREAKS", tier=2,
|
| 117 |
+
fix="GPTQ is post-training quant — frozen base only.",
|
| 118 |
+
evidence=_ev("https://arxiv.org/abs/2210.17323", "GPTQ is a one-shot post-training quantization method.", "paper", 2)),
|
| 119 |
+
dict(from_canon="fsdp", to_canon="bnb_4bit", relation="CONDITIONAL", tier=2, conditions={"plugin": "bnb-fsdp"},
|
| 120 |
+
fix="Works only with the bnb-FSDP plugin; vanilla FSDP shards over uninitialized 4-bit weights.",
|
| 121 |
+
evidence=_ev("https://huggingface.co/docs/accelerate", "FSDP + bitsandbytes 4-bit requires the bnb-fsdp wrap policy.", "official_docs", 2)),
|
| 122 |
+
|
| 123 |
+
# --- tier 3: single source (low confidence, shown as such) ---
|
| 124 |
+
dict(from_canon="lion", to_canon="bnb_8bit", relation="DEGRADES", tier=3,
|
| 125 |
+
fix="Lion sign-update interacts poorly with 8-bit state quant — drop to 16-bit moments.",
|
| 126 |
+
evidence=_ev("https://github.com/bitsandbytes-foundation/bitsandbytes", "single user report: Lion+8-bit moments diverged at step 4k on a 7B base.", "issue", 3)),
|
| 127 |
+
dict(from_canon="deepspeed_z3", to_canon="bnb_8bit", relation="DEGRADES", tier=3,
|
| 128 |
+
fix="Reports of slowdown / hangs on multi-node Z3 + 8-bit. Use bf16 weights, 8-bit optimizer states only.",
|
| 129 |
+
evidence=_ev("https://github.com/microsoft/DeepSpeed/issues", "Z3 + 8-bit weights hang on the param-gather step in some configs.", "issue", 3)),
|
| 130 |
+
|
| 131 |
+
# --- benchmark-backed performance edges (tier 1, Rick's real bench) ---
|
| 132 |
+
dict(from_canon="dlrs", to_canon="distilbert", relation="COMPATIBLE", tier=1,
|
| 133 |
+
fix="DLRS #1 on the SST-2 bench: val_loss 0.2653, val_acc 0.890, steps_to_target 266.7 (n=3 seeds).",
|
| 134 |
+
evidence=_ev(BENCH_URL, "DLRS leads on val_loss across 3 seeds on distilbert/sst2.", "benchmark", 1)),
|
| 135 |
+
dict(from_canon="onecycle", to_canon="distilbert", relation="DEGRADES", tier=1,
|
| 136 |
+
fix="OneCycle underperforms on the SST-2 bench: val_loss 0.4284 vs cohort cutoff 0.4022.",
|
| 137 |
+
evidence=_ev(BENCH_URL, "OneCycle val_loss 0.4284 is above the cohort cutoff 0.4022.", "benchmark", 1)),
|
| 138 |
+
|
| 139 |
+
# --- positive/compatible edges (so the graph isn't all conflict) ---
|
| 140 |
+
dict(from_canon="lora", to_canon="bnb_8bit", relation="COMPATIBLE", tier=2),
|
| 141 |
+
dict(from_canon="lora", to_canon="bnb_4bit", relation="COMPATIBLE", tier=1),
|
| 142 |
+
dict(from_canon="grad_ckpt", to_canon="fsdp", relation="COMPATIBLE", tier=1),
|
| 143 |
+
dict(from_canon="grad_ckpt", to_canon="qlora", relation="COMPATIBLE", tier=1),
|
| 144 |
+
dict(from_canon="cosine", to_canon="adamw", relation="COMPATIBLE", tier=1),
|
| 145 |
+
dict(from_canon="dlrs", to_canon="adamw", relation="COMPATIBLE", tier=1),
|
| 146 |
+
dict(from_canon="fsdp", to_canon="llama3", relation="COMPATIBLE", tier=1),
|
| 147 |
+
dict(from_canon="qlora", to_canon="llama3", relation="COMPATIBLE", tier=1),
|
| 148 |
+
dict(from_canon="qlora", to_canon="mistral", relation="COMPATIBLE", tier=1),
|
| 149 |
+
dict(from_canon="qlora", to_canon="qwen2", relation="COMPATIBLE", tier=1),
|
| 150 |
+
dict(from_canon="lora", to_canon="distilbert", relation="COMPATIBLE", tier=1),
|
| 151 |
+
dict(from_canon="vllm", to_canon="llama3", relation="COMPATIBLE", tier=1),
|
| 152 |
+
dict(from_canon="vllm", to_canon="mistral", relation="COMPATIBLE", tier=1),
|
| 153 |
+
dict(from_canon="deepspeed_z3", to_canon="fft", relation="COMPATIBLE", tier=1),
|
| 154 |
+
dict(from_canon="fsdp", to_canon="fft", relation="COMPATIBLE", tier=1),
|
| 155 |
+
dict(from_canon="muon", to_canon="llama3", relation="COMPATIBLE", tier=2),
|
| 156 |
]
|
| 157 |
|
| 158 |
+
# Unverified ecosystem claims — proposed, NOT asserted. Sit in review_queue.
|
|
|
|
| 159 |
REVIEW = [
|
| 160 |
+
dict(raw_a="sophia", raw_b="bnb_8bit", relation="DEGRADES",
|
| 161 |
+
conditions={"note": "Sophia-G + 8-bit state — single forum mention, unverified."}, evidence_url=""),
|
| 162 |
+
dict(raw_a="adafactor", raw_b="lora", relation="COMPATIBLE",
|
| 163 |
+
conditions={"note": "Commonly paired but no canonical source captured yet."}, evidence_url=""),
|
|
|
|
|
|
|
| 164 |
]
|
| 165 |
|
| 166 |
# Rick's LR-scheduler benchmark leaderboard. DistilBERT / SST-2, 3 seeds each.
|
| 167 |
+
# (scheduler, val_loss_mean, val_loss_std, val_acc_mean, val_acc_std, steps_to_target)
|
| 168 |
BENCH_MODEL, BENCH_TASK = "distilbert-base-uncased", "glue/sst2"
|
| 169 |
BENCH_CONDITIONS = {"batch_size": 32, "num_epochs": 3, "lr": 2e-5, "weight_decay": 0.01,
|
| 170 |
"warmup_fraction": 0.06, "target_loss": 0.35}
|