Finetune CLI
The following are the CLI commands for ScaleGenAI Finetuning.
Function | Description |
---|---|
create | Launch a fine-tuning job. |
list | List launched fine-tuning jobs. |
stop | Stop a running job. |
view | View a fine-tuning job. |
create
Run this command to create a finetuning job.
scalegen finetune create [args]
The following is the list of arguments that the command requires:
task
: str [ llm | seq2seq | text_classification ] : Specify the task typejob_name
: str : Specify the name for the jobartifacts_storage
: str : Select the results storeuse_spot
: boolean : Specify whether or not spot instances are to be usedmodel
: str : HuggingFace model[required]
data_path
: str : HuggingFace data path or Virtual Mount to be used[required]
train_subset
: str : Training data subset to usetext_column
: str : Text column to uselr
: float : Learning rate to useepochs
: int : Number of training epochsbatch_size
: int : Training batch size to useuse_peft
: boolean : Whether or not to use PEFTwandb_key
: str : Use experiment tracking with WANDB[required]
mixed_precision
: str [ fp16 | bf16 ] : Mixed precision type to usequantization
: str [ int4 | int8 ] : Quantization type to usedisable_gradient_checkpointing
: boolean : Disable gradient checkpointinguse_flash_attention_2
: boolean : Use flash attention 2lora_r
: int : Lora r to uselora_alpha
: int : Lora alpha to uselora_dropout
: float : Lora dropout to usegradient_accumulation_steps
: int : Gradient accumulation steps to usehelp
Example
scalegen finetune create \
--model "mistralai/Mistral-7B-Instruct-v0.2" \
--data_path "centroIA/MistralInstructScenarios" \
--use_peft \
--epochs 220 \
--batch_size 8 \
--lr 0.001 \
--quantization int4 \
--lora_r 8 \
--mixed_precision fp16 \
--wandb_key your1wandb1api1key
list
Run this command to list your running finetuning jobs.
scalegen finetune list
To list all the jobs, use the -a
or --all
flag
scalegen finetune list -a
stop
Run this command to stop a running finetuning jobs.
scalegen finetune stop <JOB_ID>
Example
scalegen finetune stop test_job
view
View the status and logs associated with a job.
scalegen finetune view <JOB_ID>
Example
scalegen finetune view test_job