Skip to content

Commit d97e56a

Browse files
committed
fix docstrings
1 parent b5d5d32 commit d97e56a

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

src/together/cli/api/finetune.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,16 @@ def fine_tuning(ctx: click.Context) -> None:
203203
@click.option(
204204
"--from-hf-model",
205205
type=str,
206-
default=None,
207-
help="The Hugging Face repo to start training from. "
208-
"Should be paired with the base model, specified in `model` argument.",
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) in terms of architecture "
208+
"and size with the base model specified by the `model` argument.",
209209
)
210210
@click.option(
211211
"--hf-model-revision",
212212
type=str,
213-
default=None,
214-
help="The revision of the Hugging Face model to continue training from.",
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).",
215216
)
216217
@click.option(
217218
"--hf-api-token",

src/together/resources/finetune.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ def create_finetune_request(
9191

9292
if from_checkpoint is not None and from_hf_model is not None:
9393
raise ValueError(
94-
"You must specify either a Hugging Face model or a checkpoint to start a job from, not both"
94+
"You must specify either a Hugging Face Hub model or a previous checkpoint from "
95+
"Together to start a job from, not both"
9596
)
9697

9798
if from_hf_model is not None and model is None:
9899
raise ValueError(
99-
"You must specify base model to run a fine-tuning job with a Hugging Face model"
100+
"You must specify the base model to fine-tune a model from the Hugging Face Hub"
100101
)
101102

102103
model_or_checkpoint = model or from_checkpoint
@@ -406,9 +407,11 @@ def create(
406407
from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
407408
The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
408409
The step value is optional, without it the final checkpoint will be used.
409-
from_hf_model (str, optional): The Hugging Face repo to start training from.
410-
Should be paired with the base model, specified in `model` argument.
411-
hf_model_revision (str, optional): The revision of the Hugging Face model to continue training from. Defaults to None.
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).
412415
hf_api_token (str, optional): API key for the Hugging Face Hub. Defaults to None.
413416
hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
414417
@@ -840,9 +843,11 @@ async def create(
840843
from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
841844
The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
842845
The step value is optional, without it the final checkpoint will be used.
843-
from_hf_model (str, optional): The Hugging Face repo to start training from.
844-
Should be paired with the base model, specified in `model` argument.
845-
hf_model_revision (str, optional): The revision of the Hugging Face model to continue training from. Defaults to None.
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).
846851
hf_api_token (str, optional): API key for the Huggging Face Hub. Defaults to None.
847852
hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
848853

0 commit comments

Comments
 (0)