Deployment

Downloading Model Weights

Overview

You own all of your model's parameters and checkpoints when using Arcee. Learn how to download model weights from Arcee.

Download Model Weights Without Deployment

You do not need an active deployment in order to download model weights for any of your Arcee models.

Downloading Model Weights

Downloading from CLI

You can use a simple command to download model weights using the Arcee CLI. This method provides flexibility and speed, making it an efficient choice for managing your models.

pip install --upgrade arcee-py

Run the following command to download your model weights:

plaintext
arcee cpt download --name MyCPTModel
arcee merging download --name MyMergingModel
arcee sft download --name MyAlignedModel

Replace MyCPTModel with your model's name. The CLI lets you quickly access and manage your model weights, optimizing your workflow.

Loading Arcee Model with Hugging Face Transformers

After downloading, you can load the model weights using the Hugging Face transformers library. First, extract the tar.gz file using the following command. For faster decompression, we recommend using the pigz command-line utility. Alternatively, you can use gzip with the same parameters.

pigz -dc MyCPTModel.tar.gz | tar xvf - -C MyCPTModel

Then, make sure the transformers library is installed:

pip install transformers

Finally, use the following Python code to load the model and tokenizer:

python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("MyCPTModel")
model = AutoModelForCausalLM.from_pretrained("MyCPTModel")

Video Walkthrough

This video demonstrates model download with the Arcee CLI. The video description includes a link to the companion notebook.

Frequently Asked Questions

  • Downloading model weights is recommended for production deployments to ensure your models run efficiently in your environment.

  • Yes, you can automate downloads using scripts with the arcee CLI. This allows for scheduled and repeated download tasks without manual intervention.

  • Use the following command to download your model weights: arcee cpt download --name MyCPTModel.

  • To verify downloads, check the downloaded files against the expected model artifacts and file sizes. You can also validate the downloaded model's performance faster in your environment.