The generation phase of the moe.
| 109 | |
| 110 | |
| 111 | class MoEPhase: |
| 112 | """ |
| 113 | The generation phase of the moe. |
| 114 | """ |
| 115 | |
| 116 | def __init__(self, phase="prefill"): |
| 117 | self._phase = phase |
| 118 | |
| 119 | @property |
| 120 | def phase(self): |
| 121 | return self._phase |
| 122 | |
| 123 | @phase.setter |
| 124 | def phase(self, value): |
| 125 | if value not in ["prefill", "decode"]: |
| 126 | raise ValueError(f"The moe_phase is invalid, only support prefill and decode, but got {value}") |
| 127 | else: |
| 128 | self._phase = value |
| 129 | |
| 130 | |
| 131 | class ErnieArchitectures: |
no outgoing calls