@@ -205,11 +205,11 @@ from together import Together
205205
206206client = Together(api_key = os.environ.get(" TOGETHER_API_KEY" ))
207207
208- together.Files .upload(file = " somedata.jsonl" ) # uploads a file
209- together.Files .list() # lists all uploaded files
210- together.Files .retrieve(id = id ) # retrieves a specific file
211- together.Files .retrieve_content(id = id ) # retrieves content of a specific file
212- together.Files .delete(id = id ) # deletes a file
208+ client.files .upload(file = " somedata.jsonl" ) # uploads a file
209+ client.files .list() # lists all uploaded files
210+ client.files .retrieve(id = " file-d0d318cb-b7d9-493a-bd70-1cfe089d3815 " ) # retrieves a specific file
211+ client.files .retrieve_content(id = " file-d0d318cb-b7d9-493a-bd70-1cfe089d3815 " ) # retrieves content of a specific file
212+ client.files .delete(id = " file-d0d318cb-b7d9-493a-bd70-1cfe089d3815 " ) # deletes a file
213213```
214214
215215## Fine-tunes
@@ -222,21 +222,21 @@ from together import Together
222222
223223client = Together(api_key = os.environ.get(" TOGETHER_API_KEY" ))
224224
225- together.Finetune .create(
225+ client.fine_tuning .create(
226226 training_file = ' file-d0d318cb-b7d9-493a-bd70-1cfe089d3815' ,
227- model = ' togethercomputer/RedPajama-INCITE-Chat-3B-v1 ' ,
227+ model = ' mistralai/Mixtral-8x7B-Instruct-v0.1 ' ,
228228 n_epochs = 3 ,
229229 n_checkpoints = 1 ,
230230 batch_size = 4 ,
231231 learning_rate = 1e-5 ,
232232 suffix = ' my-demo-finetune' ,
233233 wandb_api_key = ' 1a2b3c4d5e.......' ,
234234)
235- together.Finetune .list() # lists all fine-tuned jobs
236- together.Finetune .retrieve(id = id ) # retrieves information on finetune event
237- together.Finetune .cancel(id = id ) # Cancels a fine-tuning job
238- together.Finetune .list_events(id = id ) # Lists events of a fine-tune job
239- together.Finetune .download(id = ' ft-... ' ) # downloads compressed fine-tuned model or checkpoint to local disk
235+ client.fine_tuning .list() # lists all fine-tuned jobs
236+ client.fine_tuning .retrieve(id = " ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b " ) # retrieves information on finetune event
237+ client.fine_tuning .cancel(id = " ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b " ) # Cancels a fine-tuning job
238+ client.fine_tuning .list_events(id = " ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b " ) # Lists events of a fine-tune job
239+ client.fine_tuning .download(id = " ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b " ) # downloads compressed fine-tuned model or checkpoint to local disk
240240```
241241
242242## Models
0 commit comments