add internlm3 (#1206)

This commit is contained in:
Awni Hannun
2025-01-15 14:55:41 -08:00
committed by GitHub
parent 6ae6c72c2e
commit 50f0a7f6d9
3 changed files with 259 additions and 0 deletions

View File

@@ -927,6 +927,23 @@ class TestModels(unittest.TestCase):
model, args.model_type, args.vocab_size, args.num_hidden_layers
)
def test_internlm3(self):
from mlx_lm.models import internlm3
args = internlm3.ModelArgs(
model_type="internlm3",
hidden_size=1024,
num_hidden_layers=4,
intermediate_size=2048,
num_attention_heads=4,
rms_norm_eps=1e-5,
vocab_size=10_000,
)
model = internlm3.Model(args)
self.model_test_runner(
model, args.model_type, args.vocab_size, args.num_hidden_layers
)
if __name__ == "__main__":
unittest.main()