mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-30 06:30:37 +02:00
fix(qwen): recognize saved text derivatives
This commit is contained in:
@@ -573,6 +573,21 @@ def test_qwen_single_device_uses_per_device_free_memory(monkeypatch):
|
||||
assert loader._qwen_single_device(216.0, "4bit") == 1
|
||||
|
||||
|
||||
def test_qwen_saved_text_derivative_reuses_single_device_runtime(monkeypatch):
|
||||
config = _config(model_type="qwen3_5_text")
|
||||
monkeypatch.setattr(loader, "_require_qwen_hybrid_kernels", Mock())
|
||||
monkeypatch.setattr(loader, "_estimate_model_memory_gb", Mock(return_value=54.0))
|
||||
monkeypatch.setattr(loader, "_qwen_single_device", Mock(return_value=2))
|
||||
|
||||
assert loader.qwen_hybrid_runtime_overrides(
|
||||
config,
|
||||
torch.bfloat16,
|
||||
) == {
|
||||
"attn_implementation": "sdpa",
|
||||
"device_map": {"": 2},
|
||||
}
|
||||
|
||||
|
||||
def test_model_handle_metadata_snapshot_restore_summary_and_cleanup(tmp_path):
|
||||
model = _model()
|
||||
nested = SimpleNamespace(
|
||||
|
||||
Reference in New Issue
Block a user