@@ -205,11 +205,11 @@ from together import Together
205
205
206
206
client = Together(api_key = os.environ.get(" TOGETHER_API_KEY" ))
207
207
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
213
213
```
214
214
215
215
## Fine-tunes
@@ -222,21 +222,21 @@ from together import Together
222
222
223
223
client = Together(api_key = os.environ.get(" TOGETHER_API_KEY" ))
224
224
225
- together.Finetune .create(
225
+ client.fine_tuning .create(
226
226
training_file = ' file-d0d318cb-b7d9-493a-bd70-1cfe089d3815' ,
227
- model = ' togethercomputer/RedPajama-INCITE-Chat-3B-v1 ' ,
227
+ model = ' mistralai/Mixtral-8x7B-Instruct-v0.1 ' ,
228
228
n_epochs = 3 ,
229
229
n_checkpoints = 1 ,
230
230
batch_size = 4 ,
231
231
learning_rate = 1e-5 ,
232
232
suffix = ' my-demo-finetune' ,
233
233
wandb_api_key = ' 1a2b3c4d5e.......' ,
234
234
)
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
240
240
```
241
241
242
242
## Models
0 commit comments