[BUG] `mx.qqmm` docs: the Args section names `global_scale`, but the parameter is `global_scale_x`

Open Beginner friendly
#4,815 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@Redempt1onzzZZ is already working on this.

Since Nov 2, 2026.

  • #4817 by @Redempt1onzzZZ — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, python
Domain
documentation

Research direction

Start at the mx.qqmm docstring entry in python/src/ops.cpp near line 6285 and compare it with the global_scale_x binding near line 6246. Correct the Args entry so its name matches the signature and accepted keyword argument. Run the issue’s Python reproduction to confirm that the documentation names global_scale_x and that no misleading global_scale entry remains.

Written by the indexing model from the issue text.

Description

☑️ I understand it is strictly prohibited to use AI to write issues.

Describe the bug
In the docstring of mx.qqmm, the signature line uses global_scale_x, but the Args section documents global_scale (array, optional): The per-input float32 scale used for x .... Passing global_scale= raises TypeError. The next entry, global_scale_w, is named correctly.

To Reproduce

Include code snippet

import mlx.core as mx

doc = mx.qqmm.__doc__
print("global_scale_x" in doc.splitlines()[0])   # signature line uses global_scale_x
print([l.strip()[:40] for l in doc.splitlines() if "global_scale" in l and "(array" in l])

x = mx.ones((1, 64))
w = mx.ones((64, 64))
mx.qqmm(x, w, global_scale=None)     # name taken from the Args section

Output:

True
['global_scale (array, optional): The per-', 'global_scale_w (array, optional): The pe']
TypeError: qqmm(): incompatible function arguments. The following argument types are supported:
    1. qqmm(x: array, w: array, scales: array | None = None, group_size: int | None = None, bits: int | None = None, mode: str = 'nvfp4', global_scale_x: array | None = None, global_scale_w: array | None = None, *, stream: StreamOrDevice = None) -> array

Invoked with types: mlx.core.array, mlx.core.array, kwargs = { global_scale: NoneType }

Expected behavior
The Args entry is named global_scale_x, matching the signature and the binding.

Desktop (please complete the following information):

  • OS Version: macOS 26.6.2 (arm64)
  • Version: mlx 0.32.4

Additional context
Args entry: python/src/ops.cpp:6285; binding argument global_scale_x: python/src/ops.cpp:6246.

Dominant language
C++
Stars
29k
Forks
2.4k
Avg merge
3d 8h
Merged PRs (30d)
111

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ml-explore/mlx

All issues in ml-explore/mlx

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.