mirror of
https://www.modelscope.cn/ZhipuAI/GLM-4.1V-9B-Thinking.git
synced 2026-06-12 04:02:53 +08:00
Compare commits
1 Commits
pr/DX12388
...
pr/YweiK66
| Author | SHA1 | Date | |
|---|---|---|---|
| 8accb363d8 |
@ -70,13 +70,12 @@ messages = [
|
||||
],
|
||||
}
|
||||
]
|
||||
processor = AutoProcessor.from_pretrained(MODEL_PATH, use_fast=True)
|
||||
model = Glm4vForConditionalGeneration.from_pretrained(
|
||||
pretrained_model_name_or_path=MODEL_PATH,
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="auto",
|
||||
)
|
||||
processor = AutoProcessor.from_pretrained(MODEL_PATH, use_fast=True)
|
||||
|
||||
inputs = processor.apply_chat_template(
|
||||
messages,
|
||||
tokenize=True,
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 13696,
|
||||
"max_position_embeddings": 65536,
|
||||
"max_position_embeddings": 32768,
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 40,
|
||||
"num_key_value_heads": 2,
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151346": {
|
||||
"content": "</think>",
|
||||
@ -142,7 +142,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151347": {
|
||||
"content": "<answer>",
|
||||
@ -150,7 +150,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151348": {
|
||||
"content": "</answer>",
|
||||
@ -158,7 +158,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151349": {
|
||||
"content": "<|begin_of_box|>",
|
||||
@ -166,7 +166,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151350": {
|
||||
"content": "<|end_of_box|>",
|
||||
@ -174,7 +174,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
},
|
||||
"151351": {
|
||||
"content": "<|sep|>",
|
||||
@ -182,7 +182,7 @@
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
@ -200,8 +200,15 @@
|
||||
"<|end_of_image|>",
|
||||
"<|begin_of_video|>",
|
||||
"<|end_of_video|>",
|
||||
"<|begin_of_box|>",
|
||||
"<|end_of_box|>",
|
||||
"<|sep|>",
|
||||
"<|image|>",
|
||||
"<|video|>"
|
||||
"<|video|>",
|
||||
"<think>",
|
||||
"</think>",
|
||||
"<answer>",
|
||||
"</answer>"
|
||||
],
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"do_lower_case": false,
|
||||
@ -211,7 +218,7 @@
|
||||
"input_ids",
|
||||
"attention_mask"
|
||||
],
|
||||
"model_max_length": 65536,
|
||||
"model_max_length": 64000,
|
||||
"padding_side": "left",
|
||||
"remove_space": false,
|
||||
"tokenizer_class": "PreTrainedTokenizer"
|
||||
|
||||
Reference in New Issue
Block a user