Image-Text-to-Text
Transformers
Safetensors
glm5_next
glm5
exl3
quantized
mixture-of-experts
conversational
3-bit
Instructions to use wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1") model = AutoModelForMultimodalLM.from_pretrained("wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1
- SGLang
How to use wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1 with Docker Model Runner:
docker model run hf.co/wrldsuksgo2mars/GLM-5.3-Flash-EXL3-K3-v1
Restore official GLM-5.3 multimodal metadata
Browse filesRestore the exact processor, tokenizer/chat-template, and generation metadata from the Z.ai GLM-5.3-Flash source checkpoint. Model weights and quantization tensors are unchanged.
- generation_config.json +1 -2
- processor_config.json +44 -0
- tokenizer_config.json +2 -5
generation_config.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
-
"do_sample": true,
|
| 4 |
"eos_token_id": [
|
| 5 |
154820,
|
| 6 |
154827,
|
|
@@ -9,5 +8,5 @@
|
|
| 9 |
"pad_token_id": 154820,
|
| 10 |
"temperature": 1.0,
|
| 11 |
"top_p": 0.95,
|
| 12 |
-
"transformers_version": "5.16.
|
| 13 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
|
|
|
| 3 |
"eos_token_id": [
|
| 4 |
154820,
|
| 5 |
154827,
|
|
|
|
| 8 |
"pad_token_id": 154820,
|
| 9 |
"temperature": 1.0,
|
| 10 |
"top_p": 0.95,
|
| 11 |
+
"transformers_version": "5.16.0"
|
| 12 |
}
|
processor_config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"do_rescale": true,
|
| 4 |
+
"patch_expand_factor": 1,
|
| 5 |
+
"merge_size": 2,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.48145466,
|
| 8 |
+
0.4578275,
|
| 9 |
+
0.40821073
|
| 10 |
+
],
|
| 11 |
+
"image_std": [
|
| 12 |
+
0.26862954,
|
| 13 |
+
0.26130258,
|
| 14 |
+
0.27577711
|
| 15 |
+
],
|
| 16 |
+
"temporal_patch_size": 2,
|
| 17 |
+
"patch_size": 14,
|
| 18 |
+
"min_image_tokens": 16,
|
| 19 |
+
"max_image_tokens": 8000,
|
| 20 |
+
"image_processor_type": "Glm5NextImageProcessor"
|
| 21 |
+
},
|
| 22 |
+
"video_processor": {
|
| 23 |
+
"do_rescale": true,
|
| 24 |
+
"video_processor_type": "Glm5NextVideoProcessor",
|
| 25 |
+
"patch_expand_factor": 1,
|
| 26 |
+
"merge_size": 2,
|
| 27 |
+
"image_mean": [
|
| 28 |
+
0.48145466,
|
| 29 |
+
0.4578275,
|
| 30 |
+
0.40821073
|
| 31 |
+
],
|
| 32 |
+
"image_std": [
|
| 33 |
+
0.26862954,
|
| 34 |
+
0.26130258,
|
| 35 |
+
0.27577711
|
| 36 |
+
],
|
| 37 |
+
"temporal_patch_size": 2,
|
| 38 |
+
"patch_size": 14,
|
| 39 |
+
"min_image_tokens": 16,
|
| 40 |
+
"max_image_tokens": 240000,
|
| 41 |
+
"fps": 2
|
| 42 |
+
},
|
| 43 |
+
"processor_class": "Glm5NextProcessor"
|
| 44 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -23,14 +23,11 @@
|
|
| 23 |
"<|begin_of_transcription|>",
|
| 24 |
"<|end_of_transcription|>"
|
| 25 |
],
|
| 26 |
-
"fix_mistral_regex": true,
|
| 27 |
"is_local": true,
|
| 28 |
-
"local_files_only": true,
|
| 29 |
"model_max_length": 1048576,
|
| 30 |
"model_specific_special_tokens": {},
|
| 31 |
"pad_token": "<|endoftext|>",
|
| 32 |
"padding_side": "left",
|
| 33 |
"remove_space": false,
|
| 34 |
-
"tokenizer_class": "
|
| 35 |
-
|
| 36 |
-
}
|
|
|
|
| 23 |
"<|begin_of_transcription|>",
|
| 24 |
"<|end_of_transcription|>"
|
| 25 |
],
|
|
|
|
| 26 |
"is_local": true,
|
|
|
|
| 27 |
"model_max_length": 1048576,
|
| 28 |
"model_specific_special_tokens": {},
|
| 29 |
"pad_token": "<|endoftext|>",
|
| 30 |
"padding_side": "left",
|
| 31 |
"remove_space": false,
|
| 32 |
+
"tokenizer_class": "TokenizersBackend"
|
| 33 |
+
}
|
|
|