RECODE-H / annotations /annotation_104 /function_info.json
mcy98's picture
Upload folder using huggingface_hub
d7ff85b verified
Raw History Blame Contribute Delete
14.9 kB
[
{
"function_name": "HFRMSNormPrunner.prune_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.size",
"functionality": "Returns the size of the tensor as a torch.Size object.",
"input": "dim: Optional[int]",
"output": "torch.Size or int",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.nn.Parameter",
"functionality": "Wraps a tensor to be considered a model parameter, automatically adding it to the list of parameters.",
"input": "data: torch.Tensor, requires_grad: bool = True",
"output": "torch.nn.Parameter",
"location_or_namespace": "torch.nn"
}
]
},
{
"function_name": "HFRMSNormPrunner.get_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.size",
"functionality": "Returns the size of the tensor as a torch.Size object.",
"input": "dim: Optional[int]",
"output": "torch.Size or int",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "HFRMSNormPrunner.get_in_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.size",
"functionality": "Returns the size of the tensor as a torch.Size object.",
"input": "dim: Optional[int]",
"output": "torch.Size or int",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "HFAttentionPrunner.prune_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.nn.Parameter",
"functionality": "Wraps a tensor to be considered a model parameter, automatically adding it to the list of parameters.",
"input": "data: torch.Tensor, requires_grad: bool = True",
"output": "torch.nn.Parameter",
"location_or_namespace": "torch.nn"
}
]
},
{
"function_name": "HFAttentionPrunner.get_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "HFAttentionPrunner.get_in_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "HFLinearPrunner.prune_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.mm",
"functionality": "Performs a matrix multiplication of the two input matrices.",
"input": "input: Tensor, mat2: Tensor",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.argmax",
"functionality": "Returns the indices of the maximum value of all elements in the input tensor.",
"input": "input: Tensor, dim: Optional[int] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.ones",
"functionality": "Returns a tensor filled with the scalar value 1, with the specified size.",
"input": "*size: int, dtype: Optional[torch.dtype] = None, device: Optional[torch.device] = None",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.size",
"functionality": "Returns the size of the tensor as a torch.Size object.",
"input": "dim: Optional[int]",
"output": "torch.Size or int",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.max",
"functionality": "Returns the maximum value of all elements in the input tensor.",
"input": "input: Tensor, dim: Optional[int] = None, keepdim: bool = False",
"output": "Tuple[Tensor, Tensor]",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.nn.Parameter",
"functionality": "Wraps a tensor to be considered a model parameter, automatically adding it to the list of parameters.",
"input": "data: torch.Tensor, requires_grad: bool = True",
"output": "torch.nn.Parameter",
"location_or_namespace": "torch.nn"
}
]
},
{
"function_name": "HFLinearPrunner.prune_in_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.mm",
"functionality": "Performs a matrix multiplication of the two input matrices.",
"input": "input: Tensor, mat2: Tensor",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.argmax",
"functionality": "Returns the indices of the maximum value of all elements in the input tensor.",
"input": "input: Tensor, dim: Optional[int] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.ones",
"functionality": "Returns a tensor filled with the scalar value 1, with the specified size.",
"input": "*size: int, dtype: Optional[torch.dtype] = None, device: Optional[torch.device] = None",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.size",
"functionality": "Returns the size of the tensor as a torch.Size object.",
"input": "dim: Optional[int]",
"output": "torch.Size or int",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.max",
"functionality": "Returns the maximum value of all elements in the input tensor.",
"input": "input: Tensor, dim: Optional[int] = None, keepdim: bool = False",
"output": "Tuple[Tensor, Tensor]",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.nn.Parameter",
"functionality": "Wraps a tensor to be considered a model parameter, automatically adding it to the list of parameters.",
"input": "data: torch.Tensor, requires_grad: bool = True",
"output": "torch.nn.Parameter",
"location_or_namespace": "torch.nn"
}
]
},
{
"function_name": "HFLinearPrunner.get_out_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "HFLinearPrunner.get_in_channels",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "MagnitudeImportance.__init__",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "MagnitudeImportance._reduce",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.sum",
"functionality": "Returns the sum of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.mean",
"functionality": "Returns the mean value of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.max",
"functionality": "Returns the maximum value of all elements in the input tensor.",
"input": "dim: Optional[int] = None, keepdim: bool = False",
"output": "Tuple[Tensor, Tensor]",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.prod",
"functionality": "Returns the product of all elements in the input tensor.",
"input": "input: Tensor, dim: int, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "MagnitudeImportance.__call__",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.flatten",
"functionality": "Flattens a contiguous range of dims in a tensor.",
"input": "start_dim: int = 0, end_dim: int = -1",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.abs",
"functionality": "Computes the element-wise absolute value of the given input tensor.",
"input": "self: Tensor",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.pow",
"functionality": "Takes the power of each element in input with exponent and returns a tensor with the result.",
"input": "exponent: float",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.sum",
"functionality": "Returns the sum of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.view",
"functionality": "Returns a new tensor with the same data as the self tensor but of a different shape.",
"input": "*shape: int",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.stack",
"functionality": "Concatenates a sequence of tensors along a new dimension.",
"input": "tensors: Tuple[Tensor, ...] or List[Tensor], dim: int = 0",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "self._reduce",
"functionality": "Aggregates a list of importance scores for a dependency group into a single tensor of scores.",
"input": "group_imp: Tensor",
"output": "Tensor",
"location_or_namespace": "LLMPruner/pruners/hf_pruners.py"
},
{
"function_call_name": "self.normalizer",
"functionality": "Applies a normalization function to the aggregated importance scores.",
"input": "group: DependencyGroup, group_imp: Tensor",
"output": "Tensor",
"location_or_namespace": "LLMPruner/pruners/hf_pruners.py"
}
]
},
{
"function_name": "TaylorImportance.__init__",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": []
},
{
"function_name": "TaylorImportance._reduce",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.sum",
"functionality": "Returns the sum of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.mean",
"functionality": "Returns the mean value of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.max",
"functionality": "Returns the maximum value of all elements in the input tensor.",
"input": "dim: Optional[int] = None, keepdim: bool = False",
"output": "Tuple[Tensor, Tensor]",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.prod",
"functionality": "Returns the product of all elements in the input tensor.",
"input": "input: Tensor, dim: int, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "TaylorImportance.__call__",
"file_path": "LLMPruner/pruners/hf_pruners.py",
"function_calls": [
{
"function_call_name": "torch.Tensor.sum",
"functionality": "Returns the sum of all elements in the input tensor.",
"input": "dim: Optional[Union[int, Tuple[int, ...]]] = None, keepdim: bool = False",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.abs",
"functionality": "Computes the element-wise absolute value of the given input tensor.",
"input": "self: Tensor",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.Tensor.view",
"functionality": "Returns a new tensor with the same data as the self tensor but of a different shape.",
"input": "*shape: int",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.stack",
"functionality": "Concatenates a sequence of tensors along a new dimension.",
"input": "tensors: Tuple[Tensor, ...] or List[Tensor], dim: int = 0",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "self._reduce",
"functionality": "Aggregates a list of importance scores for a dependency group into a single tensor of scores.",
"input": "group_imp: Tensor",
"output": "Tensor",
"location_or_namespace": "LLMPruner/pruners/hf_pruners.py"
},
{
"function_call_name": "self.normalizer",
"functionality": "Applies a normalization function to the aggregated importance scores.",
"input": "group: DependencyGroup, group_imp: Tensor",
"output": "Tensor",
"location_or_namespace": "LLMPruner/pruners/hf_pruners.py"
}
]
}
]