Skip to content

feat(flm): add --modelscope flag to FLM backend - #2841

Open
wariobot09 wants to merge 1 commit into
mainfrom
pr-2643
Open

feat(flm): add --modelscope flag to FLM backend#2841
wariobot09 wants to merge 1 commit into
mainfrom
pr-2643

Conversation

@wariobot09

@wariobot09 wariobot09 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add --modelscope BOOL option to the FLM backend descriptor. When set to 1, passes --modelscope 1 to flm pull, flm list, and flm installed-checkpoints CLI calls to resolve models from ModelScope (https://modelscope.cn) instead of HuggingFace.

Changes

  • fastflowlm.h: Add modelscope BOOL option to FLM backend descriptor (defaults to "0")
  • fastflowlm_server.h: Add modelscope parameter to download_model() signature
  • fastflowlm_server.cpp: Read modelscope option in load() and pass to download_model()
  • docs/dev/backends-reference.md: Document the new modelscope option in FLM backend table
  • docs/guide/cli.md: Document the new modelscope option in CLI reference

Usage

Users can enable ModelScope downloads in their config.json:

{
  "flm": {
    "args": "",
    "modelscope": 1,
    "prefer_system": false
  }
}

Note: FLM expects 0/1 (not true/false) for the --modelscope flag.

This requires FLM ≥ v0.9.46 which introduces the --modelscope flag.

@github-actions github-actions Bot added engine::flm FastFlowLM backend (NPU); multi-modal LLM/ASR/embeddings/reranking enhancement New feature or request documentation Improvements or additions to documentation labels Jul 29, 2026
@wariobot09
wariobot09 force-pushed the pr-2643 branch 4 times, most recently from 3bd403c to 7ed53fd Compare July 29, 2026 03:35
@superm1
superm1 requested a review from ZaneNi July 29, 2026 03:36
@jeremyfowers

Copy link
Copy Markdown
Member

Looks like CI found some problem? Please have a look.

I made a 1LoC PR here for the version bump, to try and get it into today's release: #2847

We will still need this PR for the modelscope support!

@superm1

superm1 commented Jul 29, 2026

Copy link
Copy Markdown
Member

Looks like CI found some problem? Please have a look.

I made a 1LoC PR here for the version bump, to try and get it into today's release: #2847

We will still need this PR for the modelscope support!

I think Hermes messed up and passed --modelscope to flm serve. Let's see if this is clean now.

- Add --modelscope BOOL option to FLM backend descriptor
- Wire --modelscope flag through download_model() to pass to 'flm pull
  --modelscope 1' (uses '1' not 'true' since FLM expects 0/1)

The modelscope option (requires FLM >= v0.9.46) makes FLM resolve models
from ModelScope (https://modelscope.cn) instead of HuggingFace, using
the model's ms_url field.
@superm1

superm1 commented Jul 30, 2026

Copy link
Copy Markdown
Member

@jeremyfowers modelscope should be fixed now, can you have another look please?

@superm1 superm1 changed the title feat(flm): bump to v0.9.46 and add modelscope config option feat(flm): Add modelscope config option for FLM Jul 30, 2026
@jeremyfowers

Copy link
Copy Markdown
Member

omg is wariobot your bot? 😂

@jeremyfowers

Copy link
Copy Markdown
Member

[AI-assisted review] Automated pre-review from repo-manager — flags for the human reviewer, not a replacement for one.

Attention level: Elevated — any reviewer can take it, but the to-dos below need resolving before approval (PR description does not match the diff)

Author's description vs. the diff

The description overstates the scope of changes and references a file that was not modified.

  • Remove the reference to docs/guide/configuration/README.md from the PR description, or add the config README update to the PR.
    • Described: docs/guide/configuration/README.md is updated with modelscope in the config example JSON and FLM options table.
    • In the diff: docs/guide/configuration/README.md is not among the five changed files in the diff.
    • Reference: The PR description lists docs/guide/configuration/README.md under the Documentation section, but the file list shows only docs/dev/backends-reference.md, docs/guide/cli.md, and three C++ files.
  • Update the PR description to remove the claim that --modelscope is passed to flm serve.
    • Described: The --modelscope flag is passed to both flm pull and flm serve commands.
    • In the diff: The flag is only passed to download_model(), which is used for flm pull; no code in the diff passes --modelscope to the flm serve path.
    • Reference: fastflowlm_server.cpp adds --modelscope to args only inside the download_model() function; the load() function calls download_model() but does not pass --modelscope to the serve command.

Scope

minor — The PR adds a single BOOL option to the existing FLM backend descriptor with 16 lines of additions across 5 files — a contained extension of an existing surface.

Suggested reviewers

  • bitgamma (CLI) — The PR adds a CLI flag and updates docs/guide/cli.md.
  • jeremyfowers (Adding new backends) — The PR modifies the FLM backend descriptor and server implementation.
  • ramkrishna2910 (Adding new backends) — The PR adds a backend option to the FastFlowLM backend.

Reviewed at head 919d813 by repo-manager pr-review. Regenerate with repo-manager review-pr 2841.

@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.

see bot review

@wariobot09 wariobot09 closed this Jul 31, 2026
@superm1 superm1 reopened this Jul 31, 2026
@wariobot09 wariobot09 changed the title feat(flm): Add modelscope config option for FLM feat(flm): add --modelscope flag to FLM backend Jul 31, 2026
@lemonade-sdk lemonade-sdk deleted a comment from wariobot09 Jul 31, 2026
@superm1
superm1 requested a review from jeremyfowers July 31, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation engine::flm FastFlowLM backend (NPU); multi-modal LLM/ASR/embeddings/reranking enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants