Skip to content

feat: dense arch pack for parallel-block and norm-variant families (Cohere/Cohere2, Phi3, StableLM, StarCoder2, Granite, MiniCPM/MiniCPM3) #498

Closed

Description

@inureyes

Part of #493

Context

These dense families carry distinct small deltas:

  • Cohere and Cohere2 use LayerNorm, a parallel attention+MLP block, no biases, and a logit scale.
  • Phi3, StableLM, StarCoder2, Granite, and MiniCPM/MiniCPM3 each carry a small delta such as partial RoPE or residual scaling.

Once the shared attention core (#494) lands, each is a config flag plus a small forward delta.

Scope

  • Add each via Config::from_json flags and the shared forward: parallel-block flag, LayerNorm vs RMSNorm, logit scale, partial-RoPE fraction, residual scaling.
  • Per-family weight_names ordering in iree.rs.
  • Files: emitter/config.rs, emitter/model.rs, iree.rs.

Acceptance criteria

  • Each listed architecture (Cohere, Cohere2, Phi3, StableLM, StarCoder2, Granite, MiniCPM, MiniCPM3) loads and generates via the CLI MLXCEL_BACKEND=xla path and serves via mlxcel-server.
  • Single-sequence path is token-exact vs an HF fp32 oracle on a real checkpoint.
  • Serve path is reference-exact via xla_batch_bench.

Dependencies

#494 (shared attention core). Uses #496 (validation harness) when available.

Activity

  1. added
    type:enhancement
    area:architecture
    priority:medium
    status:blocked
    on Jun 30, 2026
  2. added
    status:in-progress
    status:review
    status:done
    and removed
    status:blocked
    status:in-progress
    status:review
    on Jul 1, 2026
  3. added a commit that references this issue on Jul 1, 2026
  4. self-assigned this
    on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:architecturepriority:mediumstatus:donetype:enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions