Repository navigation
Conversation
MLX servers report no limits and the profile default is 4096 tokens, which a host system prompt alone can exceed, so hosts trim the user's turn out of the request. The model id of an MLX server is the directory the weights were loaded from; read max_position_embeddings (top level or text_config) from its config.json. An explicit window still wins, and anything unreadable falls back to the profile default.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Author
|
Closing: the host will handle this on its side. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MLX servers (mlx_lm, mlx_vlm) report no model limits, so the local profile falls back to 4096 tokens. A host system prompt alone can exceed that (about 7k tokens in OpenHuman), and the host then trims the user's turn out of the request; the model answers a placeholder prompt, loops and calls tools nobody asked for.
The model id of an MLX server is the directory the weights were loaded from. For
Mlx/Omlx,context_window_with_local_fallbacknow readsmax_position_embeddingsfrom that directory'sconfig.json(top level ortext_config) when no explicit window is given. Unreadable or missing values fall back to the profile default; other runtimes are unchanged.The value is the model's trained maximum, not what the host's memory can hold. A host that knows better passes an explicit window.
Verification
cargo test -p tinyinference-local --lib profile: 9 passed (2 new)cargo fmt --all -- --check,cargo clippy -p tinyinference-local --all-targets -- -D warnings: clean