Skip to main content

Upload

Upload a model from Hugging Face or S3 for inference on a dedicated endpoint.
tg models upload \
    --model-name [TEXT] \
    --model-source [URI]
# Upload a model from Hugging Face.
tg models upload \
    --model-name together-m1-3b-personal-clone \
    --model-source https://huggingface.co/togethercomputer/M1-3B \
    --hf-token "$HUGGINGFACEHUB_API_TOKEN"
# Upload a model from S3.
PRESIGNED_URL=$(sh ./get-presigned-url)

tg models upload \
  --model-name my-s3-upload-model \
  --model-source "$PRESIGNED_URL"

Parameters

FlagTypeDescription
--model-namestringThe name to give your uploaded model. required
--model-sourcestringThe source URI of the model. required
--model-typemodel or adapterWhether the model is a full model or an adapter.
--hf-tokenstringHugging Face token, used when uploading from Hugging Face.
--descriptionstringA description of your model.
--base-modelstringThe base model for an adapter when running against a serverless pool. Only used with --model-type adapter.
--lora-modelstringThe LoRA pool for an adapter when running against a dedicated pool. Only used with --model-type adapter.

List all models

# List models
tg models list
# List models that can be deployed on dedicated endpoints
tg models list --type dedicated
# Output in JSON mode and pipe to jq.
tg models list --json | jq 'length'

Parameters

FlagTypeDescription
--typededicatedFilter to models that can be deployed on dedicated endpoints. dedicated is the only available value.
--afterstringThe cursor to start from for pagination.