Upload Models Using Notebook
Uploading a model to the model repository is the first step for publishing the LLM inference service and creating fine-tuning tasks. Using Workbench/Notebook is recommended method for uploading models:
- Optimal Upload Speeds: Since Workbench/Notebook instances run on the platform, they offer optimal upload speeds.
- Built-in Git LFS: Notebooks have a built-in
git lfstool, so installing it locally is not needed.
Yet you may also upload models from your local machine, but you need to install Git LFS first.
TOC
Creating a Workbench/Notebook Instance
Note: In versions of
Alauda AI >= 1.4, you can create a Notebook instance using "Workbench" in the left navigation. In versions ofAlauda AI <= 1.3, you can create a Notebook instance using "Advanced - Notebook".
The detailed workbench/notebook creation instructions are not detailed here. Please refer to workbench docs. You need to note that sufficient storage space must be created to store the model file for the upload process to complete successfully.
Preparing the Model
Download the required model from any open source community. We recommend downloading from the following three websites, such as https://hf-mirror.com/deepseek-ai/DeepSeek-R1.
When downloading models from huggingface or hf-mirror, you can use the huggingface-cli command (requires pip install huggingface_hub ). For more command line usage instructions, please refer to https://hf-mirror.com. Sample download command to download model DeepSeek-R1-Distill-Qwen-1.5B:
Note: If your environment doesn't have internet access, you can choose find a suitable machine with internet access (such as a desktop or server with a high-speed connection to the cluster), download the model, and then copy it to the Notebook environment.
Create a Model
NOTE: This step will create an empty model for uploading model files. If you have already created a model repository, you can skip this step.
Open and log in to Alauda AI. On the "Model Repository" page, click "Create Model Repository." Enter the parameters in order and click "Create."
- Name: Any. We recommend using the downloaded model name. In this example, we use "DeepSeek-R1-Distill-Qwen-1.5B".
- Tag: Any. We recommend entering the model category for easier searching, such as "deepseek."
- Description: Any.
After the model repository is created, you can find the model's "Repository Address" on the "Details" page. This will be used for subsequent git builds. Use when pushing
Uploading the model
To guarantee stable upload/download of large-model files via Git LFS, ensure that both Git and Git LFS are updated to the latest official releases. Older versions can trigger LFS batch-API failures or HTTP-level exceptions, particularly on Windows systems that ship with outdated builds.
Download locations:
Reference versions (validated): Git 2.43.0 with Git LFS 3.6.1
Note: Before beginning, ensure Git and Git LFS are installed in your Notebook environment:
git lfs install && git lfs version
In Notebook, open Terminal and execute the following command to push the model file to the model repository.
Editing Model Metadata
Open the "Model Details" page, go to the "File Management" tab, click "Edit Metadata", select the "task type" and "framework" metadata based on the uploaded model, and then click "Confirm."
Note: Only after configuring the task type and framework metadata can you use the "Publish Inference Service" page to publish the inference service. For more information about model task types, refer to Huggingface pipelines
- Task Type: Determines how inference services will be created based on the model (e.g., text-generation, image-classification).
- For LLM models, select "text-generation".
- For other models downloaded from Huggingface, refer to the task type listed on the model's page.
- For custom models, select the task type based on the model's intended use.
- Framework: The format that the model stores.
- For models Downloaded from Huggingface, select "Transformers".
- For models saved as MLFlow format, select "MLFlow".
- For models saved as Triton Inference Server format, select "Triton".
Appendix
Marking LFS files based on file size
The git lfs migrate command can help you find and migrate large files that already exist in your Git history but are not tracked by LFS. Please note that this command rewrites your commit history. If your repository is shared, be sure to coordinate with your collaborators and use --force when pushing.
Checking the files that need to be migrated
Migrate existing large files to LFS:
The following command will migrate all files larger than 100MB to Git LFS. This 100MB limit is based on GitHub's recommended file size limit for optimal performance.
If your repository is shared, be sure to notify all collaborators before running this command and be prepared to use git push --force when pushing.