[Model] support bitsandbytes quantization with minicpm3 model (#10682)
Signed-off-by: Ubuntu <zixuanzhang@bytedance.com>
This commit is contained in:
@@ -241,6 +241,12 @@ class MiniCPM3ForCausalLM(MiniCPMForCausalLM):
|
|||||||
# `embedding_modules` and `embedding_padding_modules`
|
# `embedding_modules` and `embedding_padding_modules`
|
||||||
# are inherited from MiniCPMForCausalLM
|
# are inherited from MiniCPMForCausalLM
|
||||||
|
|
||||||
|
bitsandbytes_stacked_params_mapping = {
|
||||||
|
# shard_name, weight_name, index
|
||||||
|
"gate_proj": ("gate_up_proj", 0),
|
||||||
|
"up_proj": ("gate_up_proj", 1),
|
||||||
|
}
|
||||||
|
|
||||||
def _init_model(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
def _init_model(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
||||||
self.model = MiniCPM3Model(vllm_config=vllm_config,
|
self.model = MiniCPM3Model(vllm_config=vllm_config,
|
||||||
prefix=maybe_prefix(prefix, "model"))
|
prefix=maybe_prefix(prefix, "model"))
|
||||||
|
|||||||
Reference in New Issue
Block a user