test: cover Mistral shared-expert memory estimate

This commit is contained in:
Joseph Magly
2026-08-21 19:00:03 -04:00
parent 1112fe139e
commit 182dde0fdf
@@ -5,6 +5,7 @@ from __future__ import annotations
from types import SimpleNamespace
import pytest
import torch
import torch.nn as nn
from obliteratus.architecture_profiles import ArchitectureClass, detect_architecture
@@ -144,6 +145,14 @@ def test_composite_profile_uses_text_backbone_without_misclassifying_mistral3():
assert moe.total_params_b >= 100
def test_composite_memory_estimate_counts_routed_and_shared_experts():
config = _mistral3_config(_mistral4_text_config())
estimate_gb = loader._estimate_model_memory_gb(config, torch.bfloat16)
assert 200 < estimate_gb < 300
def test_mistral_small_4_name_fallback_is_large_moe():
profile = detect_architecture("mistralai/Mistral-Small-4-119B-2603")