Skip to content

bench_openai: completion cell returns empty text unless serve runs with --no-thinking; MLX server ignores ignore_eos #46

Closed

Description

@Defilan

Two small things I hit reproducing the README's M5 Max numbers (seen on 0.3.4 2f8e514, still the case on main bb4b4a3).

1. The fibonacci-raw cell gets no text against a default serve. /v1/completions applies the chat template, and with thinking on by default the whole reply lands in the think block, which the endpoint drops. The response reports completion_tokens: 64 with "text": "", and bench_openai.py then crashes on first - start with None. The script only disables thinking for the chat cell, so the README numbers presumably came from serve --no-thinking. Either say that in the Speed section and the script docstring, or send chat_template_kwargs on the completion cell too.

tensorfold serve Vontra/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit --context 65536
curl -s localhost:8080/v1/completions -H 'Content-Type: application/json' \
  -d '{"model":"x","prompt":"def fib(n):","max_tokens":16}'
# -> "text": "", "completion_tokens": 16

2. ignore_eos only works on the GLM CUDA engine. bench_openai.py sends it, and families/glm5_next/cuda/app.py honors it, but the MLX server (src/tensorfold/server/) doesn't read it, so replies stop at EOS. That's harmless at 64 tokens, but longer runs end early; a short Go edit prompt stopped at 33-35 tokens on both Nemotron and Qwen3.8-27B. Honoring it in the MLX server would keep token counts comparable across engines.

Happy to send a PR for either if you'd like.

Activity

  1. ashhart commented on Sep 27, 2026

    @ashhart
    Owner

    Thanks @Defilan. The first part is fixed in 0.3.5, which ships tonight: /v1/completions reads the prompt raw, with no chat template and no thinking split, so the completion cell returns its text without --no-thinking. ignore_eos is a fair ask for benchmark parity with vLLM, and we're adding it to the Mac server now. This issue closes when the release is published.

  2. Defilan commented on Sep 27, 2026

    @Defilan
    ContributorAuthor

    Awesome! Thanks for the quick turnaround. Happy to help contribute anywhere you need some extra hands, this is definitely an exciting project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions