load_model
Load a pretrained model with Unsloth optimizations to enable faster training and reduced memory usage. Specify model name, sequence length, 4-bit quantization, and gradient checkpointing for efficient deployment.
Instructions
Load a pretrained model with Unsloth optimizations
Input Schema
Name | Required | Description | Default |
---|---|---|---|
load_in_4bit | No | Whether to load the model in 4-bit quantization | |
max_seq_length | No | Maximum sequence length for the model | |
model_name | Yes | Name of the model to load (e.g., "unsloth/Llama-3.2-1B") | |
use_gradient_checkpointing | No | Whether to use gradient checkpointing to save memory |
Input Schema (JSON Schema)
{
"properties": {
"load_in_4bit": {
"description": "Whether to load the model in 4-bit quantization",
"type": "boolean"
},
"max_seq_length": {
"description": "Maximum sequence length for the model",
"type": "number"
},
"model_name": {
"description": "Name of the model to load (e.g., \"unsloth/Llama-3.2-1B\")",
"type": "string"
},
"use_gradient_checkpointing": {
"description": "Whether to use gradient checkpointing to save memory",
"type": "boolean"
}
},
"required": [
"model_name"
],
"type": "object"
}