请帮我分析这个代码中,auxiliarymodellist[client]的值会得到更新吗?for client in range(fedargs.numclients):…
- User
请帮我分析这个代码中,auxiliary_model_list[client]的值会得到更新吗?for client in range(fed_args.num_clients):
if client not in clients_this_round: training_loss[client].append(-1) # -1 is an indicator of not training continue set_peft_model_state_dict(model, global_dict) # sync the global model to the local model sub_dataset = get_dataset_this_round(local_datasets[client], round, fed_args, script_args) # get the required sub-dataset for this round new_lr = cosine_learning_rate(round, fed_args.num_rounds, script_args.learning_rate, 1e-6) # manually schedule the learning rate training_args = get_training_args(script_args, new_lr) trainer = get_fed_local_trainer( model=model, tokenizer=tokenizer, training_args=training_args, local_dataset=sub_dataset, formatting_prompts_func=formatting_prompts_func, data_collator=data_collator, global_dict=global_dict, fed_args=fed_args, script_args=script_args, local_auxiliary=auxiliary_model_list[client], global_auxiliary=global_auxiliary, ) results = trainer.train() training_loss[client].append(results.training_loss) if fed_args.fed_alg == 'scaffold': auxiliary_model_list[client], auxiliary_delta_dict[client] = trainer.get_auxiliary_param()
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.