(self)
| 699 | self.config = config |
| 700 | |
| 701 | def __post_init__(self): |
| 702 | from ..quantization.quantize import quantize |
| 703 | quantize(self, self.config.quantization) |
| 704 | |
| 705 | # Currently, use_parallel_embedding must be enabled before weight loading; |
| 706 | # otherwise, the model will be inconsistent with the weights loaded from checkpoint. |
| 707 | optimize_model( |
| 708 | self, use_parallel_embedding=self.config.use_parallel_embedding) |
| 709 | |
| 710 | def release(self): |
| 711 | release_gc() |
no test coverage detected