Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cd9019c
Initial plugin design
michalk8 Nov 19, 2026
cb81479
Clean-up README.md, better structure
michalk8 Nov 19, 2026
2c230a9
More tests, fix no preprocessor
michalk8 Nov 19, 2026
ce88ee3
Load first built-in, then extra, check for metadata errors
michalk8 Nov 20, 2026
b2b9e7c
Move to a plugin/ directory
michalk8 Nov 20, 2026
548f0a8
Better error messages
michalk8 Nov 20, 2026
3113601
Prune readme.md, add experimental note
michalk8 Nov 20, 2026
db32212
Expose think start/end in tokenizer wrapper
michalk8 Nov 20, 2026
8996170
Better processor handling
michalk8 Nov 20, 2026
635c623
Clean-up code, tests
michalk8 Nov 20, 2026
5d01b37
Rename `Kind` -> `PluginKind`
michalk8 Nov 20, 2026
9523296
Folder without __init__
michalk8 Nov 20, 2026
9c0034e
Better error message when duplicates are found
michalk8 Nov 20, 2026
873c4eb
Take think start/end tokens only from 1 source
michalk8 Nov 20, 2026
dd77093
Fix arch remapping
michalk8 Nov 23, 2026
e1053ca
Make MODEL_REMAPPING, etc. again a plain dict + re-export
michalk8 Nov 23, 2026
a46743b
Simplify load processor
michalk8 Nov 23, 2026
b75b550
Improve typing/docstrings
michalk8 Nov 23, 2026
44cff9b
Redesign
michalk8 Nov 23, 2026
4713ec3
model_args
michalk8 Nov 24, 2026
d3409aa
Simplify the code
michalk8 Nov 24, 2026
56bd0b4
Prune comments/docs
michalk8 Nov 24, 2026
41bdde0
Update readme
michalk8 Nov 24, 2026
9073bff
Simplify check
michalk8 Nov 24, 2026
7ca480f
Prune readme some more
michalk8 Nov 24, 2026
bb8f038
Plugin list/check
michalk8 Nov 24, 2026
2d1e197
Clean-up plugins
michalk8 Nov 24, 2026
3a5ca0b
Update README.md
michalk8 Nov 24, 2026
d01451d
More tests
michalk8 Nov 24, 2026
2ff3efd
Clean-up plugin code
michalk8 Nov 24, 2026
594b8c6
Use `mlx_lm plugin list`
michalk8 Nov 24, 2026
89e41b1
Simplify the API
michalk8 Nov 24, 2026
17342d8
Drop the enum
michalk8 Nov 24, 2026
d904fb2
List plugins, move to_json
michalk8 Nov 24, 2026
db8dfa9
Rename to registry
michalk8 Nov 24, 2026
2ed0238
Use any for a builtin
michalk8 Nov 24, 2026
d4a6ec1
Make some methods private
michalk8 Nov 24, 2026
c526dbe
or "" for sorting (no Name in metadata)
michalk8 Nov 24, 2026
28b7c21
Helper fn to load tool parser
michalk8 Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use mlx_lm plugin list
  • Loading branch information
michalk8 committed Nov 24, 2026
commit 594b8c6032d4f05e3fcc563895f9b39a5e527262
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ class body, where `ModelArgs.from_dict(config)` makes its arguments from
A checkpoint sets its tool parser and thinking markers in
`tokenizer_config.json` with `tool_parser_type`, `think_start` and `think_end`.

`mlx_lm plugins list` shows the plug-ins of each project, and an error under
each one that mlx-lm cannot use, for example because a built-in has the same
name.
`mlx_lm plugin list` shows the plug-ins of each project, and an error under each
one that mlx-lm cannot use, for example because a built-in has the same name.

### Large Models

Expand Down
4 changes: 2 additions & 2 deletions mlx_lm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main():
"lora",
"manage",
"perplexity",
"plugins",
"plugin",
"awq",
"dwq",
"dynamic_quant",
Expand All @@ -32,7 +32,7 @@ def main():
"dwq": "quant.dwq",
"dynamic_quant": "quant.dynamic_quant",
"gptq": "quant.gptq",
"plugins": "plugins.cli",
"plugin": "plugins.cli",
}
if len(sys.argv) < 2:
raise ValueError(f"CLI requires a subcommand in {subcommands}")
Expand Down
4 changes: 2 additions & 2 deletions mlx_lm/plugins/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _render(plugins: list[Plugin]) -> str:


def build_parser() -> argparse.ArgumentParser:
"""The parser of ``mlx_lm plugins``."""
"""The parser of ``mlx_lm plugin``."""
parser = argparse.ArgumentParser(description="Commands for the plug-ins.")
commands = parser.add_subparsers(dest="command", required=True)

Expand All @@ -67,7 +67,7 @@ def build_parser() -> argparse.ArgumentParser:


def main(argv: list[str] | None = None) -> None:
"""Run ``mlx_lm plugins`` with ``argv`` (default: the command line)."""
"""Run ``mlx_lm plugin`` with ``argv`` (default: the command line)."""
args = build_parser().parse_args(argv)

if args.command == "list":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ mlx_lm = "mlx_lm.cli:main"
"mlx_lm.generate" = "mlx_lm.generate:main"
"mlx_lm.lora" = "mlx_lm.lora:main"
"mlx_lm.perplexity" = "mlx_lm.perplexity:main"
"mlx_lm.plugins" = "mlx_lm.plugins.cli:main"
"mlx_lm.plugin" = "mlx_lm.plugins.cli:main"
"mlx_lm.server_v2" = "mlx_lm.server_v2.cli:main"
"mlx_lm.server" = "mlx_lm.server:main"
"mlx_lm.share" = "mlx_lm.share:main"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def write_metadata(self, name: str, entry_points_text: str) -> None:
importlib.invalidate_caches()

def run_command(self, *args: str) -> tuple[int, str]:
"""The exit code and output of ``mlx_lm plugins`` with ``args``."""
"""The exit code and output of ``mlx_lm plugin`` with ``args``."""
output = io.StringIO()
code = 0
with redirect_stdout(output):
Expand Down