Resumable Kaggle evaluations, sequential SliceGPT LoRA and exported Modal progress
Browse files- bundle_manifest.json +1 -1
- portable_eval.zip +2 -2
- runner.py +18 -2
bundle_manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"run_id": "run-9fc515e82f313fab",
|
| 3 |
-
"zip_sha256": "
|
| 4 |
"available_checkpoints": 27,
|
| 5 |
"shared_config": "Pruning-LLMs/diffusion_eval_and_vis/config.py",
|
| 6 |
"smoke_tests": "All three methods on tiny LLaDA/Dream: likelihood, generation, CPU/disk and CUDA fp16 offload, reload agreement; task sharding and merging"
|
|
|
|
| 1 |
{
|
| 2 |
"run_id": "run-9fc515e82f313fab",
|
| 3 |
+
"zip_sha256": "82fdf10cfeb55bca25aaf0a1dd2545289f0cd83c73ebd8cf383e837ef153a7d5",
|
| 4 |
"available_checkpoints": 27,
|
| 5 |
"shared_config": "Pruning-LLMs/diffusion_eval_and_vis/config.py",
|
| 6 |
"smoke_tests": "All three methods on tiny LLaDA/Dream: likelihood, generation, CPU/disk and CUDA fp16 offload, reload agreement; task sharding and merging"
|
portable_eval.zip
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82fdf10cfeb55bca25aaf0a1dd2545289f0cd83c73ebd8cf383e837ef153a7d5
|
| 3 |
+
size 73519
|
runner.py
CHANGED
|
@@ -11,12 +11,23 @@ import random
|
|
| 11 |
import sys
|
| 12 |
import time
|
| 13 |
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 14 |
-
from diffusion_eval_and_vis.config import DiffusionEvalConfig
|
| 15 |
|
| 16 |
DEFAULT_RUN = "9fc515e82f313fab"
|
| 17 |
DEFAULT_OWNER = "vanshnawander"
|
| 18 |
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
def write_json(path, value):
|
| 21 |
path = Path(path)
|
| 22 |
path.parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -56,8 +67,13 @@ def discover(owner=DEFAULT_OWNER, run=DEFAULT_RUN):
|
|
| 56 |
from huggingface_hub import HfApi
|
| 57 |
api = HfApi(token=os.environ.get("HF_TOKEN", False))
|
| 58 |
ready = []
|
|
|
|
|
|
|
|
|
|
| 59 |
for model in api.list_models(author=owner):
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
continue
|
| 62 |
info = api.model_info(model.id)
|
| 63 |
names = {entry.rfilename for entry in info.siblings}
|
|
|
|
| 11 |
import sys
|
| 12 |
import time
|
| 13 |
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 14 |
+
from diffusion_eval_and_vis.config import DiffusionEvalConfig, StructuredPruningConfig
|
| 15 |
|
| 16 |
DEFAULT_RUN = "9fc515e82f313fab"
|
| 17 |
DEFAULT_OWNER = "vanshnawander"
|
| 18 |
|
| 19 |
|
| 20 |
+
def pruned_repo_id(owner, model, method, sparsity):
|
| 21 |
+
label = {
|
| 22 |
+
"GSAI-ML/LLaDA-8B-Instruct": "LLaDA-8B-Instruct",
|
| 23 |
+
"GSAI-ML/LLaDA-8B-Base": "LLaDA-8B-Base",
|
| 24 |
+
"Dream-org/Dream-v0-Base-7B": "Dream-v0-Base-7B",
|
| 25 |
+
}[model]
|
| 26 |
+
method_label = {"sparsegpt": "SparseGPT", "sink_aware": "SinkAware",
|
| 27 |
+
"slicegpt": "SliceGPT"}[method]
|
| 28 |
+
return f"{owner}/{label}-{method_label}-{round(sparsity * 100)}"
|
| 29 |
+
|
| 30 |
+
|
| 31 |
def write_json(path, value):
|
| 32 |
path = Path(path)
|
| 33 |
path.parent.mkdir(parents=True, exist_ok=True)
|
|
|
|
| 67 |
from huggingface_hub import HfApi
|
| 68 |
api = HfApi(token=os.environ.get("HF_TOKEN", False))
|
| 69 |
ready = []
|
| 70 |
+
cfg = StructuredPruningConfig()
|
| 71 |
+
clean = {pruned_repo_id(owner, model, method, sparsity)
|
| 72 |
+
for model in cfg.models for method in cfg.methods for sparsity in cfg.sparsities}
|
| 73 |
for model in api.list_models(author=owner):
|
| 74 |
+
legacy = (model.id.startswith(owner + "/structured-") and
|
| 75 |
+
model.id.endswith("-" + run) and "-lora-" not in model.id)
|
| 76 |
+
if model.id not in clean and not legacy:
|
| 77 |
continue
|
| 78 |
info = api.model_info(model.id)
|
| 79 |
names = {entry.rfilename for entry in info.siblings}
|