class_docstr: Shard the original huggingface model according to the policy
  
  Args:
      policy (:class:`Policy`): The policy to shard the model
      model (:class:`torch.Module`): The model to shard
      shard_config: The setting of distributed model
docstr: Release the unheld layers in the model
docstr_tok: ["Release","the","unheld","layers","in","the","model"]
code: def _release_unheld_layers(self) -> Optional[Set[nn.Module]]:
      r"""
      Release the unheld layers in the model
      """
      if self.shard_config and self.shard_config.pipeline_stage_manager:
          held_layers = self.policy.get_held_layers()
          set_tensors_to_none(self.model, exclude=set(held_layers))
          return set(self._get_recursive_held_layers(held_layers))
      return None
  
imports: from types import MethodType
  from typing import Any, Callable, Dict, List, Optional, Set, Union
  import torch.nn
  from torch import Tensor
  from colossalai.lazy import LazyInitContext
  from .._utils import getattr_, setattr_
  from ..policies.auto_policy import get_autopolicy
  from ..policies.base_policy import Policy, SubModuleReplacementDescription
  from .shard_config import ShardConfig
  from .utils import set_tensors_to_none
label_desc: Use image node_id 12 for calling the ModelSharder obj's underlying member method code with example usage: obj._release_unheld_layers() and returns: None, set