test: add T=1/T=2 integration smoke tests against real ZAYA1-8B Q4

This commit is contained in:
transcrilive
2026-05-10 03:17:42 +02:00
parent b58b894567
commit 5dc447fe6c

View File

@@ -0,0 +1,39 @@
import pytest
@pytest.mark.integration
def test_t1_n2_real_zaya_smoke(tmp_path):
"""T=1 N=2 on a tiny prompt — should produce non-empty text + complete audit."""
from markovian_rsa_mlx import MarkovianRSAOrchestrator, RSAConfig
orch = MarkovianRSAOrchestrator.from_pretrained("kyr0/zaya1-base-8b-MLX")
cfg = RSAConfig(
rounds=1, parallel=2, aggregation_subsample=2,
chunk_tokens=128, tail_tokens=32, serial=True, seed=0,
)
audit_path = tmp_path / "audit.jsonl"
text, result = orch.solve("What is the capital of France?",
config=cfg, return_audit=True, audit_path=audit_path)
assert isinstance(text, str)
assert len(text) > 0
assert audit_path.exists()
audit_lines = audit_path.read_text().strip().split("\n")
assert len(audit_lines) >= 5
assert result.stats.total_generated_tokens > 0
@pytest.mark.integration
def test_t2_n2_real_zaya_smoke(tmp_path):
"""T=2 N=2 sanity — same prompt should produce final text after aggregation."""
from markovian_rsa_mlx import MarkovianRSAOrchestrator, RSAConfig
orch = MarkovianRSAOrchestrator.from_pretrained("kyr0/zaya1-base-8b-MLX")
cfg = RSAConfig(
rounds=2, parallel=2, aggregation_subsample=2,
chunk_tokens=128, tail_tokens=32, serial=True, seed=0,
)
text, result = orch.solve("Compute 7*8.", config=cfg, return_audit=True,
audit_path=tmp_path / "audit.jsonl")
assert len(result.rounds) == 2
assert all(len(r.traces) == 2 for r in result.rounds)
assert all(t.parent_trace_ids for t in result.rounds[1].traces)