(self, module)
| 823 | _supports_static_cache = True |
| 824 | |
| 825 | def _init_weights(self, module): |
| 826 | std = self.config.initializer_range |
| 827 | if isinstance(module, nn.Linear): |
| 828 | module.weight.data.normal_(mean=0.0, std=std) |
| 829 | if module.bias is not None: |
| 830 | module.bias.data.zero_() |
| 831 | elif isinstance(module, nn.Embedding): |
| 832 | module.weight.data.normal_(mean=0.0, std=std) |
| 833 | if module.padding_idx is not None: |
| 834 | module.weight.data[module.padding_idx].zero_() |
| 835 | |
| 836 | |
| 837 | LLAMA_INPUTS_DOCSTRING = r""" |
nothing calls this directly
no outgoing calls
no test coverage detected