together 1.5.23__py3-none-any.whl → 1.5.24__py3-none-any.whl
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.
- together/cli/api/finetune.py +18 -0
- together/resources/finetune.py +33 -0
- {together-1.5.23.dist-info → together-1.5.24.dist-info}/METADATA +1 -1
- {together-1.5.23.dist-info → together-1.5.24.dist-info}/RECORD +7 -7
- {together-1.5.23.dist-info → together-1.5.24.dist-info}/LICENSE +0 -0
- {together-1.5.23.dist-info → together-1.5.24.dist-info}/WHEEL +0 -0
- {together-1.5.23.dist-info → together-1.5.24.dist-info}/entry_points.txt +0 -0
together/cli/api/finetune.py
CHANGED
|
@@ -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
|
)
|
together/resources/finetune.py
CHANGED
|
@@ -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
|
)
|
|
@@ -8,7 +8,7 @@ together/cli/api/completions.py,sha256=l-Zw5t7hojL3w8xd_mitS2NRB72i5Z0xwkzH0rT5X
|
|
|
8
8
|
together/cli/api/endpoints.py,sha256=f6KafWZvRF6n_ThWdr3y9uhE6wPF37PcD45w_EtgXmY,13289
|
|
9
9
|
together/cli/api/evaluation.py,sha256=reu8LRUDqDBf9mCwbbD_kETyB4PdokvA5mc792iIrSU,11367
|
|
10
10
|
together/cli/api/files.py,sha256=QLYEXRkY8J2Gg1SbTCtzGfoTMvosoeACNK83L_oLubs,3397
|
|
11
|
-
together/cli/api/finetune.py,sha256=
|
|
11
|
+
together/cli/api/finetune.py,sha256=MxNaxz-lbXwv2b2kcIxII3hfSf_49w39jUUieh9Mb34,17528
|
|
12
12
|
together/cli/api/images.py,sha256=GADSeaNUHUVMtWovmccGuKc28IJ9E_v4vAEwYHJhu5o,2645
|
|
13
13
|
together/cli/api/models.py,sha256=CXw8B1hqNkadogi58GIXhLg_dTJnvTBaE7Kq1_xQ-10,1423
|
|
14
14
|
together/cli/api/utils.py,sha256=IuqYWPnLI38_Bqd7lj8V_SnGdYc59pRmMbQmciS4FsM,1326
|
|
@@ -39,7 +39,7 @@ together/resources/embeddings.py,sha256=PTvLb82yjG_-iQOyuhsilp77Fr7gZ0o6WD2KeRnK
|
|
|
39
39
|
together/resources/endpoints.py,sha256=NNjp-wyzOotzlscGGrANhOHxQBjHTN8f5kTQTH_CLvE,17177
|
|
40
40
|
together/resources/evaluation.py,sha256=YjHCT9JZ30ENuSJ16WZRLPtB1qEIo2aXt8ggK06M1XY,26987
|
|
41
41
|
together/resources/files.py,sha256=y3Ri6UtyAa7fjCJ8_fp26Y2hzzi6Aoo21JKkVgljFl8,5026
|
|
42
|
-
together/resources/finetune.py,sha256=
|
|
42
|
+
together/resources/finetune.py,sha256=PAvQYunCwg-0R9ItirZheF-F0YnZctTrH3so8iZzGf4,43039
|
|
43
43
|
together/resources/images.py,sha256=LQUjKPaFxWTqOAPnyF1Pp7Rz4NLOYhmoKwshpYiprEM,4923
|
|
44
44
|
together/resources/models.py,sha256=qgmAXv61Cq4oLxytenEZBywA8shldDHYxJ_EAu_4JWQ,3864
|
|
45
45
|
together/resources/rerank.py,sha256=3Ju_aRSyZ1s_3zCSNZnSnEJErUVmt2xa3M8z1nvejMA,3931
|
|
@@ -67,8 +67,8 @@ together/utils/api_helpers.py,sha256=2K0O6qeEQ2zVFvi5NBN5m2kjZJaS3-JfKFecQ7SmGaw
|
|
|
67
67
|
together/utils/files.py,sha256=CTngpKf_Erp31fbT0dQFtKXrABcsKUpSX1_EGQTgFno,20682
|
|
68
68
|
together/utils/tools.py,sha256=H2MTJhEqtBllaDvOyZehIO_IVNK3P17rSDeILtJIVag,2964
|
|
69
69
|
together/version.py,sha256=p03ivHyE0SyWU4jAnRTBi_sOwywVWoZPU4g2gzRgG-Y,126
|
|
70
|
-
together-1.5.
|
|
71
|
-
together-1.5.
|
|
72
|
-
together-1.5.
|
|
73
|
-
together-1.5.
|
|
74
|
-
together-1.5.
|
|
70
|
+
together-1.5.24.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
71
|
+
together-1.5.24.dist-info/METADATA,sha256=lHybSaY7NP0rXKltLaZkH826qKIeTYnJAyItcMu_dvM,16441
|
|
72
|
+
together-1.5.24.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
73
|
+
together-1.5.24.dist-info/entry_points.txt,sha256=G-b5NKW6lUUf1V1fH8IPTBb7jXnK7lhbX9H1zTEJXPs,50
|
|
74
|
+
together-1.5.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|