A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Misc] Modify the organization of GLM series (#22171)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Jee Jee Li committed
Aug 4, 2025 at 14:51 UTC
a7b8788d2c2fae6bf52c128916de19e85f2b0a25
16 files changed
+31
-31
docs/models/supported_models.md
+5
-5
@@ -328,7 +328,7 @@ th {
328
| `BambaForCausalLM` | Bamba | `ibm-ai-platform/Bamba-9B-fp8`, `ibm-ai-platform/Bamba-9B` | ✅︎ | ✅︎ | ✅︎ |
329
| `BloomForCausalLM` | BLOOM, BLOOMZ, BLOOMChat | `bigscience/bloom`, `bigscience/bloomz`, etc. | | ✅︎ | |
330
| `BartForConditionalGeneration` | BART | `facebook/bart-base`, `facebook/bart-large-cnn`, etc. | | | |
331
-| `ChatGLMModel`, `ChatGLMForConditionalGeneration` | ChatGLM | `THUDM/chatglm2-6b`, `THUDM/chatglm3-6b`, `ShieldLM-6B-chatglm3`, etc. | ✅︎ | ✅︎ | ✅︎ |
331
+| `ChatGLMModel`, `ChatGLMForConditionalGeneration` | ChatGLM | `zai-org/chatglm2-6b`, `zai-org/chatglm3-6b`, `ShieldLM-6B-chatglm3`, etc. | ✅︎ | ✅︎ | ✅︎ |
332
| `CohereForCausalLM`, `Cohere2ForCausalLM` | Command-R | `CohereForAI/c4ai-command-r-v01`, `CohereForAI/c4ai-command-r7b-12-2024`, etc. | ✅︎ | ✅︎ | ✅︎ |
333
| `DbrxForCausalLM` | DBRX | `databricks/dbrx-base`, `databricks/dbrx-instruct`, etc. | | ✅︎ | ✅︎ |
334
| `DeciLMForCausalLM` | DeciLM | `nvidia/Llama-3_3-Nemotron-Super-49B-v1`, etc. | ✅︎ | ✅︎ | ✅︎ |
@@ -348,8 +348,8 @@ th {
348
| `Gemma2ForCausalLM` | Gemma 2 | `google/gemma-2-9b`, `google/gemma-2-27b`, etc. | ✅︎ | ✅︎ | ✅︎ |
349
| `Gemma3ForCausalLM` | Gemma 3 | `google/gemma-3-1b-it`, etc. | ✅︎ | ✅︎ | ✅︎ |
350
| `Gemma3nForConditionalGeneration` | Gemma 3n | `google/gemma-3n-E2B-it`, `google/gemma-3n-E4B-it`, etc. | | | ✅︎ |
351
-| `GlmForCausalLM` | GLM-4 | `THUDM/glm-4-9b-chat-hf`, etc. | ✅︎ | ✅︎ | ✅︎ |
352
-| `Glm4ForCausalLM` | GLM-4-0414 | `THUDM/GLM-4-32B-0414`, etc. | ✅︎ | ✅︎ | ✅︎ |
351
+| `GlmForCausalLM` | GLM-4 | `zai-org/glm-4-9b-chat-hf`, etc. | ✅︎ | ✅︎ | ✅︎ |
352
+| `Glm4ForCausalLM` | GLM-4-0414 | `zai-org/GLM-4-32B-0414`, etc. | ✅︎ | ✅︎ | ✅︎ |
353
| `GPT2LMHeadModel` | GPT-2 | `gpt2`, `gpt2-xl`, etc. | | ✅︎ | ✅︎ |
354
| `GPTBigCodeForCausalLM` | StarCoder, SantaCoder, WizardCoder | `bigcode/starcoder`, `bigcode/gpt_bigcode-santacoder`, `WizardLM/WizardCoder-15B-V1.0`, etc. | ✅︎ | ✅︎ | ✅︎ |
355
| `GPTJForCausalLM` | GPT-J | `EleutherAI/gpt-j-6b`, `nomic-ai/gpt4all-j`, etc. | | ✅︎ | ✅︎ |
@@ -589,8 +589,8 @@ See [this page](generative_models.md) for more information on how to use generat
589
| `Florence2ForConditionalGeneration` | Florence-2 | T + I | `microsoft/Florence-2-base`, `microsoft/Florence-2-large`, etc. | | | |
590
| `FuyuForCausalLM` | Fuyu | T + I | `adept/fuyu-8b`, etc. | | ✅︎ | ✅︎ |
591
| `Gemma3ForConditionalGeneration` | Gemma 3 | T + I<sup>+</sup> | `google/gemma-3-4b-it`, `google/gemma-3-27b-it`, etc. | ✅︎ | ✅︎ | ⚠️ |
592
-| `GLM4VForCausalLM`<sup>^</sup> | GLM-4V | T + I | `THUDM/glm-4v-9b`, `THUDM/cogagent-9b-20241220`, etc. | ✅︎ | ✅︎ | ✅︎ |
593
-| `Glm4vForConditionalGeneration` | GLM-4.1V-Thinking | T + I<sup>E+</sup> + V<sup>E+</sup> | `THUDM/GLM-4.1V-9B-Thinking`, etc. | ✅︎ | ✅︎ | ✅︎ |
592
+| `GLM4VForCausalLM`<sup>^</sup> | GLM-4V | T + I | `zai-org/glm-4v-9b`, `zai-org/cogagent-9b-20241220`, etc. | ✅︎ | ✅︎ | ✅︎ |
593
+| `Glm4vForConditionalGeneration` | GLM-4.1V-Thinking | T + I<sup>E+</sup> + V<sup>E+</sup> | `zai-org/GLM-4.1V-9B-Thinking`, etc. | ✅︎ | ✅︎ | ✅︎ |
594
| `Glm4MoeForCausalLM` | GLM-4.5 | T + I<sup>E+</sup> + V<sup>E+</sup> | `zai-org/GLM-4.5`, etc. | ✅︎ | ✅︎ | ✅︎ |
595
| `Glm4v_moeForConditionalGeneration` | GLM-4.5V | T + I<sup>E+</sup> + V<sup>E+</sup> | `zai-org/GLM-4.5V-Air`, etc. | ✅︎ | ✅︎ | ✅︎ |
596
| `GraniteSpeechForConditionalGeneration` | Granite Speech | T + A | `ibm-granite/granite-speech-3.3-8b` | ✅︎ | ✅︎ | ✅︎ |
examples/offline_inference/vision_language.py
+2
-2
@@ -221,7 +221,7 @@ def run_gemma3(questions: list[str], modality: str) -> ModelRequestData:
221
# GLM-4v
222
def run_glm4v(questions: list[str], modality: str) -> ModelRequestData:
223
assert modality == "image"
224
- model_name = "THUDM/glm-4v-9b"
224
+ model_name = "zai-org/glm-4v-9b"
225
226
engine_args = EngineArgs(
227
model=model_name,
@@ -250,7 +250,7 @@ def run_glm4v(questions: list[str], modality: str) -> ModelRequestData:
250
251
# GLM-4.1V
252
def run_glm4_1v(questions: list[str], modality: str) -> ModelRequestData:
253
- model_name = "THUDM/GLM-4.1V-9B-Thinking"
253
+ model_name = "zai-org/GLM-4.1V-9B-Thinking"
254
255
engine_args = EngineArgs(
256
model=model_name,
tests/distributed/test_pipeline_parallel.py
+2
-2
@@ -154,7 +154,7 @@ TEXT_GENERATION_MODELS = {
154
"baichuan-inc/Baichuan-7B": PPTestSettings.fast(),
155
"baichuan-inc/Baichuan2-13B-Chat": PPTestSettings.fast(),
156
"bigscience/bloomz-1b1": PPTestSettings.fast(),
157
- "THUDM/chatglm3-6b": PPTestSettings.fast(),
157
+ "zai-org/chatglm3-6b": PPTestSettings.fast(),
158
"CohereForAI/c4ai-command-r-v01": PPTestSettings.fast(load_format="dummy"),
159
"databricks/dbrx-instruct": PPTestSettings.fast(load_format="dummy"),
160
"Deci/DeciLM-7B-instruct": PPTestSettings.fast(),
@@ -224,7 +224,7 @@ MULTIMODAL_MODELS = {
224
"Salesforce/blip2-opt-6.7b": PPTestSettings.fast(),
225
"facebook/chameleon-7b": PPTestSettings.fast(),
226
"adept/fuyu-8b": PPTestSettings.fast(),
227
- "THUDM/glm-4v-9b": PPTestSettings.fast(),
227
+ "zai-org/glm-4v-9b": PPTestSettings.fast(),
228
"OpenGVLab/InternVL2-1B": PPTestSettings.fast(),
229
"llava-hf/llava-1.5-7b-hf": PPTestSettings.fast(),
230
"llava-hf/llava-v1.6-mistral-7b-hf": PPTestSettings.fast(),
tests/lora/test_add_lora.py
+1
-1
@@ -14,7 +14,7 @@ from vllm.lora.request import LoRARequest
14
from vllm.sampling_params import SamplingParams
15
from vllm.utils import merge_async_iterators
16
17
-MODEL_PATH = "THUDM/chatglm3-6b"
17
+MODEL_PATH = "zai-org/chatglm3-6b"
18
LORA_RANK = 64
19
DEFAULT_MAX_LORAS = 4 * 3
20
tests/lora/test_chatglm3_tp.py
+1
-1
@@ -6,7 +6,7 @@ from vllm.lora.request import LoRARequest
6
7
from ..utils import create_new_process_for_each_test, multi_gpu_test
8
9
-MODEL_PATH = "THUDM/chatglm3-6b"
9
+MODEL_PATH = "zai-org/chatglm3-6b"
10
11
PROMPT_TEMPLATE = """I want you to act as a SQL terminal in front of an example database, you need only to return the sql command to me.Below is an instruction that describes a task, Write a response that appropriately completes the request.\n"\n##Instruction:\nconcert_singer contains tables such as stadium, singer, concert, singer_in_concert. Table stadium has columns such as Stadium_ID, Location, Name, Capacity, Highest, Lowest, Average. Stadium_ID is the primary key.\nTable singer has columns such as Singer_ID, Name, Country, Song_Name, Song_release_year, Age, Is_male. Singer_ID is the primary key.\nTable concert has columns such as concert_ID, concert_Name, Theme, Stadium_ID, Year. concert_ID is the primary key.\nTable singer_in_concert has columns such as concert_ID, Singer_ID. concert_ID is the primary key.\nThe Stadium_ID of concert is the foreign key of Stadium_ID of stadium.\nThe Singer_ID of singer_in_concert is the foreign key of Singer_ID of singer.\nThe concert_ID of singer_in_concert is the foreign key of concert_ID of concert.\n\n###Input:\n{query}\n\n###Response:""" # noqa: E501
12
tests/models/language/generation/test_common.py
+1
-1
@@ -53,7 +53,7 @@ AITER_MODEL_LIST = [
53
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
54
),
55
pytest.param(
56
- "THUDM/chatglm3-6b", # chatglm (text-only)
56
+ "zai-org/chatglm3-6b", # chatglm (text-only)
57
),
58
pytest.param(
59
"meta-llama/Llama-3.2-1B-Instruct", # llama
tests/models/multimodal/generation/test_common.py
+3
-3
@@ -355,7 +355,7 @@ VLM_TEST_SETTINGS = {
355
num_logprobs=10,
356
),
357
"glm4v": VLMTestInfo(
358
- models=["THUDM/glm-4v-9b"],
358
+ models=["zai-org/glm-4v-9b"],
359
test_type=VLMTestType.IMAGE,
360
prompt_formatter=lambda img_prompt: f"<|user|>\n{img_prompt}<|assistant|>", # noqa: E501
361
single_image_prompts=IMAGE_ASSETS.prompts({
@@ -374,7 +374,7 @@ VLM_TEST_SETTINGS = {
374
marks=[large_gpu_mark(min_gb=32)],
375
),
376
"glm4_1v": VLMTestInfo(
377
- models=["THUDM/GLM-4.1V-9B-Thinking"],
377
+ models=["zai-org/GLM-4.1V-9B-Thinking"],
378
test_type=(VLMTestType.IMAGE, VLMTestType.MULTI_IMAGE),
379
prompt_formatter=lambda img_prompt: f"<|user|>\n{img_prompt}<|assistant|>", # noqa: E501
380
img_idx_to_prompt=lambda idx: "<|begin_of_image|><|image|><|end_of_image|>", # noqa: E501
@@ -388,7 +388,7 @@ VLM_TEST_SETTINGS = {
388
marks=[large_gpu_mark(min_gb=32)],
389
),
390
"glm4_1v-video": VLMTestInfo(
391
- models=["THUDM/GLM-4.1V-9B-Thinking"],
391
+ models=["zai-org/GLM-4.1V-9B-Thinking"],
392
# GLM4.1V require include video metadata for input
393
test_type=VLMTestType.CUSTOM_INPUTS,
394
max_model_len=4096,
tests/models/multimodal/processing/test_common.py
+2
-2
@@ -271,8 +271,8 @@ def _test_processing_correctness_one(
271
"microsoft/Florence-2-base",
272
"adept/fuyu-8b",
273
"google/gemma-3-4b-it",
274
- "THUDM/glm-4v-9b",
275
- "THUDM/GLM-4.1V-9B-Thinking",
274
+ "zai-org/glm-4v-9b",
275
+ "zai-org/GLM-4.1V-9B-Thinking",
276
"ibm-granite/granite-speech-3.3-2b",
277
"h2oai/h2ovl-mississippi-800m",
278
"internlm/Intern-S1",
tests/models/multimodal/processing/test_glm4_1v.py
+1
-1
@@ -9,7 +9,7 @@ from vllm.multimodal import MULTIMODAL_REGISTRY
9
from ...utils import build_model_context
10
11
12
-@pytest.mark.parametrize("model_id", ["THUDM/GLM-4.1V-9B-Thinking"])
12
+@pytest.mark.parametrize("model_id", ["zai-org/GLM-4.1V-9B-Thinking"])
13
@pytest.mark.parametrize("expected_toks_per_frame", [299])
14
@pytest.mark.parametrize("num_frames", [32, 128])
15
@pytest.mark.parametrize("fps, expected_grid_t", [(1, 5), (2, 10)])
tests/models/registry.py
+5
-5
@@ -153,7 +153,7 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
153
extras={"tiny": "hmellor/tiny-random-BambaForCausalLM"}), # noqa: E501
154
"BloomForCausalLM": _HfExamplesInfo("bigscience/bloom-560m",
155
{"1b": "bigscience/bloomz-1b1"}),
156
- "ChatGLMModel": _HfExamplesInfo("THUDM/chatglm3-6b",
156
+ "ChatGLMModel": _HfExamplesInfo("zai-org/chatglm3-6b",
157
trust_remote_code=True,
158
max_transformers_version="4.48"),
159
"ChatGLMForConditionalGeneration": _HfExamplesInfo("thu-coai/ShieldLM-6B-chatglm3", # noqa: E501
@@ -187,8 +187,8 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
187
"Gemma3ForCausalLM": _HfExamplesInfo("google/gemma-3-1b-it"),
188
"Gemma3nForConditionalGeneration": _HfExamplesInfo("google/gemma-3n-E2B-it", # noqa: E501
189
min_transformers_version="4.53"),
190
- "GlmForCausalLM": _HfExamplesInfo("THUDM/glm-4-9b-chat-hf"),
191
- "Glm4ForCausalLM": _HfExamplesInfo("THUDM/GLM-4-9B-0414"),
190
+ "GlmForCausalLM": _HfExamplesInfo("zai-org/glm-4-9b-chat-hf"),
191
+ "Glm4ForCausalLM": _HfExamplesInfo("zai-org/GLM-4-9B-0414"),
192
"Glm4MoeForCausalLM": _HfExamplesInfo("zai-org/GLM-4.5",
193
min_transformers_version="4.54"), # noqa: E501
194
"GPT2LMHeadModel": _HfExamplesInfo("openai-community/gpt2",
@@ -380,10 +380,10 @@ _MULTIMODAL_EXAMPLE_MODELS = {
380
"FuyuForCausalLM": _HfExamplesInfo("adept/fuyu-8b"),
381
"Gemma3ForConditionalGeneration": _HfExamplesInfo("google/gemma-3-4b-it"),
382
"GraniteSpeechForConditionalGeneration": _HfExamplesInfo("ibm-granite/granite-speech-3.3-2b"), # noqa: E501
383
- "GLM4VForCausalLM": _HfExamplesInfo("THUDM/glm-4v-9b",
383
+ "GLM4VForCausalLM": _HfExamplesInfo("zai-org/glm-4v-9b",
384
trust_remote_code=True,
385
hf_overrides={"architectures": ["GLM4VForCausalLM"]}), # noqa: E501
386
- "Glm4vForConditionalGeneration": _HfExamplesInfo("THUDM/GLM-4.1V-9B-Thinking"), # noqa: E501
386
+ "Glm4vForConditionalGeneration": _HfExamplesInfo("zai-org/GLM-4.1V-9B-Thinking"), # noqa: E501
387
"Glm4v_moeForConditionalGeneration": _HfExamplesInfo("zai-org/GLM-4.5V-Air",
388
is_available_online=False), # noqa: E501
389
"H2OVLChatModel": _HfExamplesInfo("h2oai/h2ovl-mississippi-800m",
tests/tokenization/test_cached_tokenizer.py
+1
-1
@@ -10,7 +10,7 @@ from vllm.transformers_utils.tokenizer import (AnyTokenizer,
10
get_cached_tokenizer)
11
12
13
-@pytest.mark.parametrize("model_id", ["gpt2", "THUDM/chatglm3-6b"])
13
+@pytest.mark.parametrize("model_id", ["gpt2", "zai-org/chatglm3-6b"])
14
def test_cached_tokenizer(model_id: str):
15
reference_tokenizer = AutoTokenizer.from_pretrained(model_id,
16
trust_remote_code=True)
vllm/model_executor/models/chatglm.py
+3
-3
@@ -1,7 +1,7 @@
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
# Adapted from
4
-# https://github.com/THUDM/ChatGLM2-6B
4
+# https://github.com/zai-org/ChatGLM2-6B
5
"""Inference-only ChatGLM model compatible with THUDM weights."""
6
import json
7
from collections.abc import Iterable
@@ -86,10 +86,10 @@ class GLMAttention(nn.Module):
86
prefix=f"{prefix}.dense",
87
)
88
89
- # https://huggingface.co/THUDM/chatglm3-6b-32k/blob/e210410255278dd9d74463cf396ba559c0ef801c/modeling_chatglm.py#L141
89
+ # https://huggingface.co/zai-org/chatglm3-6b-32k/blob/e210410255278dd9d74463cf396ba559c0ef801c/modeling_chatglm.py#L141
90
rope_ratio = getattr(config, "rope_ratio", 1.0)
91
max_positions = getattr(config, "seq_length", 8192)
92
- # NOTE: THUDM/cogagent-9b-20241220 uses original_rope=False,
92
+ # NOTE: zai-org/cogagent-9b-20241220 uses original_rope=False,
93
# which is equivalent to is_neox_style=True
94
is_neox_style = not config.original_rope
95
self.rotary_emb = get_rope(
vllm/model_executor/models/glm4v.py
+1
-1
@@ -2,7 +2,7 @@
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4
# Adapted from
5
-# https://github.com/THUDM/CogAgent
5
+# https://github.com/zai-org/CogAgent
6
"""Inference-only CogAgent model compatible with THUDM weights."""
7
from argparse import Namespace
8
from collections.abc import Mapping, Sequence
vllm/test_utils.py
+1
-1
@@ -118,7 +118,7 @@ MODELS_ON_S3 = [
118
"stabilityai/stablelm-zephyr-3b",
119
"state-spaces/mamba-130m-hf",
120
"TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ",
121
- "THUDM/glm-4v-9b",
121
+ "zai-org/glm-4v-9b",
122
"TIGER-Lab/Mantis-8B-siglip-llama3",
123
"TIGER-Lab/VLM2Vec-Full",
124
"tiiuae/falcon-40b",
vllm/transformers_utils/configs/chatglm.py
+1
-1
@@ -2,7 +2,7 @@
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4
# Adapted from
5
-# https://github.com/THUDM/ChatGLM2-6B
5
+# https://github.com/zai-org/ChatGLM2-6B
6
from transformers import PretrainedConfig
7
8
vllm/transformers_utils/tokenizer.py
+1
-1
@@ -271,7 +271,7 @@ def get_tokenizer(
271
}
272
tokenizer.add_special_tokens(special_tokens_map)
273
274
- # NOTE: We can remove this after https://github.com/THUDM/ChatGLM3/issues/1324
274
+ # NOTE: We can remove this after https://github.com/zai-org/ChatGLM3/issues/1324
275
if type(tokenizer).__name__ in ("ChatGLMTokenizer",
276
"ChatGLM4Tokenizer"):
277
assert isinstance(tokenizer, PreTrainedTokenizer)