-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Qwen2Moe * update default config * update QWen2Moe modeling * update modeling * update ckpt name * support same prefix model name for auto modeling * update qwen2moe testing * update qwen2moe modeling and config * update qwen2moe import * fix mlp hidden_size * update qkv bias convert * update modeling init_weight * update _get_name_mappings * update _get_name_mappings and _init_weight * add tokenizer * update modeling * update modeling * update tokenizer * update modeling and tokenizer * fix index_add_ error * fix * update comments * update lora weights * add todo * update Copyright * update Moe to MoE * update comment * update Copyright * update readme and json * update __init__.py * add qwen-1.5 * update QWen to Qwen * update Qwen2MoE to Qwen2Moe * update readme * update qwen2moe sft and lora json * update qwen2moe base name * update qwen2 * update * update readme * update readme * update readme
- Loading branch information
1 parent
909be01
commit 4609d07
Showing
17 changed files
with
4,543 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"model_name_or_path": "Qwen/Qwen1.5-MoE-A2.7B", | ||
"dataset_name_or_path": "./data", | ||
"output_dir": "./checkpoints/qwen2moe_lora_ckpts", | ||
"per_device_train_batch_size": 4, | ||
"gradient_accumulation_steps": 4, | ||
"per_device_eval_batch_size": 8, | ||
"eval_accumulation_steps":16, | ||
"num_train_epochs": 3, | ||
"learning_rate": 3e-04, | ||
"warmup_steps": 30, | ||
"logging_steps": 1, | ||
"evaluation_strategy": "epoch", | ||
"save_strategy": "epoch", | ||
"src_length": 1024, | ||
"max_length": 32768, | ||
"bf16": true, | ||
"fp16_opt_level": "O2", | ||
"do_train": true, | ||
"do_eval": true, | ||
"disable_tqdm": true, | ||
"load_best_model_at_end": true, | ||
"eval_with_do_generation": false, | ||
"metric_for_best_model": "accuracy", | ||
"recompute": true, | ||
"save_total_limit": 1, | ||
"tensor_parallel_degree": 8, | ||
"pipeline_parallel_degree": 1, | ||
"lora": true, | ||
"zero_padding": false, | ||
"use_flash_attention": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"model_name_or_path": "Qwen/Qwen1.5-MoE-A2.7B", | ||
"dataset_name_or_path": "./data", | ||
"output_dir": "./checkpoints/qwen2moe_sft_ckpts", | ||
"per_device_train_batch_size": 4, | ||
"gradient_accumulation_steps": 4, | ||
"per_device_eval_batch_size": 8, | ||
"eval_accumulation_steps":16, | ||
"num_train_epochs": 3, | ||
"learning_rate": 3e-05, | ||
"warmup_steps": 30, | ||
"logging_steps": 1, | ||
"evaluation_strategy": "epoch", | ||
"save_strategy": "epoch", | ||
"src_length": 1024, | ||
"max_length": 32768, | ||
"bf16": true, | ||
"fp16_opt_level": "O2", | ||
"do_train": true, | ||
"do_eval": true, | ||
"disable_tqdm": true, | ||
"load_best_model_at_end": true, | ||
"eval_with_do_generation": false, | ||
"metric_for_best_model": "accuracy", | ||
"recompute": true, | ||
"save_total_limit": 1, | ||
"tensor_parallel_degree": 8, | ||
"sharding": "stage2", | ||
"pipeline_parallel_degree": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. | ||
# Copyright 2024 The Qwen Team and The HuggingFace Inc. team. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from .configuration import * | ||
from .modeling import * | ||
from .tokenizer import * |
Oops, something went wrong.