(self, *args, **kwargs)
| 85 | transformers.AutoModelForCausalLM.from_config = from_config |
| 86 | |
| 87 | def __exit__(self, *args, **kwargs): |
| 88 | torch.nn.Linear = self._orig_nn_linear |
| 89 | if not self._post_init_complete: |
| 90 | print('WARNING: For some reason LoRA modules are not initialized, this is usually done automatically ' |
| 91 | 'if using transformers via (AutoModelForCausalLM from_pretrained/from_config). ' |
| 92 | 'You must call `init_lora` on each module in order to use DeepSpeed LoRA, otherwise ' |
| 93 | 'you will error out during runtime.') |
| 94 | else: |
| 95 | transformers = _import_transformers_library() |
| 96 | transformers.AutoModelForCausalLM.from_pretrained = self._orig_causallm_pretrained |
| 97 | transformers.AutoModelForCausalLM.from_config = self._orig_causallm_config |
nothing calls this directly
no test coverage detected