together 1.5.23__tar.gz → 1.5.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. {together-1.5.23 → together-1.5.24}/PKG-INFO +1 -1
  2. {together-1.5.23 → together-1.5.24}/pyproject.toml +1 -1
  3. {together-1.5.23 → together-1.5.24}/src/together/cli/api/finetune.py +18 -0
  4. {together-1.5.23 → together-1.5.24}/src/together/resources/finetune.py +33 -0
  5. {together-1.5.23 → together-1.5.24}/LICENSE +0 -0
  6. {together-1.5.23 → together-1.5.24}/README.md +0 -0
  7. {together-1.5.23 → together-1.5.24}/src/together/__init__.py +0 -0
  8. {together-1.5.23 → together-1.5.24}/src/together/abstract/__init__.py +0 -0
  9. {together-1.5.23 → together-1.5.24}/src/together/abstract/api_requestor.py +0 -0
  10. {together-1.5.23 → together-1.5.24}/src/together/cli/__init__.py +0 -0
  11. {together-1.5.23 → together-1.5.24}/src/together/cli/api/__init__.py +0 -0
  12. {together-1.5.23 → together-1.5.24}/src/together/cli/api/chat.py +0 -0
  13. {together-1.5.23 → together-1.5.24}/src/together/cli/api/completions.py +0 -0
  14. {together-1.5.23 → together-1.5.24}/src/together/cli/api/endpoints.py +0 -0
  15. {together-1.5.23 → together-1.5.24}/src/together/cli/api/evaluation.py +0 -0
  16. {together-1.5.23 → together-1.5.24}/src/together/cli/api/files.py +0 -0
  17. {together-1.5.23 → together-1.5.24}/src/together/cli/api/images.py +0 -0
  18. {together-1.5.23 → together-1.5.24}/src/together/cli/api/models.py +0 -0
  19. {together-1.5.23 → together-1.5.24}/src/together/cli/api/utils.py +0 -0
  20. {together-1.5.23 → together-1.5.24}/src/together/cli/cli.py +0 -0
  21. {together-1.5.23 → together-1.5.24}/src/together/client.py +0 -0
  22. {together-1.5.23 → together-1.5.24}/src/together/constants.py +0 -0
  23. {together-1.5.23 → together-1.5.24}/src/together/error.py +0 -0
  24. {together-1.5.23 → together-1.5.24}/src/together/filemanager.py +0 -0
  25. {together-1.5.23 → together-1.5.24}/src/together/legacy/__init__.py +0 -0
  26. {together-1.5.23 → together-1.5.24}/src/together/legacy/base.py +0 -0
  27. {together-1.5.23 → together-1.5.24}/src/together/legacy/complete.py +0 -0
  28. {together-1.5.23 → together-1.5.24}/src/together/legacy/embeddings.py +0 -0
  29. {together-1.5.23 → together-1.5.24}/src/together/legacy/files.py +0 -0
  30. {together-1.5.23 → together-1.5.24}/src/together/legacy/finetune.py +0 -0
  31. {together-1.5.23 → together-1.5.24}/src/together/legacy/images.py +0 -0
  32. {together-1.5.23 → together-1.5.24}/src/together/legacy/models.py +0 -0
  33. {together-1.5.23 → together-1.5.24}/src/together/resources/__init__.py +0 -0
  34. {together-1.5.23 → together-1.5.24}/src/together/resources/audio/__init__.py +0 -0
  35. {together-1.5.23 → together-1.5.24}/src/together/resources/audio/speech.py +0 -0
  36. {together-1.5.23 → together-1.5.24}/src/together/resources/audio/transcriptions.py +0 -0
  37. {together-1.5.23 → together-1.5.24}/src/together/resources/audio/translations.py +0 -0
  38. {together-1.5.23 → together-1.5.24}/src/together/resources/batch.py +0 -0
  39. {together-1.5.23 → together-1.5.24}/src/together/resources/chat/__init__.py +0 -0
  40. {together-1.5.23 → together-1.5.24}/src/together/resources/chat/completions.py +0 -0
  41. {together-1.5.23 → together-1.5.24}/src/together/resources/code_interpreter.py +0 -0
  42. {together-1.5.23 → together-1.5.24}/src/together/resources/completions.py +0 -0
  43. {together-1.5.23 → together-1.5.24}/src/together/resources/embeddings.py +0 -0
  44. {together-1.5.23 → together-1.5.24}/src/together/resources/endpoints.py +0 -0
  45. {together-1.5.23 → together-1.5.24}/src/together/resources/evaluation.py +0 -0
  46. {together-1.5.23 → together-1.5.24}/src/together/resources/files.py +0 -0
  47. {together-1.5.23 → together-1.5.24}/src/together/resources/images.py +0 -0
  48. {together-1.5.23 → together-1.5.24}/src/together/resources/models.py +0 -0
  49. {together-1.5.23 → together-1.5.24}/src/together/resources/rerank.py +0 -0
  50. {together-1.5.23 → together-1.5.24}/src/together/together_response.py +0 -0
  51. {together-1.5.23 → together-1.5.24}/src/together/types/__init__.py +0 -0
  52. {together-1.5.23 → together-1.5.24}/src/together/types/abstract.py +0 -0
  53. {together-1.5.23 → together-1.5.24}/src/together/types/audio_speech.py +0 -0
  54. {together-1.5.23 → together-1.5.24}/src/together/types/batch.py +0 -0
  55. {together-1.5.23 → together-1.5.24}/src/together/types/chat_completions.py +0 -0
  56. {together-1.5.23 → together-1.5.24}/src/together/types/code_interpreter.py +0 -0
  57. {together-1.5.23 → together-1.5.24}/src/together/types/common.py +0 -0
  58. {together-1.5.23 → together-1.5.24}/src/together/types/completions.py +0 -0
  59. {together-1.5.23 → together-1.5.24}/src/together/types/embeddings.py +0 -0
  60. {together-1.5.23 → together-1.5.24}/src/together/types/endpoints.py +0 -0
  61. {together-1.5.23 → together-1.5.24}/src/together/types/error.py +0 -0
  62. {together-1.5.23 → together-1.5.24}/src/together/types/evaluation.py +0 -0
  63. {together-1.5.23 → together-1.5.24}/src/together/types/files.py +0 -0
  64. {together-1.5.23 → together-1.5.24}/src/together/types/finetune.py +0 -0
  65. {together-1.5.23 → together-1.5.24}/src/together/types/images.py +0 -0
  66. {together-1.5.23 → together-1.5.24}/src/together/types/models.py +0 -0
  67. {together-1.5.23 → together-1.5.24}/src/together/types/rerank.py +0 -0
  68. {together-1.5.23 → together-1.5.24}/src/together/utils/__init__.py +0 -0
  69. {together-1.5.23 → together-1.5.24}/src/together/utils/_log.py +0 -0
  70. {together-1.5.23 → together-1.5.24}/src/together/utils/api_helpers.py +0 -0
  71. {together-1.5.23 → together-1.5.24}/src/together/utils/files.py +0 -0
  72. {together-1.5.23 → together-1.5.24}/src/together/utils/tools.py +0 -0
  73. {together-1.5.23 → together-1.5.24}/src/together/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: together
3
- Version: 1.5.23
3
+ Version: 1.5.24
4
4
  Summary: Python client for Together's Cloud Platform!
5
5
  License: Apache-2.0
6
6
  Author: Together AI
@@ -12,7 +12,7 @@ build-backend = "poetry.masonry.api"
12
12
 
13
13
  [tool.poetry]
14
14
  name = "together"
15
- version = "1.5.23"
15
+ version = "1.5.24"
16
16
  authors = ["Together AI <support@together.ai>"]
17
17
  description = "Python client for Together's Cloud Platform!"
18
18
  readme = "README.md"
@@ -200,6 +200,20 @@ def fine_tuning(ctx: click.Context) -> None:
200
200
  "The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}. "
201
201
  "The step value is optional, without it the final checkpoint will be used.",
202
202
  )
203
+ @click.option(
204
+ "--from-hf-model",
205
+ type=str,
206
+ help="The Hugging Face Hub repo to start training from. "
207
+ "Should be as close as possible to the base model (specified by the `model` argument) "
208
+ "in terms of architecture and size",
209
+ )
210
+ @click.option(
211
+ "--hf-model-revision",
212
+ type=str,
213
+ help="The revision of the Hugging Face Hub model to continue training from. "
214
+ "Example: hf_model_revision=None (defaults to the latest revision in `main`) "
215
+ "or hf_model_revision='607a30d783dfa663caf39e06633721c8d4cfcd7e' (specific commit).",
216
+ )
203
217
  @click.option(
204
218
  "--hf-api-token",
205
219
  type=str,
@@ -246,6 +260,8 @@ def create(
246
260
  rpo_alpha: float | None,
247
261
  simpo_gamma: float | None,
248
262
  from_checkpoint: str,
263
+ from_hf_model: str,
264
+ hf_model_revision: str,
249
265
  hf_api_token: str | None,
250
266
  hf_output_repo_name: str | None,
251
267
  ) -> None:
@@ -284,6 +300,8 @@ def create(
284
300
  rpo_alpha=rpo_alpha,
285
301
  simpo_gamma=simpo_gamma,
286
302
  from_checkpoint=from_checkpoint,
303
+ from_hf_model=from_hf_model,
304
+ hf_model_revision=hf_model_revision,
287
305
  hf_api_token=hf_api_token,
288
306
  hf_output_repo_name=hf_output_repo_name,
289
307
  )
@@ -76,6 +76,8 @@ def create_finetune_request(
76
76
  rpo_alpha: float | None = None,
77
77
  simpo_gamma: float | None = None,
78
78
  from_checkpoint: str | None = None,
79
+ from_hf_model: str | None = None,
80
+ hf_model_revision: str | None = None,
79
81
  hf_api_token: str | None = None,
80
82
  hf_output_repo_name: str | None = None,
81
83
  ) -> FinetuneRequest:
@@ -87,6 +89,17 @@ def create_finetune_request(
87
89
  if model is None and from_checkpoint is None:
88
90
  raise ValueError("You must specify either a model or a checkpoint")
89
91
 
92
+ if from_checkpoint is not None and from_hf_model is not None:
93
+ raise ValueError(
94
+ "You must specify either a Hugging Face Hub model or a previous checkpoint from "
95
+ "Together to start a job from, not both"
96
+ )
97
+
98
+ if from_hf_model is not None and model is None:
99
+ raise ValueError(
100
+ "You must specify the base model to fine-tune a model from the Hugging Face Hub"
101
+ )
102
+
90
103
  model_or_checkpoint = model or from_checkpoint
91
104
 
92
105
  if warmup_ratio is None:
@@ -251,6 +264,8 @@ def create_finetune_request(
251
264
  wandb_name=wandb_name,
252
265
  training_method=training_method_cls,
253
266
  from_checkpoint=from_checkpoint,
267
+ from_hf_model=from_hf_model,
268
+ hf_model_revision=hf_model_revision,
254
269
  hf_api_token=hf_api_token,
255
270
  hf_output_repo_name=hf_output_repo_name,
256
271
  )
@@ -332,6 +347,8 @@ class FineTuning:
332
347
  rpo_alpha: float | None = None,
333
348
  simpo_gamma: float | None = None,
334
349
  from_checkpoint: str | None = None,
350
+ from_hf_model: str | None = None,
351
+ hf_model_revision: str | None = None,
335
352
  hf_api_token: str | None = None,
336
353
  hf_output_repo_name: str | None = None,
337
354
  ) -> FinetuneResponse:
@@ -390,6 +407,11 @@ class FineTuning:
390
407
  from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
391
408
  The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
392
409
  The step value is optional, without it the final checkpoint will be used.
410
+ from_hf_model (str, optional): The Hugging Face Hub repo to start training from.
411
+ Should be as close as possible to the base model (specified by the `model` argument) in terms of architecture and size.
412
+ hf_model_revision (str, optional): The revision of the Hugging Face Hub model to continue training from. Defaults to None.
413
+ Example: hf_model_revision=None (defaults to the latest revision in `main`) or
414
+ hf_model_revision="607a30d783dfa663caf39e06633721c8d4cfcd7e" (specific commit).
393
415
  hf_api_token (str, optional): API key for the Hugging Face Hub. Defaults to None.
394
416
  hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
395
417
 
@@ -445,6 +467,8 @@ class FineTuning:
445
467
  rpo_alpha=rpo_alpha,
446
468
  simpo_gamma=simpo_gamma,
447
469
  from_checkpoint=from_checkpoint,
470
+ from_hf_model=from_hf_model,
471
+ hf_model_revision=hf_model_revision,
448
472
  hf_api_token=hf_api_token,
449
473
  hf_output_repo_name=hf_output_repo_name,
450
474
  )
@@ -759,6 +783,8 @@ class AsyncFineTuning:
759
783
  rpo_alpha: float | None = None,
760
784
  simpo_gamma: float | None = None,
761
785
  from_checkpoint: str | None = None,
786
+ from_hf_model: str | None = None,
787
+ hf_model_revision: str | None = None,
762
788
  hf_api_token: str | None = None,
763
789
  hf_output_repo_name: str | None = None,
764
790
  ) -> FinetuneResponse:
@@ -817,6 +843,11 @@ class AsyncFineTuning:
817
843
  from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
818
844
  The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
819
845
  The step value is optional, without it the final checkpoint will be used.
846
+ from_hf_model (str, optional): The Hugging Face Hub repo to start training from.
847
+ Should be as close as possible to the base model (specified by the `model` argument) in terms of architecture and size.
848
+ hf_model_revision (str, optional): The revision of the Hugging Face Hub model to continue training from. Defaults to None.
849
+ Example: hf_model_revision=None (defaults to the latest revision in `main`) or
850
+ hf_model_revision="607a30d783dfa663caf39e06633721c8d4cfcd7e" (specific commit).
820
851
  hf_api_token (str, optional): API key for the Huggging Face Hub. Defaults to None.
821
852
  hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
822
853
 
@@ -872,6 +903,8 @@ class AsyncFineTuning:
872
903
  rpo_alpha=rpo_alpha,
873
904
  simpo_gamma=simpo_gamma,
874
905
  from_checkpoint=from_checkpoint,
906
+ from_hf_model=from_hf_model,
907
+ hf_model_revision=hf_model_revision,
875
908
  hf_api_token=hf_api_token,
876
909
  hf_output_repo_name=hf_output_repo_name,
877
910
  )
File without changes
File without changes