Resolve active params from curated data or A*B naming hints.
(
total_params: int,
*model_refs: str | None,
)
| 169 | |
| 170 | |
| 171 | def _resolve_moe_active_params( |
| 172 | total_params: int, |
| 173 | *model_refs: str | None, |
| 174 | ) -> int | None: |
| 175 | """Resolve active params from curated data or A*B naming hints.""" |
| 176 | for ref in model_refs: |
| 177 | if not ref: |
| 178 | continue |
| 179 | active = _lookup_curated_count(_KNOWN_MOE_ACTIVE_PARAMS, ref) |
| 180 | if active and active > 0: |
| 181 | return active |
| 182 | |
| 183 | for ref in model_refs: |
| 184 | active = _extract_active_size_hint_from_id(ref) |
| 185 | if active and active > 0 and (total_params <= 0 or active < total_params): |
| 186 | return active |
| 187 | return None |
| 188 | |
| 189 | |
| 190 | # Sliding-window-attention (SWA) registry. We only model SWA KV-cache savings |
no test coverage detected