# Docs for v2 can be found by changing the above selector ^
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
response = client.models.upload(
"My-Fine-Tuned-Model",
"https://ml-models.s3.us-west-2.amazonaws.com/models/my-fine-tuned-model.tar.gz",
)
print(response.job_id){
"data": {
"job_id": "job-a15dad11-8d8e-4007-97c5-a211304de284",
"model_name": "necolinehubner/Qwen2.5-72B-Instruct",
"model_id": "model-c0e32dfc-637e-47b2-bf4e-e9b2e58c9da7",
"model_source": "huggingface"
},
"message": "Processing model weights. Job created."
}Upload a custom model or adapter from Hugging Face or S3
# Docs for v2 can be found by changing the above selector ^
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
response = client.models.upload(
"My-Fine-Tuned-Model",
"https://ml-models.s3.us-west-2.amazonaws.com/models/my-fine-tuned-model.tar.gz",
)
print(response.job_id){
"data": {
"job_id": "job-a15dad11-8d8e-4007-97c5-a211304de284",
"model_name": "necolinehubner/Qwen2.5-72B-Instruct",
"model_id": "model-c0e32dfc-637e-47b2-bf4e-e9b2e58c9da7",
"model_source": "huggingface"
},
"message": "Processing model weights. Job created."
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name to give to your uploaded model
"Qwen2.5-72B-Instruct"
The source location of the model (Hugging Face repo or S3 path)
"unsloth/Qwen2.5-72B-Instruct"
Whether the model is a full model or an adapter
model, adapter "model"
Hugging Face token (if uploading from Hugging Face)
"hf_examplehuggingfacetoken"
A description of your model
"Finetuned Qwen2.5-72B-Instruct by Unsloth"
The base model to use for an adapter if setting it to run against a serverless pool. Only used for model_type adapter.
"Qwen/Qwen2.5-72B-Instruct"
The lora pool to use for an adapter if setting it to run against, say, a dedicated pool. Only used for model_type adapter.
"my_username/Qwen2.5-72B-Instruct-lora"
Model / adapter upload job created successfully
Show child attributes
"Processing model weights. Job created."
Was this page helpful?