Skip to content

Serve IRON models through a FastFlowLM plugin - #261

Merged
andrej merged 35 commits into
amd:develfrom
andrej:fastflowlm-explicit-compile
Nov 25, 2026
Merged

andrej merged 35 commits into
amd:develfrom
andrej:fastflowlm-explicit-compile

Conversation

@andrej

@andrej andrej commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Serve IRON models through FastFlowLM using a native plugin built and shipped by IRON. Llama reuses FastFlowLM's frontend, tokenizer, and sampler; EmbeddingGemma-2 uses IRON's text processor. The plugin communicates with the IRON server through a versioned pipe protocol.

Added

  • Model registry and server, plus the C++ plugin, model catalog, and build instructions in iron/applications/fastflowlm_iron.
  • C++ plugin/pipe tests and HTTP integration tests for Llama 3.2 1B Instruct chat and EmbeddingGemma-2 text embeddings.

Changed

Validation

  • Build and installation through the example Makefile; both C++ test suites pass. Regression tests cover revision switching, concurrent builds, timeout cleanup, and checkpoint lookup.
  • Both HTTP integration tests pass on NPU2: Llama answers a question and follow-up with an embedding request between them; EmbeddingGemma-2 produces distinct, normalized, repeatable 768-dimensional vectors and the expected normalized 128-dimensional prefixes.
  • All 24 server protocol tests and IRON formatting, lint, license, and type checks pass. Wheel contents include the plugin build sources, catalog, and license.

The existing IRON application CI runs the integration tests on NPU2. It needs config.json, model.safetensors, tokenizer.json, and tokenizer_config.json in both /srv/fastflowlm/models/llama3.2-1b-instruct/ and /srv/embeddinggemma-2/ (shared with the standalone tests).

@andrej
andrej marked this pull request as ready for review October 30, 2026 19:48
@andrej
andrej force-pushed the fastflowlm-explicit-compile branch from e1591cf to 4d9af30 Compare October 30, 2026 20:11
@andrej
andrej requested a balanced review from Copilot October 30, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The registered embedding_gemma2_multimodal model fails to load through the server because its inherited checkpoint loader accesses a missing class-level configuration, causing an AttributeError.

1 open issue
What changed in this PR

This PR connects IRON models to FastFlowLM’s command-line interface through a binary-protocol server and an example integration pinned to a FastFlowLM fork.

Changes:

  • Adds model registration and server commands for loading, logits, reset, and embeddings.
  • Provides build instructions and tooling for FastFlowLM’s IRON backend.
  • Adds protocol tests, an NPU2 end-to-end chat test, and a required container dependency.
File Description
tests/​applications/​fastflowlm_iron/​test.py Tests a Llama chat request through FastFlowLM on NPU2.
iron/​tests/​test_lm_server.py Tests registration, protocol exchanges, capability negotiation, and diagnostic isolation.
iron/​lm_server.py Implements the binary-protocol model server.
iron/​applications/​fastflowlm_iron/​README.md Documents setup, usage, and integration-test weights.
iron/​applications/​fastflowlm_iron/​Makefile Builds the pinned FastFlowLM fork with IRON support.
iron/​applications/​__init__.py Adds lazy model-class lookup through a registry.
ci/​docker-based/​Dockerfile Adds the libedit-dev build dependency.

Review effort: Balanced

Comment thread iron/applications/__init__.py Resolved
@andrej
andrej force-pushed the fastflowlm-explicit-compile branch from 4d9af30 to 0aac7e4 Compare November 3, 2026 23:11
@andrej andrej changed the title FastFlowLM Integration for Models Serve IRON models through a FastFlowLM plugin Nov 4, 2026
@andrej
andrej requested a balanced review from Copilot November 4, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unsupported embedding inputs poison the worker and block subsequent valid requests, while parallel test workers can race on the shared build directory and fail before HTTP tests start.

3 open issues

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An oversized unsupported task is echoed into an error header, exceeding the worker’s limit and leaving it unusable for valid embedding requests until the model is reloaded.

3 open issues
1 resolved since last review

Review effort: Balanced

Comment thread iron/lm_server.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved issues can overwrite the configured model path, leave timed-out builds running and holding locks, and build the wrong revision after switching commit pins.

3 open issues
3 resolved since last review

Review effort: Balanced

@andrej
andrej enabled auto-merge November 24, 2026 22:34
ml_dtypes 0.7.0 changes float64-to-bfloat16 rounding, changing generated test inputs and invalidating the committed golden data. Keep 0.6.0 until the reference fixtures are deliberately updated.
@andrej
andrej added this pull request to the merge queue Nov 25, 2026
Merged via the queue into amd:devel with commit de1a549 Nov 25, 2026
12 checks passed
@andrej
andrej deleted the fastflowlm-explicit-compile branch November 25, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants