Getting Started#
Getting started with ScaleFM involves a straightforward yet powerful process, centering around its three main components. This approach ensures flexibility and efficiency in evaluating different architecture and hyperparameter configurations for your problem.
ScaleFM requires Python 3.11 or higher.
You can install it via pip or from source.
The 3 Main Components#
-
Establish a
pipeline_space=:class ExampleSpace(scalefm.PipelineSpace): # Define the parameters of your search space some_parameter = scalefm.Float(lower=0.0, upper=1.0) # float another_parameter = scalefm.Integer(lower=0, upper=10) # integer optimizer = scalefm.Categorical(choices=("sgd", "adam")) # categorical epoch = scalefm.Integer(lower=1, upper=100) learning_rate = scalefm.Float(lower=1e-5, upper=1, log=True) alpha = scalefm.Float(lower=0.1, upper=1.0) -
Define an
evaluate_pipeline()function: -
Execute with
scalefm.acquire():
What's Next?#
The reference section provides detailed information on the individual components of ScaleFM.
- How to use the
scalefm.acquire()function to start the optimization process. - The different search space options available.
- How to choose and configure the optimizer used.
- How to define the
evaluate_pipeline()function. - How to analyze the optimization runs.
Interactive tutorial
Or try ScaleFM hands-on with the ScaleFM Demo, a basic demo of the pipeline, the visualization and the parallelisation of the runs.
Or discover the features of ScaleFM through these practical examples:
- Scaling study of TabPFN: a random search under a FLOP budget, with the scaling law fitted and extrapolated.
- Asynchronous evaluation: submit each configuration as a Slurm job and report its result back with
scalefm.save_pipeline_results(). - Scaling study of an OpenCLIP VLM: vision and text towers of varying width and depth, each trained in a Slurm job sized to its GPU memory needs.
- Distributed training: evaluate configurations with DDP or FSDP, in native PyTorch or PyTorch Lightning.