Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
SLR722 committed Dec 18, 2024
1 parent 8b3cc7b commit a91dfa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
4 changes: 2 additions & 2 deletions examples/post_training/supervised_fine_tune_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def run_main(
gradient_accumulation_steps=1,
)

training_jobs = client.post_training.supervised_fine_tune(
training_job = client.post_training.supervised_fine_tune(
job_uuid=job_uuid,
model=model,
algorithm_config=algorithm_config,
Expand All @@ -89,7 +89,7 @@ async def run_main(
hyperparam_search_config={},
)

print(f"started the training job: {training_jobs}")
print(f"finished the training job: {training_job.job_uuid}")


def main(
Expand Down
38 changes: 0 additions & 38 deletions src/llama_stack_client/lib/cli/post_training/post_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,6 @@ def post_training():
pass


lora_config = AlgorithmConfig(
type="LoRA",
lora_attn_modules=["q_proj", "v_proj", "output_proj"],
apply_lora_to_mlp=True,
apply_lora_to_output=False,
rank=8,
alpha=16,
)

data_config = DataConfig(
dataset_id="alpaca",
validation_dataset_id="alpaca",
batch_size=1,
shuffle=False,
)

optimizer_config = OptimizerConfig(
optimizer_type="adamw",
lr=3e-4,
lr_min=3e-5,
weight_decay=0.1,
num_warmup_steps=100,
)

effiency_config = EfficienctConfig(
enable_activation_checkpointing=True,
)

training_config = TrainingConfig(
n_epochs=1,
data_config=data_config,
efficient_config=effiency_config,
optimizer_config=optimizer_config,
max_steps_per_epoch=30,
gradient_accumulation_steps=1,
)


@click.command("supervised_fine_tune")
@click.option("--job-uuid", required=True, help="Job UUID")
@click.option("--model", required=True, help="Model ID")
Expand Down

0 comments on commit a91dfa6

Please sign in to comment.