fusion-bench 0.2.13__py3-none-any.whl → 0.2.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fusion_bench/method/ada_svd/clip_vision.py +4 -1
- fusion_bench/method/smile_upscaling/smile_mistral_upscaling.py +46 -145
- fusion_bench/method/smile_upscaling/smile_qwen2_upscaling.py +229 -0
- fusion_bench/method/smile_upscaling/smile_upscaling.py +6 -336
- fusion_bench/modelpool/causal_lm/causal_lm.py +73 -10
- fusion_bench/models/modeling_smile_mistral/modeling_smile_mistral.py +2 -203
- fusion_bench/models/modeling_smile_qwen2/__init__.py +8 -0
- fusion_bench/models/modeling_smile_qwen2/configuration_smile_qwen2.py +21 -0
- fusion_bench/models/modeling_smile_qwen2/modeling_smile_qwen2.py +922 -0
- fusion_bench/models/modeling_smile_qwen2/register.py +11 -0
- fusion_bench/models/rankone_moe.py +2 -88
- fusion_bench/models/smile_moe/linear_from_hf_config.py +373 -0
- fusion_bench/models/smile_moe/{linear.py → linear_from_module.py} +103 -33
- fusion_bench/models/smile_moe/utils/__init__.py +24 -0
- fusion_bench/models/smile_moe/utils/svd_utils.py +46 -0
- fusion_bench/taskpool/__init__.py +2 -0
- fusion_bench/taskpool/lm_eval_harness/__init__.py +3 -0
- fusion_bench/taskpool/lm_eval_harness/taskpool.py +87 -0
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/METADATA +26 -3
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/RECORD +36 -15
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/WHEEL +1 -1
- fusion_bench_config/method/smile_upscaling/smile_mistral_upscaling.yaml +5 -2
- fusion_bench_config/method/smile_upscaling/smile_qwen2_upscaling.yaml +13 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.1-8B-Instruct.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.1-8B.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.2-3B-Instruct.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.2-3B.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-2b-it.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-2b.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-9b-it.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-9b.yaml +11 -0
- fusion_bench_config/modelpool/CausalLMPool/qwen2_math_1.5B_and_R1.yaml +17 -0
- fusion_bench_config/taskpool/LMEvalHarnessTaskPool/lm_eval.yaml +12 -0
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/entry_points.txt +0 -0
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/licenses/LICENSE +0 -0
- {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from transformers import PretrainedConfig
|
|
2
|
+
from transformers.models.qwen2.configuration_qwen2 import Qwen2Config
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SmileQwen2Config(Qwen2Config):
|
|
6
|
+
model_type = "smile_qwen2"
|
|
7
|
+
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
num_experts_per_tok: int = 1,
|
|
11
|
+
rank_of_router: int = None,
|
|
12
|
+
rank_of_expert: int = None,
|
|
13
|
+
num_local_experts: int = None,
|
|
14
|
+
**kwargs,
|
|
15
|
+
):
|
|
16
|
+
self.num_experts_per_tok = num_experts_per_tok
|
|
17
|
+
self.rank_of_router = rank_of_router
|
|
18
|
+
self.rank_of_expert = rank_of_expert
|
|
19
|
+
self.num_local_experts = num_local_experts
|
|
20
|
+
|
|
21
|
+
super().__init__(**kwargs)
|