Skip to content

Give MTPLX real launch-tuning knobs now that PortOS owns its launch line #4746

Description

@atomantic

Problem

server/lib/localModelTuning.js now offers only knobs PortOS can actually apply. MTPLX and vLLM therefore declare none — their previous entries were applies: 'record' placeholders that changed nothing about a run while looking like settings, so the reading was filed under a configuration that never existed.

MTPLX is the one worth restoring: PortOS already starts it under PM2 (server/services/mtplxServerManager.js#startMtplxServer), so it has a launch line — it just passes only --port and --model today.

Scope

  1. Verify the real flags first. mtplx serve --help on a machine with MTPLX installed. The retired knob ids (numDraftTokens, maxKvSize, kvBits) were written from the feature doc, not from the CLI, and an unrecognized flag makes mtplx serve exit before it binds — which the LLMs page reports to the user as "the server would not start". Do not guess.
  2. Add the verified flags to startMtplxServer(options) and thread them through currentConfig so a restart re-applies them.
  3. Add a relaunchMtplxServerWithTuning(tuning) mirroring llamaServerManager.js#relaunchLlamaServerWithTuning, including its restore-the-previous-configuration-on-failure behavior: a tuning sweep expects launch lines that do not work, and leaving the daemon down would break the whole install's mtplx provider, not just the measurement.
  4. Declare the knobs in TUNING_SPECS.mtplx with applies: 'launch' + cli: '--flag', and register mtplx in LAUNCH_APPLIERS (server/services/localModelAssessments.js). Move the ids out of RETIRED_SPECS so old readings and new ones share one label.
  5. Guard test: the existing localModelTuning.test.js transport check already fails a knob with no transport; add an assertion that every runtime in LAUNCH_APPLIERS covers the launch knobs its catalog declares.

Out of scope

vLLM stays knob-less. PortOS does not start it — it is a container from the shipped compose stack — so there is no launch line to put a flag on. Giving vLLM real knobs means PortOS managing that container's lifecycle, which is its own decision and its own issue.

Acceptance

  • Tuning an MTPLX model relaunches mtplx serve with the flags on its command line, and the assessment records tuningApplied: true.
  • A launch line MTPLX rejects records tuningApplied: false with the reason, and the previous configuration is back up before the measurement is abandoned.
  • No knob is declared without a transport that renders it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestplanTracked by /do:replan

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions