SPB Git

spb/wp33_uqo

Public MIT
3.2 KB · 72 lines text
1.F2=================================== FAILURES ===================================3_________________________ test_logits_match_mlx_lm[32] _________________________45model_dir = '/Users/simon-pierreboucher/.cache/huggingface/hub/models--mlx-community--OLMoE-1B-7B-0125-Instruct-4bit/snapshots/e23844197887b031e7ddddbb0b8959c5a6853a7b'6ref = (Model(7  (model): OlmoeModel(8    (embed_tokens): QuantizedEmbedding(50304, 2048, group_size=64, bits=4, mode=affine)...4, bias=False, group_size=64, bits=4, mode=affine)9), <mlx_lm.tokenizer_utils.TokenizerWrapper object at 0x7094fe7fe0>)10capacity = 321112    @pytest.mark.parametrize("capacity", [64, 32, 16, 8])13    def test_logits_match_mlx_lm(model_dir, ref, capacity):14        refm, tok = ref15        tm = TitanModel(model_dir, capacity=capacity)16        trace = _route_trace(tm)17        rec = {"capacity": capacity, "prompts": [], "tol": TOL, "ts": time.strftime("%Y-%m-%dT%H:%M:%S")}18        worst = 0.019        for p in PROMPTS:20            ids = mx.array(tok.encode(p))[None]21            ref_logits = refm(ids); mx.eval(ref_logits)22            trace.clear(); tm.reset_stats()23>           tl = tm(ids); mx.eval(tl)24                 ^^^^^^^2526tests/test_numerical.py:64: 27_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 28titan/runtime.py:55: in __call__29    return self.model(inputs, cache=cache)30           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^31.venv/lib/python3.12/site-packages/mlx_lm/models/olmoe.py:190: in __call__32    out = self.model(inputs, cache)33          ^^^^^^^^^^^^^^^^^^^^^^^^^34.venv/lib/python3.12/site-packages/mlx_lm/models/olmoe.py:172: in __call__35    h = layer(h, mask, cache=c)36        ^^^^^^^^^^^^^^^^^^^^^^^37.venv/lib/python3.12/site-packages/mlx_lm/models/olmoe.py:145: in __call__38    x = x + self.mlp(self.post_attention_layernorm(x))39            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^40.venv/lib/python3.12/site-packages/mlx_lm/models/olmoe.py:123: in __call__41    y = self.switch_mlp(x_flat, indices)42        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^43titan/moe.py:40: in __call__44    slot_of = dict(zip(uniq, self.table.ensure(uniq)))45                             ^^^^^^^^^^^^^^^^^^^^^^^46titan/slots.py:134: in ensure47    self.load(e, protected=needed)48titan/slots.py:112: in load49    slot = self._install(expert, tensors, protected)50           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^51titan/slots.py:97: in _install52    victim = self.policy.victim(protected)53             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^54_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 5556self = <titan.slots.EvictionPolicy object at 0x70959f0080>57protected = {0, 2, 3, 4, 5, 6, ...}5859    def victim(self, protected: Iterable[int]) -> int:60        prot = set(protected)61        for e in self.order:62            if e not in prot:63                return e64>       raise RuntimeError("no evictable expert")65E       RuntimeError: no evictable expert6667titan/slots.py:36: RuntimeError68=========================== short test summary info ============================69FAILED tests/test_numerical.py::test_logits_match_mlx_lm[32] - RuntimeError: ...70!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!711 failed, 1 passed in 1.94s72
Files · main
Menu

Theme