load_model
Load a pretrained model with Unsloth optimizations for faster training and reduced memory usage, supporting quantization and gradient checkpointing.
Instructions
Load a pretrained model with Unsloth optimizations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_name | Yes | Name of the model to load (e.g., "unsloth/Llama-3.2-1B") | |
| max_seq_length | No | Maximum sequence length for the model | |
| load_in_4bit | No | Whether to load the model in 4-bit quantization | |
| use_gradient_checkpointing | No | Whether to use gradient checkpointing to save memory |