[BUG] `mx.qqmm` docs: the Args section names `global_scale`, but the parameter is `global_scale_x`
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ml-explore/mlx
-
[BUG] Documented signatures of `mx.add` and 27 other ops omit the keyword-only `*`, so `stream` (and `equal_nan`) cannot be passed positionally as documentedPossibly taken @Redempt1onzzZZ claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ml-explore/mlx#4814 ·
Maintainers usually reply within 2 days
-
[BUG] FP4 quantization on CPU rounds ties toward zero while Metal rounds to evenPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ml-explore/mlx#4753 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ml-explore/mlx#4819 ·
Maintainers usually reply within 2 days
-
[BUG] Metal scaled_dot_product_attention is ~300x less accurate for 2-8 query tokens at 33-128 stacked rows since #4723 (sdpa_split)Possibly taken @STRML claimed this 2 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 22/100
ml-explore/mlx#4808 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
ml-explore/mlx#4806 ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
arduino/ArduinoCore-megaavr#152 ·
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/microsoft-ui-xaml#12515 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mw00/project-maya#798 ·
Maintainers usually reply within 1 day