Upload train_cascade_1b.py with huggingface_hub
Browse files- train_cascade_1b.py +3 -0
train_cascade_1b.py
CHANGED
|
@@ -63,6 +63,7 @@ def arguments() -> argparse.Namespace:
|
|
| 63 |
p.add_argument("--validation-batches", type=int, default=4)
|
| 64 |
p.add_argument("--seed", type=int, default=3407)
|
| 65 |
p.add_argument("--compile", action="store_true")
|
|
|
|
| 66 |
p.add_argument("--resume", action="store_true")
|
| 67 |
p.add_argument("--probe-only", action="store_true")
|
| 68 |
p.add_argument("--probe-batches", default="64,96,128,160,192,224,256")
|
|
@@ -420,6 +421,8 @@ def train(args: argparse.Namespace) -> None:
|
|
| 420 |
optimizers = Optimizers(model, args)
|
| 421 |
initial_validation = evaluate(model, validation, config.route_paths)
|
| 422 |
print(json.dumps({"parameters": counts, "threshold": threshold, "initial_validation": initial_validation, "sources": packer.documents}), flush=True)
|
|
|
|
|
|
|
| 423 |
compiled = torch.compile(model, mode="max-autotune-no-cudagraphs") if args.compile else model
|
| 424 |
history = args.output / "training.jsonl"
|
| 425 |
tokens = start_step * args.batch_size * args.sequence_length
|
|
|
|
| 63 |
p.add_argument("--validation-batches", type=int, default=4)
|
| 64 |
p.add_argument("--seed", type=int, default=3407)
|
| 65 |
p.add_argument("--compile", action="store_true")
|
| 66 |
+
p.add_argument("--compile-blocks", action="store_true")
|
| 67 |
p.add_argument("--resume", action="store_true")
|
| 68 |
p.add_argument("--probe-only", action="store_true")
|
| 69 |
p.add_argument("--probe-batches", default="64,96,128,160,192,224,256")
|
|
|
|
| 421 |
optimizers = Optimizers(model, args)
|
| 422 |
initial_validation = evaluate(model, validation, config.route_paths)
|
| 423 |
print(json.dumps({"parameters": counts, "threshold": threshold, "initial_validation": initial_validation, "sources": packer.documents}), flush=True)
|
| 424 |
+
if args.compile_blocks:
|
| 425 |
+
model.compile_blocks()
|
| 426 |
compiled = torch.compile(model, mode="max-autotune-no-cudagraphs") if args.compile else model
|
| 427 |
history = args.output / "training.jsonl"
|
| 428 |
tokens = start_step * args.batch_size * args.sequence_length
|