ml-explore / ml-explore/mlx-lm
Allow structured generation through "response_format" in mlx_server
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 1.1k
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 54
Description
Currently passing response_format into client.chat.completions.create after starting a mlx_server returns an empty output (not even an error, which makes it harder to catch).
Can we integrate outlines (or something similar) and generate structured outputs? While still maintaining continuous batching and parallel decoding?
Outlines supports basic generate already.
https://dottxt-ai.github.io/outlines/latest/features/models/mlxlm/
Contributor 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.
Research direction
Start at the mlx_server handling behind client.chat.completions.create and trace how response_format is currently processed. Review the linked Outlines MLXLM support, then determine whether structured generation can preserve continuous batching and parallel decoding; done means response_format produces structured output or a clear error instead of an empty response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100