Skip to content

SmolLM2-135M compiled leg: DSL → StableHLO → IREE showcase (gemma-iree precedent) #305

Description

@michalharakal

Split out from #272 — the eager-path scope of that issue is done (the
SmolLm2InferenceSpike.kt commonTest reproducer, AndroidSmolLm2E2eTest.kt,
and the feature/smoll disposition are all resolved). This issue tracks the
one item that's still open: the compiled path.

Ask

Add the SmolLM2-135M-Instruct compiled leg — DSL → nn-DAG → StableHLO → IREE
— following the :llm-runtime:gemma-iree precedent:

  1. A gemma3 (or smollm2) → StableHLO export on the host side, matching
    :llm-inference:gemma's existing gemma3 → StableHLO export that produces
    the .vmfb + .irpa pair.
  2. A :llm-runtime:smollm2-iree-shaped module (or extend gemma-iree if the
    architecture is close enough) with the on-device decode loop —
    IreeRuntime + a *Decoder, mirroring GemmaDecoder/GemmaKvDecoder in
    llm-runtime/gemma-iree/src/nativeMain.
  3. Wire it into the same cross-target reproducer harness from SmolLM2-135M as the standard cross-target reproducer: commonTest inference spike + showcase for eager and DSL → nn-DAG → StableHLO → IREE #272 so eager
    vs. compiled numbers are directly comparable per target (JVM, Android,
    iOS simulator/device, linuxX64/Arm64, macosArm64).

Why this model

SmolLM2-135M-Instruct (138 MiB, GGUF Q8_0) is already the standard
cross-target reproducer per #272 — small enough for CI, phones and
simulators, llama-architecture. Using the same checkpoint for the compiled
leg gives an apples-to-apples eager-vs-compiled comparison per target instead
of introducing a second model just for this path.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions