Skip to content

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:

  1. Navigate to the Models and Datasets Tab.
  2. Utilize the Import Functionality.
  3. Ensure to zip the parent folder of your model weights before uploading.

Using Model Relative Folder Path

Alternatively:

  1. Upload the model weights to the connected infrastructure.
  2. Provide the Model Relative Folder Path which is the relative location concerning the User 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:

  1. models/ResNet
  2. models/EfficientNet
  3. 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.