@@ -76,6 +76,8 @@ def create_finetune_request(
7676 rpo_alpha : float | None = None ,
7777 simpo_gamma : float | None = None ,
7878 from_checkpoint : str | None = None ,
79+ hf_api_token : str | None = None ,
80+ hf_output_repo_name : str | None = None ,
7981) -> FinetuneRequest :
8082 if model is not None and from_checkpoint is not None :
8183 raise ValueError (
@@ -262,6 +264,8 @@ def create_finetune_request(
262264 wandb_name = wandb_name ,
263265 training_method = training_method_cls ,
264266 from_checkpoint = from_checkpoint ,
267+ hf_api_token = hf_api_token ,
268+ hf_output_repo_name = hf_output_repo_name ,
265269 )
266270
267271 return finetune_request
@@ -341,6 +345,8 @@ def create(
341345 rpo_alpha : float | None = None ,
342346 simpo_gamma : float | None = None ,
343347 from_checkpoint : str | None = None ,
348+ hf_api_token : str | None = None ,
349+ hf_output_repo_name : str | None = None ,
344350 ) -> FinetuneResponse :
345351 """
346352 Method to initiate a fine-tuning job
@@ -397,6 +403,8 @@ def create(
397403 from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
398404 The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
399405 The step value is optional, without it the final checkpoint will be used.
406+ hf_api_token (str, optional): API key for the Hugging Face Hub. Defaults to None.
407+ hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
400408
401409 Returns:
402410 FinetuneResponse: Object containing information about fine-tuning job.
@@ -450,6 +458,8 @@ def create(
450458 rpo_alpha = rpo_alpha ,
451459 simpo_gamma = simpo_gamma ,
452460 from_checkpoint = from_checkpoint ,
461+ hf_api_token = hf_api_token ,
462+ hf_output_repo_name = hf_output_repo_name ,
453463 )
454464
455465 if verbose :
@@ -762,6 +772,8 @@ async def create(
762772 rpo_alpha : float | None = None ,
763773 simpo_gamma : float | None = None ,
764774 from_checkpoint : str | None = None ,
775+ hf_api_token : str | None = None ,
776+ hf_output_repo_name : str | None = None ,
765777 ) -> FinetuneResponse :
766778 """
767779 Async method to initiate a fine-tuning job
@@ -818,6 +830,8 @@ async def create(
818830 from_checkpoint (str, optional): The checkpoint identifier to continue training from a previous fine-tuning job.
819831 The format: {$JOB_ID/$OUTPUT_MODEL_NAME}:{$STEP}.
820832 The step value is optional, without it the final checkpoint will be used.
833+ hf_api_token (str, optional): API key for the Huggging Face Hub. Defaults to None.
834+ hf_output_repo_name (str, optional): HF repo to upload the fine-tuned model to. Defaults to None.
821835
822836 Returns:
823837 FinetuneResponse: Object containing information about fine-tuning job.
@@ -871,6 +885,8 @@ async def create(
871885 rpo_alpha = rpo_alpha ,
872886 simpo_gamma = simpo_gamma ,
873887 from_checkpoint = from_checkpoint ,
888+ hf_api_token = hf_api_token ,
889+ hf_output_repo_name = hf_output_repo_name ,
874890 )
875891
876892 if verbose :
0 commit comments