mirror of
https://github.com/jingyaogong/minimind.git
synced 2026-10-01 15:27:22 +00:00
[fix] lora moe
This commit is contained in:
@@ -127,6 +127,7 @@ def convert_json_to_jinja(json_file_path, output_path):
|
||||
|
||||
if __name__ == '__main__':
|
||||
lm_config = MiniMindConfig(hidden_size=768, num_hidden_layers=8, max_seq_len=8192, use_moe=False)
|
||||
|
||||
# convert torch to transformers
|
||||
torch_path = f"../out/full_sft_{lm_config.hidden_size}{'_moe' if lm_config.use_moe else ''}.pth"
|
||||
transformers_path = '../minimind-3'
|
||||
@@ -134,7 +135,7 @@ if __name__ == '__main__':
|
||||
|
||||
# # merge lora
|
||||
# base_torch_path = f"../out/full_sft_{lm_config.hidden_size}{'_moe' if lm_config.use_moe else ''}.pth"
|
||||
# lora_path = f"../out/lora_identity_{lm_config.hidden_size}.pth"
|
||||
# lora_path = f"../out/lora_identity_{lm_config.hidden_size}{'_moe' if lm_config.use_moe else ''}.pth"
|
||||
# merged_torch_path = f"../out/merge_identity_{lm_config.hidden_size}{'_moe' if lm_config.use_moe else ''}.pth"
|
||||
# convert_merge_base_lora(base_torch_path, lora_path, merged_torch_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user