Model Package Specifications

Last updated: 2026-01-23 17:21:56

Structure of the Model Package Directory

Structure of the original model package directory:
cos://bucket/train_models/mv-2302330437837096
├── model
│ ├── model.pth
└── requirements.txt
Structure of the optimized model package directory (When an optimized model is saved to Model Repository, an m-xxx/mv-xxx folder will be generated under the storage path for the optimized model. Under this folder, the original model package is copied to generate a new optimized model file model/tiacc.pt.):
cos://bucket/optimized_models_save/m-230233043/mv-2302330437837096
├── model
│ ├── model.pth
│ ├── tiacc.pt (an optimized model automatically generated by the Model Optimization module of Tencent Cloud TI-ONE Platform, TI-ONE in short)
└── requirements.txt

model: directory for storing models. You can specify this directory but need to ensure that model_service.py can be loaded correctly.
model.pth: original model file. You can specify the file name but need to ensure that model_service.py can be loaded correctly.
tiacc.pt: optimized model file. This file can be automatically generated after the Model Optimization feature is used. If you need to use an optimized model for inference and service deployment, you need to add the logic for this model to read the load in the model_service.py inference script.
requirements.txt: third-party dependency package. If the inference script has third-party dependencies, they can be placed in the requirements.txt file. If not, you can ignore this parameter. Before Tencent Kubernetes Engine (TKE) is started, pip will be used to install third-party dependencies in the requirements.txt file.
Others: other relevant dependency files. They can be randomly placed and packaged for uploading.