Run this model with HF Jobs
Run GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX") config = load_config("GCSA-AiLab/GLM-5.3-Flash-Uncensored-MLX") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
GCSA commited on
Upload LoRA-merged MLX 8-bit
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+2
- 8bit/.COMPLETEAdded+1
- 8bit/.eval_results/GLM-5.3-Flash.yamlAdded+28
- 8bit/.gitattributesAdded+49
- 8bit/LICENSEAdded+21
- 8bit/README.mdAdded+74
- 8bit/chat_template.jinjaAdded+261
- 8bit/config.jsonAdded+300
- 8bit/configuration.jsonAdded+1
- 8bit/generation_config.jsonAdded+12
- 8bit/merge_manifest.jsonAdded+15
- 8bit/mlx_manifest.jsonAdded+13
- 8bit/model-00001-of-00062.safetensorsAdded+3
- 8bit/model-00002-of-00062.safetensorsAdded+3
- 8bit/model-00003-of-00062.safetensorsAdded+3
- 8bit/model-00004-of-00062.safetensorsAdded+3
- 8bit/model-00005-of-00062.safetensorsAdded+3
- 8bit/model-00006-of-00062.safetensorsAdded+3
- 8bit/model-00007-of-00062.safetensorsAdded+3
- 8bit/model-00008-of-00062.safetensorsAdded+3
- 8bit/model-00009-of-00062.safetensorsAdded+3
- 8bit/model-00010-of-00062.safetensorsAdded+3
- 8bit/model-00011-of-00062.safetensorsAdded+3
- 8bit/model-00012-of-00062.safetensorsAdded+3
- 8bit/model-00013-of-00062.safetensorsAdded+3
- 8bit/model-00014-of-00062.safetensorsAdded+3
- 8bit/model-00015-of-00062.safetensorsAdded+3
- 8bit/model-00016-of-00062.safetensorsAdded+3
- 8bit/model-00017-of-00062.safetensorsAdded+3
- 8bit/model-00018-of-00062.safetensorsAdded+3
- 8bit/model-00019-of-00062.safetensorsAdded+3
- 8bit/model-00020-of-00062.safetensorsAdded+3
- 8bit/model-00021-of-00062.safetensorsAdded+3
- 8bit/model-00022-of-00062.safetensorsAdded+3
- 8bit/model-00023-of-00062.safetensorsAdded+3
- 8bit/model-00024-of-00062.safetensorsAdded+3
- 8bit/model-00025-of-00062.safetensorsAdded+3
- 8bit/model-00026-of-00062.safetensorsAdded+3
- 8bit/model-00027-of-00062.safetensorsAdded+3
- 8bit/model-00028-of-00062.safetensorsAdded+3
- 8bit/model-00029-of-00062.safetensorsAdded+3
- 8bit/model-00030-of-00062.safetensorsAdded+3
- 8bit/model-00031-of-00062.safetensorsAdded+3
- 8bit/model-00032-of-00062.safetensorsAdded+3
- 8bit/model-00033-of-00062.safetensorsAdded+3
- 8bit/model-00034-of-00062.safetensorsAdded+3
- 8bit/model-00035-of-00062.safetensorsAdded+3
- 8bit/model-00036-of-00062.safetensorsAdded+3
- 8bit/model-00037-of-00062.safetensorsAdded+3
- 8bit/model-00038-of-00062.safetensorsAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text8bit/model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text8bit/tokenizer.json filter=lfs diff=lfs merge=lfs -text
1{"format": "MLX", "source": "/shared/AbliterixedModels/GLM-5.3-Flash-Uncensored-FP8", "method": "model-free affine RTN using mlx.core.quantize", "scale_dtype": "float16", "bias_dtype": "float16", "group_size": 128, "bits": 8, "mode": "affine", "quantized_tensor_count": 37860, "dense_tensor_count": 910, "elapsed_seconds": 294.8754210472107}12345678910111213141516171819202122232425262728- dataset: id: harborframework/terminal-bench-2.1 task_id: terminalbench_2_1 value: 84.3 date: "2026-08-26" source: url: https://huggingface.co/zai-org/GLM-5.3-Flash name: "GLM-5.3-Flash model card"
- dataset: id: datacurve/deep-swe task_id: deep_swe value: 63.4 date: "2026-08-26" source: url: https://huggingface.co/zai-org/GLM-5.3-Flash name: "GLM-5.3-Flash model card" notes: "Reported as DeepSWE v1.1 on the model card, run via the mini-swe-agent harness with 400K context."
- dataset: id: cais/hle task_id: hle value: 55.3 date: "2026-08-26" source: url: https://huggingface.co/zai-org/GLM-5.3-Flash name: "GLM-5.3-Flash model card" notes: "HLE with tools (full set) and a 300K-context management strategy, not the no-tools default; judged by GPT-5.6-luna (medium)."12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*.tfevents* filter=lfs diff=lfs merge=lfs -text*.db* filter=lfs diff=lfs merge=lfs -text*.ark* filter=lfs diff=lfs merge=lfs -text**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.gguf* filter=lfs diff=lfs merge=lfs -text*.ggml filter=lfs diff=lfs merge=lfs -text*.llamafile* filter=lfs diff=lfs merge=lfs -text*.pt2 filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text"/model.safetensors.index.json" filter=lfs diff=lfs merge=lfs -text"/tokenizer.json" filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021MIT License
Copyright (c) 2026 Z.AI Co., Ltd
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374---language:- en- zhlibrary_name: transformerslicense: mitpipeline_tag: image-text-to-text---
# GLM-5.3-Flash
<div align="center"><img src=https://raw.githubusercontent.com/zai-org/GLM-5/refs/heads/main/resources/logo.svg width="15%"/></div><p align="center"> 👋 Join our <a href="https://raw.githubusercontent.com/zai-org/GLM-5/refs/heads/main/resources/wechat.png" target="_blank">WeChat</a> or <a href="https://discord.gg/QR7SARHRxK" target="_blank">Discord</a> community. <br> 📖 Check out the GLM-5.3-Flash <a href="https://z.ai/blog/glm-5.3-flash" target="_blank">blog</a> and GLM-5 <a href="https://arxiv.org/abs/2602.15763" target="_blank">Technical report</a>. <br> 📍 Use GLM-5.3-Flash API services on <a href="https://docs.z.ai/guides/llm/glm-5.3-flash">Z.ai API Platform. </a></p>
## Introduction
We introduce GLM-5.3-Flash, the first natively multimodal model in the GLM-5 series. With 320B total parameters and just 18B active parameters, it outperforms GLM-5.2 across benchmarks and real-world workloads at one-tenth the price, while approaching Claude Opus 4.8 on coding and agentic benchmarks.
GLM-5.3-Flash starts from a newly trained base model, with its architecture and training recipe redesigned around capability and efficiency. For the first time in the GLM series, we introduce a hybrid architecture combining sparse and linear attention, sharply reducing long-context serving costs while preserving precise long-context capabilities. The model also adopts Manifold-Constrained Hyper-Connections (mHC) to further improve scaling efficiency. Together with our latest 30T-token multimodal pre-training corpus, these changes enable GLM-5.3-Flash to deliver more intelligence with less compute.

## Serve GLM-5.3-Flash Locally
GLM-5.3-Flash supports deployment with the following frameworks. Feel free to try them out:
- [SGLang](https://github.com/sgl-project/sglang) — see [cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-5.3-Flash)- [vLLM](https://github.com/vllm-project/vllm) — see [recipes](https://recipes.vllm.ai/zai-org/GLM-5.3-Flash)- [TokenSpeed](https://github.com/lightseekorg/tokenspeed) — see [here](https://lightseek.org/tokenspeed/recipes/models#glm-5-3-flash)- [Transformers](https://github.com/huggingface/transformers) — see [transformers docs](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/glm5_next.md)- [KTransformers](https://github.com/kvcache-ai/ktransformers) — see [tutorial](https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/kt-kernel/GLM-5.3-Flash-Tutorial.md)- [Unsloth](https://github.com/unslothai/unsloth) — see [guide](https://unsloth.ai/docs/models/glm-5.3)
### Note
- GLM-5.3-Flash supports controlling the thinking budget through the `reasoning_effort` parameter, which accepts three levels: `low`, `high`, and `max`. It defaults to `max` if not passed (or if set to any other value). To use `low` or `high`, pass them explicitly. For benchmark and leaderboard reproduction, keep the default `max`.- In the chat template for GLM-5.3-Flash, `clear_thinking` defaults to `false` if not passed. For chat scenarios, explicitly pass `clear_thinking=true`.
## Footnotes
* **HLE w/ tools (full set)**: We use sampling parameters of `temperature=1.0` and `top_p=0.95` for evaluation, with a maximum generation length of `163,840` tokens. The evaluation is conducted with a maximum context length of `300,000` tokens, using a context management strategy. We use GPT-5.6-luna (medium) as the judge model.* **NL2Repo**: We evaluated NL2Repo with temperature=1.0, top_p=1.0, and max_new_tokens=64k under 1M context. To prevent hacking, we use rule-based and a LLM-based judgement to prevent malicious behaviors (e.g., unauthorized pip or curl operations).* **DeepSWE**: We run DeepSWE using the mini-swe-agent harness with `temperature=0.95`, `top_p=1.0`, `timeout=6h` and 400K context.* **Terminal-Bench 2.1**: We evaluate in Claude Code 2.1.207 with temperature=1.0, top_p=1, max_new_tokens=65536 with 6h timeout.* **Agent’s Last Exam**: * **Toolathlon Verified**: We obtain all results via the official evaluation service and report pass@1 averaged over 3 independent runs.* **AutomationBench**: We evaluate on AutomationBench **v1.0.6**, incorporating the fix for the `null`-type handling issue introduced in [PR #13](https://github.com/zapier/AutomationBench/pull/13).* **GDPval-AA v2**: Models are evaluated by Artificial Analysis.* **BabyVision**: We use temperature=1.0, top_p=0.95, and a maximum context length of 164K tokens. We resize the input images such that their shorter side is at least 1.5K pixels, consistent with other baselines.
## Citation
If you find GLM-5.3-Flash useful in your research, please cite our technical report:
```bibtex@misc{glm5team2026glm5vibecodingagentic, title={GLM-5: from Vibe Coding to Agentic Engineering}, author={GLM-5-Team and : and Aohan Zeng and Xin Lv and Zhenyu Hou and Zhengxiao Du and Qinkai Zheng and Bin Chen and Da Yin and Chendi Ge and Chenghua Huang and Chengxing Xie and Chenzheng Zhu and Congfeng Yin and Cunxiang Wang and Gengzheng Pan and Hao Zeng and Haoke Zhang and Haoran Wang and Huilong Chen and Jiajie Zhang and Jian Jiao and Jiaqi Guo and Jingsen Wang and Jingzhao Du and Jinzhu Wu and Kedong Wang and Lei Li and Lin Fan and Lucen Zhong and Mingdao Liu and Mingming Zhao and Pengfan Du and Qian Dong and Rui Lu and Shuang-Li and Shulin Cao and Song Liu and Ting Jiang and Xiaodong Chen and Xiaohan Zhang and Xuancheng Huang and Xuezhen Dong and Yabo Xu and Yao Wei and Yifan An and Yilin Niu and Yitong Zhu and Yuanhao Wen and Yukuo Cen and Yushi Bai and Zhongpei Qiao and Zihan Wang and Zikang Wang and Zilin Zhu and Ziqiang Liu and Zixuan Li and Bojie Wang and Bosi Wen and Can Huang and Changpeng Cai and Chao Yu and Chen Li and Chengwei Hu and Chenhui Zhang and Dan Zhang and Daoyan Lin and Dayong Yang and Di Wang and Ding Ai and Erle Zhu and Fangzhou Yi and Feiyu Chen and Guohong Wen and Hailong Sun and Haisha Zhao and Haiyi Hu and Hanchen Zhang and Hanrui Liu and Hanyu Zhang and Hao Peng and Hao Tai and Haobo Zhang and He Liu and Hongwei Wang and Hongxi Yan and Hongyu Ge and Huan Liu and Huanpeng Chu and Jia'ni Zhao and Jiachen Wang and Jiajing Zhao and Jiamin Ren and Jiapeng Wang and Jiaxin Zhang and Jiayi Gui and Jiayue Zhao and Jijie Li and Jing An and Jing Li and Jingwei Yuan and Jinhua Du and Jinxin Liu and Junkai Zhi and Junwen Duan and Kaiyue Zhou and Kangjian Wei and Ke Wang and Keyun Luo and Laiqiang Zhang and Leigang Sha and Liang Xu and Lindong Wu and Lintao Ding and Lu Chen and Minghao Li and Nianyi Lin and Pan Ta and Qiang Zou and Rongjun Song and Ruiqi Yang and Shangqing Tu and Shangtong Yang and Shaoxiang Wu and Shengyan Zhang and Shijie Li and Shuang Li and Shuyi Fan and Wei Qin and Wei Tian and Weining Zhang and Wenbo Yu and Wenjie Liang and Xiang Kuang and Xiangmeng Cheng and Xiangyang Li and Xiaoquan Yan and Xiaowei Hu and Xiaoying Ling and Xing Fan and Xingye Xia and Xinyuan Zhang and Xinze Zhang and Xirui Pan and Xu Zou and Xunkai Zhang and Yadi Liu and Yandong Wu and Yanfu Li and Yidong Wang and Yifan Zhu and Yijun Tan and Yilin Zhou and Yiming Pan and Ying Zhang and Yinpei Su and Yipeng Geng and Yong Yan and Yonglin Tan and Yuean Bi and Yuhan Shen and Yuhao Yang and Yujiang Li and Yunan Liu and Yunqing Wang and Yuntao Li and Yurong Wu and Yutao Zhang and Yuxi Duan and Yuxuan Zhang and Zezhen Liu and Zhengtao Jiang and Zhenhe Yan and Zheyu Zhang and Zhixiang Wei and Zhuo Chen and Zhuoer Feng and Zijun Yao and Ziwei Chai and Ziyuan Wang and Zuzhou Zhang and Bin Xu and Minlie Huang and Hongning Wang and Juanzi Li and Yuxiao Dong and Jie Tang}, year={2026}, eprint={2602.15763}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2602.15763},}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261[gMASK]<sop>{%- set effective_reasoning_effort = reasoning_effort if reasoning_effort is defined and reasoning_effort in ['low', 'high'] else 'max' -%}{%- if effective_reasoning_effort is not none -%}<|system|>Reasoning Effort: {{ effective_reasoning_effort | capitalize }}{%- endif -%}{%- set clear_thinking = clear_thinking if clear_thinking is defined else false -%}{%- if tools -%}{%- macro tool_to_json(tool) -%} {%- set ns_tool = namespace(first=true) -%} {{ '{' -}} {%- for k, v in tool.items() -%} {%- if k != 'defer_loading' and k != 'strict' -%} {%- if not ns_tool.first -%}{{- ', ' -}}{%- endif -%} {%- set ns_tool.first = false -%} "{{ k }}": {{ v | tojson(ensure_ascii=False) }} {%- endif -%} {%- endfor -%} {{- '}' -}}{%- endmacro -%}{%- macro tool_references_to_response(refs) -%} {{- '<tool_response><tools>\n' -}} {%- for tr in refs -%} {%- for tool in tools -%} {%- if 'function' in tool -%} {%- set tool = tool['function'] -%} {%- endif -%} {%- if tool.name == tr.name -%} {{- tool_to_json(tool) + '\n' -}} {%- endif -%} {%- endfor -%} {%- endfor -%} {{- '</tools></tool_response>' -}}{%- endmacro -%}<|system|># Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:<tools>{% for tool in tools %}{%- if 'function' in tool -%} {%- set tool = tool['function'] -%}{%- endif -%}{% if tool.defer_loading is not defined or not tool.defer_loading %}{{ tool_to_json(tool) }}{% endif %}{% endfor %}</tools>
For each function call, output the function name and arguments within the following XML format:<tool_call>{function-name}<arg_key>{arg-key-1}</arg_key><arg_value>{arg-value-1}</arg_value><arg_key>{arg-key-2}</arg_key><arg_value>{arg-value-2}</arg_value>...</tool_call>{%- endif -%}{%- macro emit_image() -%}<|begin_of_image|><|image|><|end_of_image|>{%- endmacro -%}{%- macro emit_video() -%}<|begin_of_video|><|video|><|end_of_video|>{%- endmacro -%}{%- macro emit_audio() -%}<|begin_of_audio|><|end_of_audio|>{%- endmacro -%}{%- macro visible_text(content) -%} {%- if content is string -%} {{- content -}} {%- elif content is iterable and content is not mapping -%} {%- for item in content -%} {%- if item is mapping and item.type == 'text' -%} {{- item.text -}} {%- elif item is string -%} {{- item -}} {%- elif item is mapping and item.type in ['image', 'image_url'] -%} {{- emit_image() -}} {%- elif item is mapping and item.type in ['video', 'video_url'] -%} {{- emit_video() -}} {%- elif item is mapping and item.type in ['audio', 'audio_url', 'input_audio'] -%} {{- emit_audio() -}} {%- endif -%} {%- endfor -%} {%- elif content is not none -%} {{- content -}} {%- endif -%}{%- endmacro -%}{%- macro tool_response(text) -%}{{- '<tool_response>' + text + '</tool_response>' -}}{%- endmacro -%}{%- macro render_tool_response(m) -%}{%- if m.content is string -%} {{- tool_response(m.content) -}}{%- elif m.content and m.content is not mapping and m.content.0.type == "tool_reference" -%} {{- tool_references_to_response(m.content) -}}{%- elif is_list_of_outputs(m) -%} {%- for tr in m.content -%} {%- if tr.output is iterable and tr.output is not string and tr.output is not mapping and tr.output and tr.output.0.type == "tool_reference" -%} {{- tool_references_to_response(tr.output) -}} {%- else -%} {{- tool_response(visible_text(tr.output)) -}} {%- endif -%} {%- endfor -%}{%- else -%} {{- tool_response(visible_text(m.content)) -}}{%- endif -%}{%- endmacro -%}{%- macro id_of(obj) -%} {%- if obj.tool_call_id -%} {{- obj.tool_call_id -}} {%- elif obj.id -%} {{- obj.id -}} {%- endif -%}{%- endmacro -%}{%- macro is_list_of_outputs(m) -%} {%- if m.content and m.content.0.output is defined -%}1{%- endif -%}{%- endmacro -%}{%- macro has_dup_tool_result_id(lo, hi, target) -%} {%- set ns_cnt = namespace(n=0) -%} {%- for k in range(lo, hi + 1) -%} {%- set m = messages[k] -%} {%- if is_list_of_outputs(m) -%} {%- for entry in m.content -%} {%- if id_of(entry) == target -%} {%- set ns_cnt.n = ns_cnt.n + 1 -%} {%- endif -%} {%- endfor -%} {%- elif id_of(m) == target -%} {%- set ns_cnt.n = ns_cnt.n + 1 -%} {%- endif -%} {%- if ns_cnt.n > 1 -%}{%- break -%}{%- endif -%} {%- endfor -%} {%- if ns_cnt.n > 1 -%}1{%- endif -%}{%- endmacro -%}{%- macro tc_id_exists(tcs, target) -%} {%- set ns_f = namespace(found=false) -%} {%- for tc in tcs -%} {%- if id_of(tc) == target -%} {%- set ns_f.found = true -%} {%- break -%} {%- endif -%} {%- endfor -%} {%- if ns_f.found -%}1{%- endif -%}{%- endmacro -%}{%- set ns = namespace(last_user_index=-1) -%}{%- for m in messages %} {%- if m.role == 'user' %} {%- set ns.last_user_index = loop.index0 -%} {%- endif %}{%- endfor %}{%- for m in messages -%}{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}{%- elif m.role == 'assistant' -%}<|assistant|>{%- set content = visible_text(m.content) %}{%- if m.reasoning_content is string %} {%- set reasoning_content = m.reasoning_content %}{%- elif '</think>' in content %} {%- set reasoning_content = content.split('</think>')[0].split('<think>')[-1] %} {%- set content = content.split('</think>')[-1] %}{%- endif %}{%- if (not clear_thinking or loop.index0 > ns.last_user_index) and reasoning_content is defined -%}{{ '<think>' + reasoning_content + '</think>'}}{%- else -%}{{ '<think></think>' }}{%- endif -%}{%- if content.strip() -%}{{ content.strip() }}{%- endif -%}{% if m.tool_calls %}{% for tc in m.tool_calls %}{%- if tc.function %} {%- set tc = tc.function %}{%- endif %}{{- '<tool_call>' ~ tc.name -}}{% set _args = tc.arguments %}{% for k, v in _args.items() %}<arg_key>{{ k }}</arg_key><arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>{% endfor %}</tool_call>{% endfor %}{% endif %}{%- elif m.role == 'tool' -%}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} {{- '<|observation|>' -}} {%- set block_start = loop.index0 -%} {%- set ns_blk = namespace(end=block_start) -%} {%- for j in range(block_start, messages|length) -%} {%- if messages[j].role == 'tool' -%} {%- set ns_blk.end = j -%} {%- else -%} {%- break -%} {%- endif -%} {%- endfor -%} {%- set ns_a = namespace(tool_calls=none) -%} {%- if block_start > 0 and messages[block_start - 1].role == 'assistant' and messages[block_start - 1].tool_calls -%} {%- set ns_a.tool_calls = messages[block_start - 1].tool_calls -%} {%- endif -%} {%- set ns_chk = namespace(can_sort=true) -%} {%- if not ns_a.tool_calls -%} {%- set ns_chk.can_sort = false -%} {%- else -%} {%- for k in range(block_start, ns_blk.end + 1) -%} {%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%} {%- set m = messages[k] -%} {%- if is_list_of_outputs(m) -%} {%- for entry in m.content -%} {%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%} {%- set eid = id_of(entry) -%} {%- if not eid -%} {%- set ns_chk.can_sort = false -%} {%- elif has_dup_tool_result_id(block_start, ns_blk.end, eid) -%} {%- set ns_chk.can_sort = false -%} {%- elif not tc_id_exists(ns_a.tool_calls, eid) -%} {%- set ns_chk.can_sort = false -%} {%- endif -%} {%- endfor -%} {%- else -%} {%- set tk_id = id_of(m) -%} {%- if not tk_id -%} {%- set ns_chk.can_sort = false -%} {%- elif has_dup_tool_result_id(block_start, ns_blk.end, tk_id) -%} {%- set ns_chk.can_sort = false -%} {%- elif not tc_id_exists(ns_a.tool_calls, tk_id) -%} {%- set ns_chk.can_sort = false -%} {%- endif -%} {%- endif -%} {%- endfor -%} {%- for i in range(ns_a.tool_calls | length) -%} {%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%} {%- set tc_id = id_of(ns_a.tool_calls[i]) -%} {%- if not tc_id -%} {%- set ns_chk.can_sort = false -%} {%- endif -%} {%- for j in range(i + 1, ns_a.tool_calls | length) -%} {%- if id_of(ns_a.tool_calls[j]) == tc_id -%} {%- set ns_chk.can_sort = false -%} {%- break -%} {%- endif -%} {%- endfor -%} {%- endfor -%} {%- endif -%} {%- if ns_chk.can_sort -%} {%- for tc in ns_a.tool_calls -%} {%- set tc_id = id_of(tc) -%} {%- for k in range(block_start, ns_blk.end + 1) -%} {%- set m = messages[k] -%} {%- if is_list_of_outputs(m) -%} {%- for entry in m.content -%} {%- set eid = id_of(entry) -%} {%- if eid == tc_id -%} {%- if entry.output is iterable and entry.output is not string and entry.output is not mapping and entry.output and entry.output.0.type == "tool_reference" -%} {{- tool_references_to_response(entry.output) -}} {%- else -%} {{- tool_response(visible_text(entry.output)) -}} {%- endif -%} {%- endif -%} {%- endfor -%} {%- else -%} {%- set tk_id = id_of(m) -%} {%- if tk_id == tc_id -%} {{- render_tool_response(m) -}} {%- endif -%} {%- endif -%} {%- endfor -%} {%- endfor -%} {%- else -%} {%- for k in range(block_start, ns_blk.end + 1) -%} {{- render_tool_response(messages[k]) -}} {%- endfor -%} {%- endif -%}{% endif -%}{%- elif m.role == 'system' -%}<|system|>{{ visible_text(m.content) }}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%} <|assistant|>{{- '<think>' -}}{%- endif -%}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300{ "architectures": [ "Glm5NextForConditionalGeneration" ], "image_end_token_id": 154831, "image_start_token_id": 154830, "image_token_id": 154854, "model_type": "glm5_next", "quantization": { "bits": 8, "group_size": 128, "mode": "affine" }, "quantization_config": { "bits": 8, "group_size": 128, "mode": "affine" }, "text_config": { "attention_bias": false, "attention_dropout": 0.0, "dtype": "bfloat16", "eos_token_id": [ 154820, 154827, 154829 ], "first_k_dense_replace": 3, "hc_eps": 1e-06, "hc_mult": 4, "hc_sinkhorn_iters": 20, "head_dim": 0, "hidden_act": "silu", "hidden_size": 4096, "index_head_dim": 128, "index_kpool": 4, "index_kpool_always_select_tail": true, "index_kpool_compress": true, "index_n_heads": 32, "index_share_for_mtp_iteration": true, "index_topk": 2048, "indexer_rope_interleave": true, "indexer_types": [ "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full", "full" ], "initializer_range": 0.02, "intermediate_size": 12288, "kv_lora_rank": 512, "layer_types": [ "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention", "linear_attention", "linear_attention", "deepseek_sparse_attention", "linear_attention" ], "linear_attn_config": { "full_attn_layers": [ 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43 ], "gate_lower_bound": -5.0, "head_dim": 128, "kda_layers": [ 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44 ], "num_heads": 64, "short_conv_kernel_size": 4 }, "max_position_embeddings": 1048576, "mhc": true, "mla_use_nope": true, "mlp_layer_types": [ "dense", "dense", "dense", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse", "sparse" ], "model_type": "glm5_next_text", "moe_intermediate_size": 2048, "moe_router_dtype": "float32", "n_group": 1, "n_routed_experts": 288, "n_shared_experts": 1, "norm_topk_prob": true, "num_attention_heads": 64, "num_experts_per_tok": 8, "num_hidden_layers": 45, "num_key_value_heads": 64, "num_nextn_predict_layers": 1, "output_router_logits": false, "pad_token_id": 154820, "q_lora_rank": 1536, "qk_head_dim": 256, "qk_nope_head_dim": 256, "qk_rope_head_dim": 0, "rms_norm_eps": 1e-05, "routed_scaling_factor": 2.5, "router_aux_loss_coef": 0.001, "scoring_func": "sigmoid", "swiglu_limit": 10.0, "tie_word_embeddings": false, "topk_group": 1, "topk_method": "noaux_tc", "use_cache": true, "v_head_dim": 256, "vocab_size": 154880 }, "tie_word_embeddings": false, "transformers_version": "5.16.0", "video_end_token_id": 154833, "video_start_token_id": 154832, "video_token_id": 154855, "vision_config": { "attention_bias": true, "attention_dropout": 0.0, "depth": 24, "hidden_act": "silu", "hidden_size": 1024, "image_size": 448, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 4096, "model_type": "glm5_next_vision", "num_heads": 16, "out_hidden_size": 4096, "patch_size": 14, "projection_intermediate_size": 10240, "rms_norm_eps": 1e-05, "spatial_merge_size": 2, "swiglu_limit": 10.0, "temporal_patch_size": 2 }}1{"task":"image-text-to-text"}123456789101112{ "_from_model_config": true, "eos_token_id": [ 154820, 154827, 154829 ], "pad_token_id": 154820, "temperature": 1.0, "top_p": 0.95, "transformers_version": "5.16.0"}123456789101112131415{ "format": "FP8_DYNAMIC", "source": "/shared/Models/GLM-5.3-Flash", "adapter": "/shared/LoRA/GLM-5.3-Flash-Ablitered2", "merge": "streamed dequantize + LoRA BA * alpha/r + 128x128 E4M3 requantize", "validation": { "target_count": 22521, "quantized_target_count": 22499, "dense_target_count": 22, "shard_count_with_targets": 52, "rank": 1, "lora_alpha": 1 }, "elapsed_seconds": 1326.20317029953}12345678910111213{ "format": "MLX", "source": "/shared/AbliterixedModels/GLM-5.3-Flash-Uncensored-FP8", "method": "model-free affine RTN using mlx.core.quantize", "scale_dtype": "float16", "bias_dtype": "float16", "group_size": 128, "bits": 8, "mode": "affine", "quantized_tensor_count": 37860, "dense_tensor_count": 910, "elapsed_seconds": 294.8754210472107}123version https://git-lfs.github.com/spec/v1oid sha256:6f1f46c9c90c26fc93839db2f2778ec94a448181873227375a0740dda8995d3fsize 5418416081123version https://git-lfs.github.com/spec/v1oid sha256:716f9225f00ebb8367a5bcf814c053bd8dc9129ceab53492581bf32084c95a05size 5279884407123version https://git-lfs.github.com/spec/v1oid sha256:ee89c3cef68666805933cf1d17459791cf656123604b7309a359b52ca2bfbe1fsize 5425991456123version https://git-lfs.github.com/spec/v1oid sha256:1610d938ffba4aaa7c4921e60f920c5f04c33453384527ce35c983ee79ecca06size 5387575820123version https://git-lfs.github.com/spec/v1oid sha256:d2e406cc3c128da558180d10e4f15a5a6d071a6227526e3d3d57fffc7c549617size 5504515388123version https://git-lfs.github.com/spec/v1oid sha256:37324c6c947a2459df5d6ae62419922eb96beb9825c2a8a2e6cd4499170c0cadsize 5528095540123version https://git-lfs.github.com/spec/v1oid sha256:a8b63b611f951713faf0b8e85223b57f72ffd7e86915729d4237210cff725f9bsize 5387576047123version https://git-lfs.github.com/spec/v1oid sha256:6c6ee4672e784d98890e5bcde4c9ea20747c132938fecda7d841698d17e6309dsize 5387575776123version https://git-lfs.github.com/spec/v1oid sha256:25b844aad6c367f4bdf8f25fb6b50d0bfbba2eb3117b2059ca4d0aba430e50e0size 5529313255123version https://git-lfs.github.com/spec/v1oid sha256:3c47ac69935cdbd76031f0abcf52485efad5d302cc7cb4cd757fb86f9f449879size 5386358244123version https://git-lfs.github.com/spec/v1oid sha256:4f4c94668e688178bdc84954b58e62f7279106e2338d338d3be7f78bdf99cdf9size 5504515398123version https://git-lfs.github.com/spec/v1oid sha256:6aee5b03bf5007d5198e74d3b306f6317324e2dc096317362b883b0761499066size 5387575722123version https://git-lfs.github.com/spec/v1oid sha256:b6c41623af60a2746956a2dd3fba08ffa93a75142807c15d66d463c352b8334esize 5528095571123version https://git-lfs.github.com/spec/v1oid sha256:8f41390ed528818dd4fec3aebf0eaf8debae6354cef5e4974bbd33d0abc6ac39size 5387576093123version https://git-lfs.github.com/spec/v1oid sha256:341e1fce626a7cf8a31b6e8448c636f78aca9cae07e7c80d9aac03aef3660a89size 5387575774123version https://git-lfs.github.com/spec/v1oid sha256:914b5cb614f0caea558e083e5d1483a7612698c2e58638237794d29f0bb98f99size 5528095113123version https://git-lfs.github.com/spec/v1oid sha256:30b96367aba59fe494b649917a47b8ed17898c9ba157dfd5e145fd46a03c6a4dsize 5362772186123version https://git-lfs.github.com/spec/v1oid sha256:4af3130d3e8a772701070fd32d07249a9ea478fcb2742e4fc21c3d19bb8e2bbfsize 5387575812123version https://git-lfs.github.com/spec/v1oid sha256:58b13cfab303abbfa3d588652cfaae37e551f27dfd917c6a1a38a19569f8ed24size 5387575802123version https://git-lfs.github.com/spec/v1oid sha256:0a0142deca136d4d589c23a0356a330ee217f58dcb394685f78cbb011b4c247csize 5528095706123version https://git-lfs.github.com/spec/v1oid sha256:fdcbcd8ce095f9327872125ccbb4f8b766a55166038ea4121b9425d52fd1d0e9size 5387575868123version https://git-lfs.github.com/spec/v1oid sha256:7f8bd4858b4bc1c0054f3d178e73741d3a185bdeb189a03c76bd1b0a76551d6csize 5504515405123version https://git-lfs.github.com/spec/v1oid sha256:997079152d0f10bc31d4cd786c8146133ec52d5b58e763d6c238ebc8ece6a3efsize 5528095212123version https://git-lfs.github.com/spec/v1oid sha256:1a0008aabf17027ca3e74f68221c9513041d1da2d09ac2e73be257512abd66d0size 5387576260123version https://git-lfs.github.com/spec/v1oid sha256:ca0166795000008ad47499634b035be06c8dda4c66e0e5156a2721ef67ff0531size 5387575784123version https://git-lfs.github.com/spec/v1oid sha256:235b790af6113e13cde4218857bbccac80b3e822cd47e1d70147518e00e5780csize 5387575694123version https://git-lfs.github.com/spec/v1oid sha256:98b6b3e84fd8a0edc02214c2ce4c888c97b1d67ff20cdfe46449f6de5a5af07esize 5528095743123version https://git-lfs.github.com/spec/v1oid sha256:76766f6b6c740d70b6ecbc8fc6ff2083c09020a398d876079e6614c3827ac0dfsize 5504515568123version https://git-lfs.github.com/spec/v1oid sha256:d8acc2fbae86f250a0e6fb11228d0c2b1b2cfa05c0e62c0c9847c7b154547302size 5387575780123version https://git-lfs.github.com/spec/v1oid sha256:6dc193f33bde6ef32fe4939ad918638445ad902c965db5ce827517fff555e73csize 5528095377123version https://git-lfs.github.com/spec/v1oid sha256:b7500fe006c2c885d9799e2fb99462ae973d10f34e3d7875a3b423e1fe70e9c9size 5387574666123version https://git-lfs.github.com/spec/v1oid sha256:e2930d4c7a8414f1dded68cc1633cf55c94d9d3dfd7af8bd28305171ac04c259size 5504514421123version https://git-lfs.github.com/spec/v1oid sha256:bb222970d7f1e8e05f3864e8a3233baa6c3864e67646dc7b01ff9b00ebf2ce5asize 5387575758123version https://git-lfs.github.com/spec/v1oid sha256:82b30bdfdbbe72ebb79854e016750f893c948b53663c19e19f397e91681c7915size 5528095698123version https://git-lfs.github.com/spec/v1oid sha256:f8119c3705406452917d7ffb200b5dff63db9b2ecebcd12e4385c683f0d1b6cesize 5504515439123version https://git-lfs.github.com/spec/v1oid sha256:438487eab80fa957f19c4a7afc31e12a46dc9a810545585479e4dd8543ec5f77size 5387575778123version https://git-lfs.github.com/spec/v1oid sha256:40af989e91214fc03cda20204dcf636ee7147a563f8a162beb0e6046d4641f18size 5528095370123version https://git-lfs.github.com/spec/v1oid sha256:eedb7ae702a03bd71f4204701d792e75bfc0be13a7cdbbe0d5c256bacd141b11size 5387576267.gitattributes+2
8bit/.COMPLETEAdded+1
8bit/.eval_results/GLM-5.3-Flash.yamlAdded+28
8bit/.gitattributesAdded+49
8bit/LICENSEAdded+21
8bit/README.mdAdded+74
8bit/chat_template.jinjaAdded+261
8bit/config.jsonAdded+300
8bit/configuration.jsonAdded+1
8bit/generation_config.jsonAdded+12
8bit/merge_manifest.jsonAdded+15
8bit/mlx_manifest.jsonAdded+13
8bit/model-00001-of-00062.safetensorsAdded+3
8bit/model-00002-of-00062.safetensorsAdded+3
8bit/model-00003-of-00062.safetensorsAdded+3
8bit/model-00004-of-00062.safetensorsAdded+3
8bit/model-00005-of-00062.safetensorsAdded+3
8bit/model-00006-of-00062.safetensorsAdded+3
8bit/model-00007-of-00062.safetensorsAdded+3
8bit/model-00008-of-00062.safetensorsAdded+3
8bit/model-00009-of-00062.safetensorsAdded+3
8bit/model-00010-of-00062.safetensorsAdded+3
8bit/model-00011-of-00062.safetensorsAdded+3
8bit/model-00012-of-00062.safetensorsAdded+3
8bit/model-00013-of-00062.safetensorsAdded+3
8bit/model-00014-of-00062.safetensorsAdded+3
8bit/model-00015-of-00062.safetensorsAdded+3
8bit/model-00016-of-00062.safetensorsAdded+3
8bit/model-00017-of-00062.safetensorsAdded+3
8bit/model-00018-of-00062.safetensorsAdded+3
8bit/model-00019-of-00062.safetensorsAdded+3
8bit/model-00020-of-00062.safetensorsAdded+3
8bit/model-00021-of-00062.safetensorsAdded+3
8bit/model-00022-of-00062.safetensorsAdded+3
8bit/model-00023-of-00062.safetensorsAdded+3
8bit/model-00024-of-00062.safetensorsAdded+3
8bit/model-00025-of-00062.safetensorsAdded+3
8bit/model-00026-of-00062.safetensorsAdded+3
8bit/model-00027-of-00062.safetensorsAdded+3
8bit/model-00028-of-00062.safetensorsAdded+3
8bit/model-00029-of-00062.safetensorsAdded+3
8bit/model-00030-of-00062.safetensorsAdded+3
8bit/model-00031-of-00062.safetensorsAdded+3
8bit/model-00032-of-00062.safetensorsAdded+3
8bit/model-00033-of-00062.safetensorsAdded+3
8bit/model-00034-of-00062.safetensorsAdded+3
8bit/model-00035-of-00062.safetensorsAdded+3
8bit/model-00036-of-00062.safetensorsAdded+3
8bit/model-00037-of-00062.safetensorsAdded+3
8bit/model-00038-of-00062.safetensorsAdded+3