[bugfix] dep ineffective (#4416)
### What this PR does / why we need it? The expert mapping table and weights of the dynamic EPLB were not updated, causing the accuracy to be correct but not effective. This bug has now been fixed. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. Signed-off-by: shenchuxiaofugui <1311027364@qq.com>
This commit is contained in:
@@ -194,15 +194,15 @@ class VllmEplbAdaptor(EplbAdaptor):
|
||||
json.dump(record, f, indent=4)
|
||||
|
||||
def do_update_expert_map(self, layer_id, updated_expert_map):
|
||||
self.expert_map_per_layer[layer_id] = updated_expert_map.clone()
|
||||
self.expert_map_per_layer_cpu[layer_id] = updated_expert_map.clone()
|
||||
self.expert_map_per_layer[layer_id].copy_(updated_expert_map)
|
||||
self.expert_map_per_layer_cpu[layer_id].copy_(updated_expert_map)
|
||||
|
||||
def do_update_expert_weight(self, layer_id, local_expert_to_replace,
|
||||
buffer_tensor_id):
|
||||
for expert_tensor, buffer_tensor in zip(
|
||||
self.expert_param_per_layer[layer_id][local_expert_to_replace],
|
||||
self.buffer_tensor_list[buffer_tensor_id]):
|
||||
expert_tensor = buffer_tensor.clone()
|
||||
expert_tensor.copy_(buffer_tensor)
|
||||
logger.debug(f"Expert tensor shape is :{expert_tensor.shape}")
|
||||
|
||||
def do_update_log2phy_map(self, layer_id, updated_log2phy_map):
|
||||
|
||||
Reference in New Issue
Block a user