Model Importation
Zero facilitates the seamless importation of pre-trained or fine-tuned models for compression and adaptation.
Preparing Your Model
Users can directly utilize a pre-trained or fine-tuned model for compression and adaptation.
Importing Your Custom Weights
Zero offers two methods for importing your model:
Using Model Weight Upload in the Web App
To employ this method:
- Navigate to the Models and Datasets Tab.
- Utilize the Import Functionality.
- Ensure to zip the parent folder of your model weights before uploading.
Using Model Relative Folder Path
Alternatively:
- Upload the model weights to the connected infrastructure.
- Provide the
Model Relative Folder Path
which is the relative location concerning theUser Data/Model Folder Path
set while connecting the infrastructure.
An example folder structure for relative models can be:
/home/nyunuser/custom_data/
| -- models
| | -- ResNet
| | | -- model.pt
| | -- Yolo
| | | -- model.pt
| | -- LLaMA
| | | -- ...
Thus, the "Model Relative Folder Path" could be:
- models/ResNet
- models/EfficientNet
- models/OpenHathi
Note: For LLM tasks, the model folder must be loadable by transformers.AutoModelForCausalLM.from_pretrained
and should return a torch.nn.Module
object or a state_dict (i.e., collections.OrderedDict
object) that can be loaded using torch.load
.