feat(loader): add load_zaya_model wrapper around mlx-lm.load
This commit is contained in:
25
tests/test_loader.py
Normal file
25
tests/test_loader.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import pytest
|
||||
from markovian_rsa_mlx.loader import resolve_model_path
|
||||
|
||||
|
||||
def test_resolve_local_path_passthrough(tmp_path):
|
||||
# local dir is returned as-is
|
||||
d = tmp_path / "weights"
|
||||
d.mkdir()
|
||||
assert resolve_model_path(str(d)) == str(d)
|
||||
|
||||
|
||||
def test_resolve_hf_id_format_unchanged():
|
||||
# HF repo id is returned as-is (load_model handles download)
|
||||
assert resolve_model_path("kyr0/zaya1-base-8b-MLX") == "kyr0/zaya1-base-8b-MLX"
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_load_real_zaya_q4_smoke():
|
||||
"""Hits the actual Q4 weights — slow, requires HF cache."""
|
||||
from markovian_rsa_mlx.loader import load_zaya_model
|
||||
model, tokenizer = load_zaya_model("kyr0/zaya1-base-8b-MLX")
|
||||
assert model is not None
|
||||
assert tokenizer is not None
|
||||
assert hasattr(tokenizer, "encode")
|
||||
assert hasattr(tokenizer, "decode")
|
||||
Reference in New Issue
Block a user