Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8a7a4143
Unverified
Commit
8a7a4143
authored
Dec 20, 2025
by
Yuxuan Zhang
Committed by
GitHub
Dec 20, 2025
Browse files
GLM-4.7 Tool Parser and Doc Update (#30876)
Signed-off-by:
zRzRzRzRzRzRzR
<
2448370773@qq.com
>
parent
95befecc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
docs/features/tool_calling.md
docs/features/tool_calling.md
+8
-1
docs/models/supported_models.md
docs/models/supported_models.md
+1
-1
vllm/model_executor/models/glm4_moe.py
vllm/model_executor/models/glm4_moe.py
+2
-1
vllm/tool_parsers/__init__.py
vllm/tool_parsers/__init__.py
+4
-0
vllm/tool_parsers/glm47_moe_tool_parser.py
vllm/tool_parsers/glm47_moe_tool_parser.py
+23
-0
No files found.
docs/features/tool_calling.md
View file @
8a7a4143
...
@@ -352,10 +352,17 @@ Supported models:
...
@@ -352,10 +352,17 @@ Supported models:
*
`zai-org/GLM-4.5`
*
`zai-org/GLM-4.5`
*
`zai-org/GLM-4.5-Air`
*
`zai-org/GLM-4.5-Air`
*
`zai-org/GLM-4.6`
*
`zai-org/GLM-4.6`
*
`zai-org/GLM-4.6-Air`
Flags:
`--tool-call-parser glm45`
Flags:
`--tool-call-parser glm45`
### GLM-4.7 Models (`glm47`)
Supported models:
*
`zai-org/GLM-4.7`
Flags:
`--tool-call-parser glm47`
### Qwen3-Coder Models (`qwen3_xml`)
### Qwen3-Coder Models (`qwen3_xml`)
Supported models:
Supported models:
...
...
docs/models/supported_models.md
View file @
8a7a4143
...
@@ -387,7 +387,7 @@ th {
...
@@ -387,7 +387,7 @@ th {
|
`Gemma3nForCausalLM`
| Gemma 3n |
`google/gemma-3n-E2B-it`
,
`google/gemma-3n-E4B-it`
, etc. | | |
|
`Gemma3nForCausalLM`
| Gemma 3n |
`google/gemma-3n-E2B-it`
,
`google/gemma-3n-E4B-it`
, etc. | | |
|
`GlmForCausalLM`
| GLM-4 |
`zai-org/glm-4-9b-chat-hf`
, etc. | ✅︎ | ✅︎ |
|
`GlmForCausalLM`
| GLM-4 |
`zai-org/glm-4-9b-chat-hf`
, etc. | ✅︎ | ✅︎ |
|
`Glm4ForCausalLM`
| GLM-4-0414 |
`zai-org/GLM-4-32B-0414`
, etc. | ✅︎ | ✅︎ |
|
`Glm4ForCausalLM`
| GLM-4-0414 |
`zai-org/GLM-4-32B-0414`
, etc. | ✅︎ | ✅︎ |
|
`Glm4MoeForCausalLM`
| GLM-4.5, GLM-4.6 |
`zai-org/GLM-4.5`
, etc. | ✅︎ | ✅︎ |
|
`Glm4MoeForCausalLM`
| GLM-4.5, GLM-4.6
, GLM-4.7
|
`zai-org/GLM-4.5`
, etc. | ✅︎ | ✅︎ |
|
`GPT2LMHeadModel`
| GPT-2 |
`gpt2`
,
`gpt2-xl`
, etc. | | ✅︎ |
|
`GPT2LMHeadModel`
| GPT-2 |
`gpt2`
,
`gpt2-xl`
, etc. | | ✅︎ |
|
`GPTBigCodeForCausalLM`
| StarCoder, SantaCoder, WizardCoder |
`bigcode/starcoder`
,
`bigcode/gpt_bigcode-santacoder`
,
`WizardLM/WizardCoder-15B-V1.0`
, etc. | ✅︎ | ✅︎ |
|
`GPTBigCodeForCausalLM`
| StarCoder, SantaCoder, WizardCoder |
`bigcode/starcoder`
,
`bigcode/gpt_bigcode-santacoder`
,
`WizardLM/WizardCoder-15B-V1.0`
, etc. | ✅︎ | ✅︎ |
|
`GPTJForCausalLM`
| GPT-J |
`EleutherAI/gpt-j-6b`
,
`nomic-ai/gpt4all-j`
, etc. | | ✅︎ |
|
`GPTJForCausalLM`
| GPT-J |
`EleutherAI/gpt-j-6b`
,
`nomic-ai/gpt4all-j`
, etc. | | ✅︎ |
...
...
vllm/model_executor/models/glm4_moe.py
View file @
8a7a4143
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
"""Inference-only GLM-4.5, GLM-4.6 model compatible with HuggingFace weights."""
"""Inference-only GLM-4.5, GLM-4.6, GLM-4.7 model
compatible with HuggingFace weights."""
import
typing
import
typing
from
collections.abc
import
Callable
,
Iterable
from
collections.abc
import
Callable
,
Iterable
...
...
vllm/tool_parsers/__init__.py
View file @
8a7a4143
...
@@ -42,6 +42,10 @@ _TOOL_PARSERS_TO_REGISTER = {
...
@@ -42,6 +42,10 @@ _TOOL_PARSERS_TO_REGISTER = {
"glm4_moe_tool_parser"
,
"glm4_moe_tool_parser"
,
"Glm4MoeModelToolParser"
,
"Glm4MoeModelToolParser"
,
),
),
"glm47"
:
(
"glm47_moe_tool_parser"
,
"Glm47MoeModelToolParser"
,
),
"granite-20b-fc"
:
(
"granite-20b-fc"
:
(
"granite_20b_fc_tool_parser"
,
"granite_20b_fc_tool_parser"
,
"Granite20bFCToolParser"
,
"Granite20bFCToolParser"
,
...
...
vllm/tool_parsers/glm47_moe_tool_parser.py
0 → 100644
View file @
8a7a4143
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
regex
as
re
from
vllm.logger
import
init_logger
from
vllm.tokenizers
import
TokenizerLike
from
vllm.tool_parsers.glm4_moe_tool_parser
import
Glm4MoeModelToolParser
logger
=
init_logger
(
__name__
)
class
Glm47MoeModelToolParser
(
Glm4MoeModelToolParser
):
def
__init__
(
self
,
tokenizer
:
TokenizerLike
):
super
().
__init__
(
tokenizer
)
self
.
func_detail_regex
=
re
.
compile
(
r
"<tool_call>(.*?)(<arg_key>.*?)?</tool_call>"
,
re
.
DOTALL
)
self
.
func_arg_regex
=
re
.
compile
(
r
"<arg_key>(.*?)</arg_key>(?:\\n|\s)*<arg_value>(.*?)</arg_value>"
,
re
.
DOTALL
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment