Skip to content

Add support for passing custom arguments to FLM backend through --flm-args - #1235

Merged
jeremyfowers merged 1 commit into
lemonade-sdk:mainfrom
Jays-1111:jays/add_flm-args
Mar 2, 2026
Merged

jeremyfowers merged 1 commit into
lemonade-sdk:mainfrom
Jays-1111:jays/add_flm-args

Conversation

@Jays-1111

Copy link
Copy Markdown
Collaborator

Motivation:

  • FLM supports -s (socket count) and -q (queue length) for concurrency control.
  • Certain AI agent scenarios require higher concurrency than the default FLM settings, but there was previously no way to configure these options through lemonade-server, causing agents to fail under load.

Changes:

  • recipe_options.cpp: Add flm_args default, CLI option (LEMONADE_FLM_ARGS), recipe key
  • fastflowlm_server.cpp: Read, parse and append flm_args to FLM command

Usage: lemonade-server serve --flm-args "-s 20 -q 15"

Comment thread src/cpp/server/backends/fastflowlm_server.cpp

@jeremyfowers jeremyfowers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested locally and it works for me!

Please see comment about documentation.

Also we could support passing FLM arguments via the GUI like we do for llamacpp:

Image

Please open an issue for a followup if you think that is a good idea!

…-args.

Motivation:
- FLM supports -s (socket) and -q (queue length) for concurrency control
- No previous way to configure these through lemonade-server

Changes:
- recipe_options.cpp: Add flm_args default, CLI option (LEMONADE_FLM_ARGS), recipe key
- fastflowlm_server.cpp: Read, parse and append flm_args to FLM command

Usage: lemonade-server serve --flm-args "-s 20 -q 15"
@Jays-1111
Jays-1111 force-pushed the jays/add_flm-args branch from 8164c13 to 3572f4f Compare March 2, 2026 02:46
@Jays-1111

Copy link
Copy Markdown
Collaborator Author

@jeremyfowers Great! I've already updated the doc. For the function of the GUI, I haven't used this feature before, but I think it's a good idea. I'll look into it separately later.

@jeremyfowers jeremyfowers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the improvement @Jays-1111 !

@jeremyfowers
jeremyfowers added this pull request to the merge queue Mar 2, 2026
Merged via the queue into lemonade-sdk:main with commit 03bba6d Mar 2, 2026
34 checks passed
meghsat pushed a commit that referenced this pull request Jul 10, 2026
…-args. (#1235)

Motivation:
- FLM supports -s (socket) and -q (queue length) for concurrency control
- No previous way to configure these through lemonade-server

Changes:
- recipe_options.cpp: Add flm_args default, CLI option (LEMONADE_FLM_ARGS), recipe key
- fastflowlm_server.cpp: Read, parse and append flm_args to FLM command

Usage: lemonade-server serve --flm-args "-s 20 -q 15"

Co-authored-by: Jays <jsong102@amd.com>
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.

3 participants