Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/mlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- extension/llm/export/**
- extension/audio/**
- examples/models/gemma4_31b/**
- examples/models/muse-glimmer/**
- examples/models/parakeet/**
- examples/models/voxtral_realtime/**
- examples/models/qwen3_5_moe/**
Expand Down Expand Up @@ -90,6 +91,7 @@ jobs:
backends/mlx/test/test_slot_recycling.py \
backends/mlx/test/test_sample.py \
examples/models/gemma4_31b/tests/test_mlx_pipeline.py \
examples/models/muse-glimmer/tests/test_mlx_pipeline.py \
-v
echo "::endgroup::"

Expand Down

This file was deleted.

22 changes: 15 additions & 7 deletions examples/models/muse-glimmer/tests/test_cuda_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,22 @@
import unittest
from dataclasses import replace

import executorch.backends.cuda.quantize_op_dispatch as _quantize_op_dispatch # noqa: F401
import torch
from executorch.backends.cuda.coalesced_int4_tensor import CudaCoalescedInt4Tensor

try:
import executorch.backends.cuda.quantize_op_dispatch as _quantize_op_dispatch # noqa: F401
from executorch.backends.cuda.coalesced_int4_tensor import CudaCoalescedInt4Tensor
from executorch.examples.models.muse_glimmer.source_transformations.cuda import (
add_dflash_hidden_tapping,
add_on_device_sampler,
cuda_source_transformations,
)
except ImportError as e:
# The CUDA backend pulls in triton, which is absent on non-CUDA builds.
# Every test here is CUDA-specific, so skip the module rather than fail
# collection for anyone running the suite without CUDA.
raise unittest.SkipTest(f"CUDA backend unavailable: {e}")

from executorch.examples.models.muse_glimmer.export.common import (
mutable_buffer_metadata,
)
Expand All @@ -38,11 +51,6 @@
)
from executorch.examples.models.muse_glimmer.loaders.checkpoint_loader import _finalize
from executorch.examples.models.muse_glimmer.model.model import FlatKVCache
from executorch.examples.models.muse_glimmer.source_transformations.cuda import (
add_dflash_hidden_tapping,
add_on_device_sampler,
cuda_source_transformations,
)
from executorch.examples.models.muse_glimmer.tests.test_pipeline import (
build_random_tiny_model,
DEFAULT_RECIPE,
Expand Down
11 changes: 9 additions & 2 deletions examples/models/muse-glimmer/tests/test_ondevice_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@

import pytest

from executorch.examples.llm_server.python.chat_template import ChatTemplate
from executorch.examples.llm_server.python.protocol import ChatMessage
# The serving stack is built on pydantic, which ships with the llm_server
# extras (examples/llm_server/python/requirements.txt) rather than core
# ExecuTorch, so skip instead of failing collection when it is absent.
pytest.importorskip("pydantic", reason="requires llm_server serving dependencies")

from executorch.examples.llm_server.python.chat_template import ( # noqa: E402
ChatTemplate,
)
from executorch.examples.llm_server.python.protocol import ChatMessage # noqa: E402

_SERVER = os.environ.get("MUSE_GLIMMER_SERVER_URL")
_HF_DIR = os.environ.get("MUSE_GLIMMER_HF_DIR")
Expand Down
19 changes: 14 additions & 5 deletions examples/models/muse-glimmer/tests/test_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@

import pytest

from executorch.examples.llm_server.python import chat_template
from executorch.examples.llm_server.python.errors import APIError
from executorch.examples.llm_server.python.protocol import ChatCompletionRequest
from executorch.examples.llm_server.python.session_runtime import PromptInput
from executorch.examples.models.muse_glimmer.serving import serve
# The serving stack is built on pydantic, which ships with the llm_server
# extras (examples/llm_server/python/requirements.txt) rather than core
# ExecuTorch, so skip instead of failing collection when it is absent.
pytest.importorskip("pydantic", reason="requires llm_server serving dependencies")

from executorch.examples.llm_server.python import chat_template # noqa: E402
from executorch.examples.llm_server.python.errors import APIError # noqa: E402
from executorch.examples.llm_server.python.protocol import ( # noqa: E402
ChatCompletionRequest,
)
from executorch.examples.llm_server.python.session_runtime import ( # noqa: E402
PromptInput,
)
from executorch.examples.models.muse_glimmer.serving import serve # noqa: E402

_HERE = pathlib.Path(serve.__file__).resolve().parent
_LLM_SERVER_PYTHON = pathlib.Path(chat_template.__file__).resolve().parent
Expand Down
5 changes: 5 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ testpaths =
examples/models/llama3_2_vision/text_decoder/test
examples/models/llava/test

# Backend-agnostic Muse Glimmer tests. The MLX pipeline test skips itself
# when the backend is absent and is also run by mlx.yml; the CUDA one is
# ignored above.
examples/models/muse-glimmer/tests

# exir
exir/

Expand Down
Loading