Read configuration from file.
(self)
| 785 | self.reset() |
| 786 | |
| 787 | def read_model_config(self): |
| 788 | """ |
| 789 | Read configuration from file. |
| 790 | """ |
| 791 | self.model_config = {} |
| 792 | if not self.enabled_speculative_decoding(): |
| 793 | return |
| 794 | |
| 795 | self.is_unified_ckpt = check_unified_ckpt(self.model) |
| 796 | if self.model is None: |
| 797 | return |
| 798 | |
| 799 | self.config_path = os.path.join(self.model, "config.json") |
| 800 | if os.path.exists(self.config_path): |
| 801 | self.model_config = json.load(open(self.config_path, "r", encoding="utf-8")) |
| 802 | |
| 803 | def reset(self): |
| 804 | """ |
no test coverage detected