feat: add MiniCPM5-1B model support#5010
Conversation
|
Thanks, there is conflict, could you resolve it? |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the MiniCPM5-1B model, adds compatibility shims for older xoscar versions (<= 0.9.6), updates MLX tokenizer handling, and refactors the Gradio chat interface to support hybrid reasoning and prevent state desync. The feedback suggests logging a warning when dropping the 'start_python' parameter on older xoscar versions, safely handling cases where '_eos_token_ids' is a list in MLX tokenizers, and safely accessing response choices in the Gradio interface. Additionally, it is recommended to update the documented abilities of MiniCPM5-1B to include 'reasoning' and 'hybrid' to ensure consistency with its hybrid thinking features.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Actually, you only need to modify llm_family.json, doc file changes will be made by bot automatically. |
bcdb6b4 to
6e4750e
Compare
Hi @qinxuye, thanks for the quick review! I have rebased onto the latest main to resolve the conflict in xinference/core/worker.py , and reverted my manual changes to doc/source/models/builtin/llm/* so that the doc bot can regenerate them automatically. |
|
pre-commit failed, could you fix it accordingly? thanks. |
6e4750e to
90fb227
Compare
Thanks for the patience @qinxuye! I missed running pre-commit run --all-files last time and only ran it on the changed files, so mypy errors slipped through. Just fixed them in chat_interface.py (renamed the reused choices variable and properly narrowed the message type for mypy) and verified pre-commit run --all-files passes locally — all hooks (black / flake8 / isort / mypy / codespell) are green now. PTAL 🙏 |
90fb227 to
c0d3969
Compare
3960e0e to
2b8be4e
Compare
2b8be4e to
15b6e06
Compare
Register MiniCPM5-1B model in llm_family.json with pytorch, ggufv2 and mlx formats. Add reasoning/hybrid/tool-call abilities, chat template, and virtualenv dependencies for Transformers/MLX/llama.cpp/vLLM/SGLang engines. Also add Gradio UI changes to surface reasoning_content in the chat bubble and MLX tokenizer eos_token_ids type guard for transformers 5.x compatibility.
15b6e06 to
b7f9246
Compare
Register MiniCPM5-1B model in llm_family.json with pytorch, ggufv2 and mlx formats. Add reasoning/hybrid/tool-call abilities, chat template, and virtualenv dependencies for Transformers/MLX/llama.cpp/vLLM/SGLang engines. Fix xoscar compatibility (wait_for, start_python, daemon process), Gradio UI reasoning content display, and MLX tokenizer loading. Add model documentation.