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.
Files changed (36) hide show
  1. fusion_bench/method/ada_svd/clip_vision.py +4 -1
  2. fusion_bench/method/smile_upscaling/smile_mistral_upscaling.py +46 -145
  3. fusion_bench/method/smile_upscaling/smile_qwen2_upscaling.py +229 -0
  4. fusion_bench/method/smile_upscaling/smile_upscaling.py +6 -336
  5. fusion_bench/modelpool/causal_lm/causal_lm.py +73 -10
  6. fusion_bench/models/modeling_smile_mistral/modeling_smile_mistral.py +2 -203
  7. fusion_bench/models/modeling_smile_qwen2/__init__.py +8 -0
  8. fusion_bench/models/modeling_smile_qwen2/configuration_smile_qwen2.py +21 -0
  9. fusion_bench/models/modeling_smile_qwen2/modeling_smile_qwen2.py +922 -0
  10. fusion_bench/models/modeling_smile_qwen2/register.py +11 -0
  11. fusion_bench/models/rankone_moe.py +2 -88
  12. fusion_bench/models/smile_moe/linear_from_hf_config.py +373 -0
  13. fusion_bench/models/smile_moe/{linear.py → linear_from_module.py} +103 -33
  14. fusion_bench/models/smile_moe/utils/__init__.py +24 -0
  15. fusion_bench/models/smile_moe/utils/svd_utils.py +46 -0
  16. fusion_bench/taskpool/__init__.py +2 -0
  17. fusion_bench/taskpool/lm_eval_harness/__init__.py +3 -0
  18. fusion_bench/taskpool/lm_eval_harness/taskpool.py +87 -0
  19. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/METADATA +26 -3
  20. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/RECORD +36 -15
  21. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/WHEEL +1 -1
  22. fusion_bench_config/method/smile_upscaling/smile_mistral_upscaling.yaml +5 -2
  23. fusion_bench_config/method/smile_upscaling/smile_qwen2_upscaling.yaml +13 -0
  24. fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.1-8B-Instruct.yaml +11 -0
  25. fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.1-8B.yaml +11 -0
  26. fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.2-3B-Instruct.yaml +11 -0
  27. fusion_bench_config/modelpool/CausalLMPool/mergebench/Llama-3.2-3B.yaml +11 -0
  28. fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-2b-it.yaml +11 -0
  29. fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-2b.yaml +11 -0
  30. fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-9b-it.yaml +11 -0
  31. fusion_bench_config/modelpool/CausalLMPool/mergebench/gemma-2-9b.yaml +11 -0
  32. fusion_bench_config/modelpool/CausalLMPool/qwen2_math_1.5B_and_R1.yaml +17 -0
  33. fusion_bench_config/taskpool/LMEvalHarnessTaskPool/lm_eval.yaml +12 -0
  34. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/entry_points.txt +0 -0
  35. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/licenses/LICENSE +0 -0
  36. {fusion_bench-0.2.13.dist-info → fusion_bench-0.2.15.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,8 @@
1
+ from . import register
2
+ from .configuration_smile_qwen2 import SmileQwen2Config
3
+ from .modeling_smile_qwen2 import (
4
+ SmileQwen2ForCausalLM,
5
+ SmileQwen2ForQuestionAnswering,
6
+ SmileQwen2ForSequenceClassification,
7
+ SmileQwen2Model,
8
+ )
@@ -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)