code: def _filter_exlarge_params(
      model: nn.Module, size_dict: Dict[int, List[int]]
  ) -> None:
      """_filter_exlarge_params
  
      Filter those parameters whose size is too large (more than 3x standard deviations) from others.
  
      Args:
          model (nn.Module): the model.
          size_dict (Dict[int, List[int]]): the size dict of parameters.
      """
      agg_size_list = []
      for key in size_dict:
          agg_size_list.extend(size_dict[key])
  
      if len(agg_size_list) == 0:
          return
  
      params_size_arr = np.array(agg_size_list)
  
      std = np.std(params_size_arr)
      mean = np.mean(params_size_arr)
      upper_limit = mean + 3 * std
  
      for key in size_dict:
          org_list = size_dict[key]
          size_dict[key] = list(
              filter(lambda x: x <= upper_limit, org_list)
          )
  
file_path: ColossalAI/colossalai/zero/gemini/chunk/search_utils.py
imports: import math
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch.distributed
  import torch.nn
  from torch.distributed import ProcessGroup
  from colossalai.tensor import ColoParameter
  from colossalai.utils import is_ddp_ignored
  from colossalai.zero.gemini.memory_tracer import MemStats, OrderedParamGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: _filter_exlarge_params(model, size_dict) without return types