Resumable Kaggle evaluations, sequential SliceGPT LoRA and exported Modal progress
Browse files- README.md +9 -3
- bundle_manifest.json +1 -1
- finetune_runner.py +2 -1
- kaggle_slicegpt_lora.ipynb +3 -2
- portable_eval.zip +2 -2
README.md
CHANGED
|
@@ -46,10 +46,13 @@ changes can still alter floating-point results.
|
|
| 46 |
Existing Modal results/partial responses are available in modal_progress.zip.
|
| 47 |
IMPORT_MODAL_PROGRESS=True imports them into the original BF16/32 profile.
|
| 48 |
They are not reused for FP16/1 evaluations. Saved original pruning models and
|
| 49 |
-
unfinished LoRA recovery files remain preserved.
|
|
|
|
| 50 |
|
| 51 |
Original SliceGPT uploads are pruned baselines. None completed the requested
|
| 52 |
-
sequential LoRA before the budget stop.
|
|
|
|
|
|
|
| 53 |
and enable REQUIRE_FINETUNED_SLICE to enforce post-LoRA evaluation; this guard
|
| 54 |
refuses a baseline without finetune_manifest.json. Baseline SliceGPT scores
|
| 55 |
must not be presented as fine-tuned scores.
|
|
@@ -80,7 +83,10 @@ https://github.com/EleutherAI/lm-evaluation-harness
|
|
| 80 |
https://huggingface.co/docs/accelerate/concept_guides/big_model_inference
|
| 81 |
|
| 82 |
The companion kaggle_slicegpt_lora.ipynb completes the nine unfinished sequential
|
| 83 |
-
fine-tunes using the same diffusion objective and LoRA hyperparameters.
|
|
|
|
|
|
|
|
|
|
| 84 |
one original SliceGPT source per session, use both T4 GPUs or a larger GPU, and
|
| 85 |
keep all weights on GPUs. The trainer refuses CPU/disk training offload.
|
| 86 |
FP16 training is explicitly recorded as a separate precision profile; matching
|
|
|
|
| 46 |
Existing Modal results/partial responses are available in modal_progress.zip.
|
| 47 |
IMPORT_MODAL_PROGRESS=True imports them into the original BF16/32 profile.
|
| 48 |
They are not reused for FP16/1 evaluations. Saved original pruning models and
|
| 49 |
+
unfinished LoRA recovery files remain preserved. This portable runner never starts
|
| 50 |
+
paid Modal compute.
|
| 51 |
|
| 52 |
Original SliceGPT uploads are pruned baselines. None completed the requested
|
| 53 |
+
sequential LoRA before the earlier evaluation budget stop. A separate capped
|
| 54 |
+
fine-tuning campaign resumes those saved states; consult each model page for
|
| 55 |
+
its verified fine-tuned checkpoint link. Select a final fine-tuned repository
|
| 56 |
and enable REQUIRE_FINETUNED_SLICE to enforce post-LoRA evaluation; this guard
|
| 57 |
refuses a baseline without finetune_manifest.json. Baseline SliceGPT scores
|
| 58 |
must not be presented as fine-tuned scores.
|
|
|
|
| 83 |
https://huggingface.co/docs/accelerate/concept_guides/big_model_inference
|
| 84 |
|
| 85 |
The companion kaggle_slicegpt_lora.ipynb completes the nine unfinished sequential
|
| 86 |
+
fine-tunes using the same diffusion objective and LoRA hyperparameters.
|
| 87 |
+
Base checkpoints train sequentially on WikiText-2 → C4 (2048 optimizer steps);
|
| 88 |
+
Instruct checkpoints add Alpaca (3072 steps). Each stage uses 4096 examples,
|
| 89 |
+
2048 tokens, batch size 1 and gradient accumulation 4. Choose
|
| 90 |
one original SliceGPT source per session, use both T4 GPUs or a larger GPU, and
|
| 91 |
keep all weights on GPUs. The trainer refuses CPU/disk training offload.
|
| 92 |
FP16 training is explicitly recorded as a separate precision profile; matching
|
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": "6097ccf56cdc81066d600c7ab7381b210a5b9fddeb553216d3a0e142819bb3f4",
|
| 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"
|
finetune_runner.py
CHANGED
|
@@ -53,7 +53,8 @@ def main():
|
|
| 53 |
cfg.eval.dtype, cfg.eval.device = args.dtype, args.device
|
| 54 |
if args.show_config:
|
| 55 |
print(json.dumps({"finetune_config": asdict(cfg.finetune), "eval_config": asdict(cfg.eval),
|
| 56 |
-
"dataset_revisions": DATASET_REVISIONS
|
|
|
|
| 57 |
return
|
| 58 |
import torch
|
| 59 |
from huggingface_hub import HfApi, hf_hub_download
|
|
|
|
| 53 |
cfg.eval.dtype, cfg.eval.device = args.dtype, args.device
|
| 54 |
if args.show_config:
|
| 55 |
print(json.dumps({"finetune_config": asdict(cfg.finetune), "eval_config": asdict(cfg.eval),
|
| 56 |
+
"dataset_revisions": DATASET_REVISIONS,
|
| 57 |
+
"effective_dataset_order": cfg.finetune.datasets_for_model(args.repo)}, indent=2))
|
| 58 |
return
|
| 59 |
import torch
|
| 60 |
from huggingface_hub import HfApi, hf_hub_download
|
kaggle_slicegpt_lora.ipynb
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
"metadata": {},
|
| 18 |
"source": [
|
| 19 |
"# Sequential SliceGPT LoRA on Kaggle\n",
|
| 20 |
-
"This is the same masked-diffusion LoRA procedure as
|
| 21 |
"\n",
|
| 22 |
"Enable Internet and GPU. On T4 choose both GPUs; the trainer requires all weights on GPUs, with no CPU/disk training offload. FP16 is an explicit precision change; BF16 is available on supporting GPUs. Hyperparameters stay unchanged. Every 50 steps and stage boundary saves optimizer, adapter and RNG state. A session time budget saves and exits so another session can continue.\n"
|
| 23 |
],
|
|
@@ -61,6 +61,7 @@
|
|
| 61 |
" print(i, row[\"repo_id\"])\n",
|
| 62 |
"MODEL_INDEX = 0\n",
|
| 63 |
"REPO = slice_models[MODEL_INDEX][\"repo_id\"]\n",
|
|
|
|
| 64 |
"DTYPE = \"float16\" # Explicit T4 profile; choose bfloat16 for matching supported hardware.\n",
|
| 65 |
"SESSION_HOURS = 8\n",
|
| 66 |
"TRAIN_OUTPUT = WORK_DIR / \"training_results\"\n",
|
|
@@ -90,7 +91,7 @@
|
|
| 90 |
" from getpass import getpass\n",
|
| 91 |
" os.environ[\"HF_TOKEN\"] = getpass(\"Hugging Face write token: \")\n",
|
| 92 |
"TRAIN = [sys.executable, str(EVAL_ROOT / \"finetune_runner.py\"),\n",
|
| 93 |
-
" \"--repo\", REPO, \"--dtype\", DTYPE, \"--output\", str(TRAIN_OUTPUT),\n",
|
| 94 |
" \"--cache-dir\", str(TEMP_DIR / \"structured_training_hf\"),\n",
|
| 95 |
" \"--offload-dir\", str(TEMP_DIR / \"structured_training_offload\"),\n",
|
| 96 |
" \"--time-budget-seconds\", str(SESSION_HOURS * 3600), \"--namespace\", HF_NAMESPACE]\n",
|
|
|
|
| 17 |
"metadata": {},
|
| 18 |
"source": [
|
| 19 |
"# Sequential SliceGPT LoRA on Kaggle\n",
|
| 20 |
+
"This is the same masked-diffusion LoRA procedure as Modal training: one adapter and pinned training datasets. Base models use WikiText-2 \u2192 C4 (2048 optimizer steps). Instruct models use WikiText-2 \u2192 C4 \u2192 Alpaca (3072 steps). All use rank 8/alpha 32, 4096 examples per stage, 2048 tokens and accumulation 4. The setup cell prints the effective dataset order and full shared configuration.\n",
|
| 21 |
"\n",
|
| 22 |
"Enable Internet and GPU. On T4 choose both GPUs; the trainer requires all weights on GPUs, with no CPU/disk training offload. FP16 is an explicit precision change; BF16 is available on supporting GPUs. Hyperparameters stay unchanged. Every 50 steps and stage boundary saves optimizer, adapter and RNG state. A session time budget saves and exits so another session can continue.\n"
|
| 23 |
],
|
|
|
|
| 61 |
" print(i, row[\"repo_id\"])\n",
|
| 62 |
"MODEL_INDEX = 0\n",
|
| 63 |
"REPO = slice_models[MODEL_INDEX][\"repo_id\"]\n",
|
| 64 |
+
"REVISION = slice_models[MODEL_INDEX][\"revision\"] # Stable source SHA for exact resume.\n",
|
| 65 |
"DTYPE = \"float16\" # Explicit T4 profile; choose bfloat16 for matching supported hardware.\n",
|
| 66 |
"SESSION_HOURS = 8\n",
|
| 67 |
"TRAIN_OUTPUT = WORK_DIR / \"training_results\"\n",
|
|
|
|
| 91 |
" from getpass import getpass\n",
|
| 92 |
" os.environ[\"HF_TOKEN\"] = getpass(\"Hugging Face write token: \")\n",
|
| 93 |
"TRAIN = [sys.executable, str(EVAL_ROOT / \"finetune_runner.py\"),\n",
|
| 94 |
+
" \"--repo\", REPO, \"--revision\", REVISION, \"--dtype\", DTYPE, \"--output\", str(TRAIN_OUTPUT),\n",
|
| 95 |
" \"--cache-dir\", str(TEMP_DIR / \"structured_training_hf\"),\n",
|
| 96 |
" \"--offload-dir\", str(TEMP_DIR / \"structured_training_offload\"),\n",
|
| 97 |
" \"--time-budget-seconds\", str(SESSION_HOURS * 3600), \"--namespace\", HF_NAMESPACE]\n",
|
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:6097ccf56cdc81066d600c7ab7381b210a5b9fddeb553216d3a0e142819bb3f4
|
| 3 |
+
size 67178
|