Instructions to use pipenetwork/GLM-5.3-Flash-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use pipenetwork/GLM-5.3-Flash-MLX-6bit 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("pipenetwork/GLM-5.3-Flash-MLX-6bit") config = load_config("pipenetwork/GLM-5.3-Flash-MLX-6bit") # 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
- Pi
How to use pipenetwork/GLM-5.3-Flash-MLX-6bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "pipenetwork/GLM-5.3-Flash-MLX-6bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "pipenetwork/GLM-5.3-Flash-MLX-6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use pipenetwork/GLM-5.3-Flash-MLX-6bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "pipenetwork/GLM-5.3-Flash-MLX-6bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default pipenetwork/GLM-5.3-Flash-MLX-6bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pipenetwork/GLM-5.3-Flash-MLX-6bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "pipenetwork/GLM-5.3-Flash-MLX-6bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "pipenetwork/GLM-5.3-Flash-MLX-6bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- LICENSE +21 -0
- README.md +88 -0
- chat_template.jinja +257 -0
- config.json +562 -0
- generation_config.json +12 -0
- model-00001.safetensors +3 -0
- model-00002.safetensors +3 -0
- model-00003.safetensors +3 -0
- model-00004.safetensors +3 -0
- model-00005.safetensors +3 -0
- model-00006.safetensors +3 -0
- model-00007.safetensors +3 -0
- model-00008.safetensors +3 -0
- model-00009.safetensors +3 -0
- model-00010.safetensors +3 -0
- model-00011.safetensors +3 -0
- model-00012.safetensors +3 -0
- model-00013.safetensors +3 -0
- model-00014.safetensors +3 -0
- model-00015.safetensors +3 -0
- model-00016.safetensors +3 -0
- model-00017.safetensors +3 -0
- model-00018.safetensors +3 -0
- model-00019.safetensors +3 -0
- model-00020.safetensors +3 -0
- model-00021.safetensors +3 -0
- model-00022.safetensors +3 -0
- model-00023.safetensors +3 -0
- model-00024.safetensors +3 -0
- model-00025.safetensors +3 -0
- model.safetensors.index.json +0 -0
- processor_config.json +44 -0
- tokenizer.json +3 -0
- tokenizer_config.json +33 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Z.AI Co., Ltd
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: zai-org/GLM-5.3-Flash
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
tags:
|
| 6 |
+
- mlx
|
| 7 |
+
- apple-silicon
|
| 8 |
+
- glm5_next
|
| 9 |
+
- mixture-of-experts
|
| 10 |
+
- 6-bit
|
| 11 |
+
pipeline_tag: image-text-to-text
|
| 12 |
+
library_name: mlx
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# GLM-5.3-Flash-MLX-6bit
|
| 16 |
+
|
| 17 |
+
MLX (Apple Silicon) build of [**GLM-5.3-Flash**](https://huggingface.co/zai-org/GLM-5.3-Flash) — 320B-A18B
|
| 18 |
+
hybrid of 34 Kimi-Delta linear-attention layers and 11 DeepSeek-sparse-attention (NoPE MLA +
|
| 19 |
+
lightning indexer) layers with manifold-constrained hyper-connections — quantized to **6-bit**.
|
| 20 |
+
|
| 21 |
+
**These files are modified**: converted from the upstream bfloat16 release
|
| 22 |
+
([GLM-5.3-Flash-BF16](https://huggingface.co/zai-org/GLM-5.3-Flash-BF16)) to MLX and quantized;
|
| 23 |
+
the architecture is unchanged. The multi-token-prediction layer (layer 45) is not included. The
|
| 24 |
+
vision tower is carried in bfloat16.
|
| 25 |
+
|
| 26 |
+
## Runtime
|
| 27 |
+
|
| 28 |
+
`glm5_next` landed in [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) `main` on 2026-08-26 (no
|
| 29 |
+
release carries it yet). Validating that port against `transformers` 5.16 at tiny scale found two
|
| 30 |
+
numerical bugs and two epsilon mismatches, which the runtime in
|
| 31 |
+
[https://github.com/PipeNetwork/glm53-flash-mlx](https://github.com/PipeNetwork/glm53-flash-mlx) fixes; parity is **1e-6** end to end, exact on cached decode.
|
| 32 |
+
|
| 33 |
+
| what | reference | mlx-vlm `main` | effect |
|
| 34 |
+
|---|---|---|---|
|
| 35 |
+
| `swiglu_limit` | gate clamped at 10, up at ±10, in every text MLP | no clamp anywhere in the text stack | formula mismatch on all 45 FFN blocks |
|
| 36 |
+
| mHC `base`/`scale` dtype | float32 | converter casts to bf16; the Metal kernel then reads `base` as float4 | `comb` mixing matrix off by ~0.5 on every layer of a converted checkpoint |
|
| 37 |
+
| MLA low-rank norm eps | `rms_norm_eps` = 1e-5 | 1e-6 | small |
|
| 38 |
+
| indexer LayerNorm eps | 1e-6 | 1e-5 | small |
|
| 39 |
+
|
| 40 |
+
This checkpoint keeps the mHC arrays and KDA decay parameters in float32 as stored, so it is
|
| 41 |
+
safe in either runtime; the clamp is a compute-path fix and needs the patched runtime:
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
git clone https://github.com/PipeNetwork/glm53-flash-mlx && cd glm53-flash-mlx && pip install -r requirements.txt
|
| 45 |
+
python scripts/smoke_generate.py /path/to/GLM-5.3-Flash-MLX-6bit
|
| 46 |
+
```
|
| 47 |
+
```python
|
| 48 |
+
from glm53_flash_mlx.load import load
|
| 49 |
+
model, processor = load("/path/to/GLM-5.3-Flash-MLX-6bit")
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Size and what is quantized
|
| 53 |
+
|
| 54 |
+
**255.9 GB** on disk (bfloat16 upstream: 642.7 GB).
|
| 55 |
+
|
| 56 |
+
| group | share of parameters | this build |
|
| 57 |
+
|---|---:|---|
|
| 58 |
+
| routed experts (`switch_mlp`, 42 layers × 288) | 304B (97%) | 6-bit, group 64 |
|
| 59 |
+
| KDA and MLA projections, shared experts, dense MLPs, embeddings, `lm_head` | ~9B | 6-bit, group 64 |
|
| 60 |
+
| lightning-indexer projections | 0.06B | 8-bit, group 64 |
|
| 61 |
+
| MoE router + correction bias, mHC arrays (fp32), KDA `A_log`/`dt_bias` (fp32), convolutions, norms | — | as stored |
|
| 62 |
+
| vision tower | 0.56B | bfloat16 |
|
| 63 |
+
|
| 64 |
+
## Quality
|
| 65 |
+
|
| 66 |
+
Perplexity on wikitext-2 (test), 288,627 tokens in 141 windows of 2048, every build scored
|
| 67 |
+
on **identical** windows through this runtime. The 643 GB bfloat16 model does not fit a 512 GB
|
| 68 |
+
machine, so the 8-bit build is the anchor (on every model we have measured, 8-bit has been
|
| 69 |
+
statistically indistinguishable from bfloat16). Per-window NLL differences against 8-bit,
|
| 70 |
+
bootstrapped over one shared index set (20,000 resamples):
|
| 71 |
+
|
| 72 |
+
| build | size | perplexity | ΔNLL/token vs 8-bit [95% CI] | windows worse |
|
| 73 |
+
|---|---:|---:|---|---:|
|
| 74 |
+
| [8bit](https://huggingface.co/pipenetwork/GLM-5.3-Flash-MLX-8bit) | 334.1 GB | 3.4607 | — | — |
|
| 75 |
+
| [6bit](https://huggingface.co/pipenetwork/GLM-5.3-Flash-MLX-6bit) | 255.9 GB | 3.4646 | +0.0011 [−0.0017, +0.0038] | 89/141 |
|
| 76 |
+
| [mixed-4_8bit](https://huggingface.co/pipenetwork/GLM-5.3-Flash-MLX-mixed-4_8bit) | 181.9 GB | 3.5705 | +0.0312 [+0.0271, +0.0355] | 131/141 |
|
| 77 |
+
| [4bit](https://huggingface.co/pipenetwork/GLM-5.3-Flash-MLX-4bit) | 177.6 GB | 3.7549 | +0.0816 [+0.0755, +0.0879] | 140/141 |
|
| 78 |
+
|
| 79 |
+
Read the interval, not the point estimate; "windows worse" counts how many of the 141
|
| 80 |
+
windows the build lost outright.
|
| 81 |
+
|
| 82 |
+
Against the 8-bit anchor: 6-bit +0.1%, mixed 4/8-bit +3.2%, uniform 4-bit +8.5%. Routed experts are 97% of the parameters; the mixed build keeps the other ~9B (KDA and MLA projections, shared experts, dense layers, embeddings) at 8-bit for 4.4 GB more than uniform 4-bit.
|
| 83 |
+
|
| 84 |
+
Greedy generation (a collapse detector, not a ranking) is coherent on every published build.
|
| 85 |
+
|
| 86 |
+
## License
|
| 87 |
+
|
| 88 |
+
MIT, as the upstream model. Port code: [https://github.com/PipeNetwork/glm53-flash-mlx](https://github.com/PipeNetwork/glm53-flash-mlx).
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[gMASK]<sop>
|
| 2 |
+
{%- set effective_reasoning_effort = reasoning_effort if reasoning_effort is defined and reasoning_effort in ['low', 'high'] else 'max' -%}
|
| 3 |
+
{%- if effective_reasoning_effort is not none -%}<|system|>Reasoning Effort: {{ effective_reasoning_effort | capitalize }}{%- endif -%}
|
| 4 |
+
{%- set clear_thinking = clear_thinking if clear_thinking is defined else false -%}
|
| 5 |
+
{%- if tools -%}
|
| 6 |
+
{%- macro tool_to_json(tool) -%}
|
| 7 |
+
{%- set ns_tool = namespace(first=true) -%}
|
| 8 |
+
{{ '{' -}}
|
| 9 |
+
{%- for k, v in tool.items() -%}
|
| 10 |
+
{%- if k != 'defer_loading' and k != 'strict' -%}
|
| 11 |
+
{%- if not ns_tool.first -%}{{- ', ' -}}{%- endif -%}
|
| 12 |
+
{%- set ns_tool.first = false -%}
|
| 13 |
+
"{{ k }}": {{ v | tojson(ensure_ascii=False) }}
|
| 14 |
+
{%- endif -%}
|
| 15 |
+
{%- endfor -%}
|
| 16 |
+
{{- '}' -}}
|
| 17 |
+
{%- endmacro -%}
|
| 18 |
+
{%- macro tool_references_to_response(refs) -%}
|
| 19 |
+
{{- '<tool_response><tools>\n' -}}
|
| 20 |
+
{%- for tr in refs -%}
|
| 21 |
+
{%- for tool in tools -%}
|
| 22 |
+
{%- if 'function' in tool -%}
|
| 23 |
+
{%- set tool = tool['function'] -%}
|
| 24 |
+
{%- endif -%}
|
| 25 |
+
{%- if tool.name == tr.name -%}
|
| 26 |
+
{{- tool_to_json(tool) + '\n' -}}
|
| 27 |
+
{%- endif -%}
|
| 28 |
+
{%- endfor -%}
|
| 29 |
+
{%- endfor -%}
|
| 30 |
+
{{- '</tools></tool_response>' -}}
|
| 31 |
+
{%- endmacro -%}
|
| 32 |
+
<|system|>
|
| 33 |
+
# Tools
|
| 34 |
+
|
| 35 |
+
You may call one or more functions to assist with the user query.
|
| 36 |
+
|
| 37 |
+
You are provided with function signatures within <tools></tools> XML tags:
|
| 38 |
+
<tools>
|
| 39 |
+
{% for tool in tools %}
|
| 40 |
+
{%- if 'function' in tool -%}
|
| 41 |
+
{%- set tool = tool['function'] -%}
|
| 42 |
+
{%- endif -%}
|
| 43 |
+
{% if tool.defer_loading is not defined or not tool.defer_loading %}
|
| 44 |
+
{{ tool_to_json(tool) }}
|
| 45 |
+
{% endif %}
|
| 46 |
+
{% endfor %}
|
| 47 |
+
</tools>
|
| 48 |
+
|
| 49 |
+
For each function call, output the function name and arguments within the following XML format:
|
| 50 |
+
<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 -%}
|
| 51 |
+
{%- macro emit_image() -%}<|begin_of_image|><|image|><|end_of_image|>{%- endmacro -%}
|
| 52 |
+
{%- macro emit_video() -%}<|begin_of_video|><|video|><|end_of_video|>{%- endmacro -%}
|
| 53 |
+
{%- macro emit_audio() -%}<|begin_of_audio|><|end_of_audio|>{%- endmacro -%}
|
| 54 |
+
{%- macro visible_text(content) -%}
|
| 55 |
+
{%- if content is string -%}
|
| 56 |
+
{{- content -}}
|
| 57 |
+
{%- elif content is iterable and content is not mapping -%}
|
| 58 |
+
{%- for item in content -%}
|
| 59 |
+
{%- if item is mapping and item.type == 'text' -%}
|
| 60 |
+
{{- item.text -}}
|
| 61 |
+
{%- elif item is string -%}
|
| 62 |
+
{{- item -}}
|
| 63 |
+
{%- elif item is mapping and item.type in ['image', 'image_url'] -%}
|
| 64 |
+
{{- emit_image() -}}
|
| 65 |
+
{%- elif item is mapping and item.type in ['video', 'video_url'] -%}
|
| 66 |
+
{{- emit_video() -}}
|
| 67 |
+
{%- elif item is mapping and item.type in ['audio', 'audio_url', 'input_audio'] -%}
|
| 68 |
+
{{- emit_audio() -}}
|
| 69 |
+
{%- endif -%}
|
| 70 |
+
{%- endfor -%}
|
| 71 |
+
{%- else -%}
|
| 72 |
+
{{- content }}
|
| 73 |
+
{%- endif -%}
|
| 74 |
+
{%- endmacro -%}
|
| 75 |
+
{%- macro tool_response(text) -%}
|
| 76 |
+
{{- '<tool_response>' + text + '</tool_response>' -}}
|
| 77 |
+
{%- endmacro -%}
|
| 78 |
+
{%- macro render_tool_response(m) -%}
|
| 79 |
+
{%- if m.content is string -%}
|
| 80 |
+
{{- tool_response(m.content) -}}
|
| 81 |
+
{%- elif m.content and m.content is not mapping and m.content.0.type == "tool_reference" -%}
|
| 82 |
+
{{- tool_references_to_response(m.content) -}}
|
| 83 |
+
{%- elif is_list_of_outputs(m) -%}
|
| 84 |
+
{%- for tr in m.content -%}
|
| 85 |
+
{%- 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" -%}
|
| 86 |
+
{{- tool_references_to_response(tr.output) -}}
|
| 87 |
+
{%- else -%}
|
| 88 |
+
{{- tool_response(visible_text(tr.output)) -}}
|
| 89 |
+
{%- endif -%}
|
| 90 |
+
{%- endfor -%}
|
| 91 |
+
{%- else -%}
|
| 92 |
+
{{- tool_response(visible_text(m.content)) -}}
|
| 93 |
+
{%- endif -%}
|
| 94 |
+
{%- endmacro -%}
|
| 95 |
+
{%- macro id_of(obj) -%}
|
| 96 |
+
{%- if obj.tool_call_id -%}
|
| 97 |
+
{{- obj.tool_call_id -}}
|
| 98 |
+
{%- elif obj.id -%}
|
| 99 |
+
{{- obj.id -}}
|
| 100 |
+
{%- endif -%}
|
| 101 |
+
{%- endmacro -%}
|
| 102 |
+
{%- macro is_list_of_outputs(m) -%}
|
| 103 |
+
{%- if m.content and m.content.0.output is defined -%}1{%- endif -%}
|
| 104 |
+
{%- endmacro -%}
|
| 105 |
+
{%- macro has_dup_tool_result_id(lo, hi, target) -%}
|
| 106 |
+
{%- set ns_cnt = namespace(n=0) -%}
|
| 107 |
+
{%- for k in range(lo, hi + 1) -%}
|
| 108 |
+
{%- set m = messages[k] -%}
|
| 109 |
+
{%- if is_list_of_outputs(m) -%}
|
| 110 |
+
{%- for entry in m.content -%}
|
| 111 |
+
{%- if id_of(entry) == target -%}
|
| 112 |
+
{%- set ns_cnt.n = ns_cnt.n + 1 -%}
|
| 113 |
+
{%- endif -%}
|
| 114 |
+
{%- endfor -%}
|
| 115 |
+
{%- elif id_of(m) == target -%}
|
| 116 |
+
{%- set ns_cnt.n = ns_cnt.n + 1 -%}
|
| 117 |
+
{%- endif -%}
|
| 118 |
+
{%- if ns_cnt.n > 1 -%}{%- break -%}{%- endif -%}
|
| 119 |
+
{%- endfor -%}
|
| 120 |
+
{%- if ns_cnt.n > 1 -%}1{%- endif -%}
|
| 121 |
+
{%- endmacro -%}
|
| 122 |
+
{%- macro tc_id_exists(tcs, target) -%}
|
| 123 |
+
{%- set ns_f = namespace(found=false) -%}
|
| 124 |
+
{%- for tc in tcs -%}
|
| 125 |
+
{%- if id_of(tc) == target -%}
|
| 126 |
+
{%- set ns_f.found = true -%}
|
| 127 |
+
{%- break -%}
|
| 128 |
+
{%- endif -%}
|
| 129 |
+
{%- endfor -%}
|
| 130 |
+
{%- if ns_f.found -%}1{%- endif -%}
|
| 131 |
+
{%- endmacro -%}
|
| 132 |
+
{%- set ns = namespace(last_user_index=-1) -%}
|
| 133 |
+
{%- for m in messages %}
|
| 134 |
+
{%- if m.role == 'user' %}
|
| 135 |
+
{%- set ns.last_user_index = loop.index0 -%}
|
| 136 |
+
{%- endif %}
|
| 137 |
+
{%- endfor %}
|
| 138 |
+
{%- for m in messages -%}
|
| 139 |
+
{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}
|
| 140 |
+
{%- elif m.role == 'assistant' -%}
|
| 141 |
+
<|assistant|>
|
| 142 |
+
{%- set content = visible_text(m.content) %}
|
| 143 |
+
{%- if m.reasoning_content is string %}
|
| 144 |
+
{%- set reasoning_content = m.reasoning_content %}
|
| 145 |
+
{%- elif '</think>' in content %}
|
| 146 |
+
{%- set reasoning_content = content.split('</think>')[0].split('<think>')[-1] %}
|
| 147 |
+
{%- set content = content.split('</think>')[-1] %}
|
| 148 |
+
{%- endif %}
|
| 149 |
+
{%- if (not clear_thinking or loop.index0 > ns.last_user_index) and reasoning_content is defined -%}
|
| 150 |
+
{{ '<think>' + reasoning_content + '</think>'}}
|
| 151 |
+
{%- else -%}
|
| 152 |
+
{{ '<think></think>' }}
|
| 153 |
+
{%- endif -%}
|
| 154 |
+
{%- if content.strip() -%}
|
| 155 |
+
{{ content.strip() }}
|
| 156 |
+
{%- endif -%}
|
| 157 |
+
{% if m.tool_calls %}
|
| 158 |
+
{% for tc in m.tool_calls %}
|
| 159 |
+
{%- if tc.function %}
|
| 160 |
+
{%- set tc = tc.function %}
|
| 161 |
+
{%- endif %}
|
| 162 |
+
{{- '<tool_call>' + tc.name -}}
|
| 163 |
+
{% 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 %}
|
| 164 |
+
{% endif %}
|
| 165 |
+
{%- elif m.role == 'tool' -%}
|
| 166 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 167 |
+
{{- '<|observation|>' -}}
|
| 168 |
+
{%- set block_start = loop.index0 -%}
|
| 169 |
+
{%- set ns_blk = namespace(end=block_start) -%}
|
| 170 |
+
{%- for j in range(block_start, messages|length) -%}
|
| 171 |
+
{%- if messages[j].role == 'tool' -%}
|
| 172 |
+
{%- set ns_blk.end = j -%}
|
| 173 |
+
{%- else -%}
|
| 174 |
+
{%- break -%}
|
| 175 |
+
{%- endif -%}
|
| 176 |
+
{%- endfor -%}
|
| 177 |
+
{%- set ns_a = namespace(tool_calls=none) -%}
|
| 178 |
+
{%- if block_start > 0 and messages[block_start - 1].role == 'assistant' and messages[block_start - 1].tool_calls -%}
|
| 179 |
+
{%- set ns_a.tool_calls = messages[block_start - 1].tool_calls -%}
|
| 180 |
+
{%- endif -%}
|
| 181 |
+
{%- set ns_chk = namespace(can_sort=true) -%}
|
| 182 |
+
{%- if not ns_a.tool_calls -%}
|
| 183 |
+
{%- set ns_chk.can_sort = false -%}
|
| 184 |
+
{%- else -%}
|
| 185 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 186 |
+
{%- set m = messages[k] -%}
|
| 187 |
+
{%- if is_list_of_outputs(m) -%}
|
| 188 |
+
{%- for entry in m.content -%}
|
| 189 |
+
{%- set eid = id_of(entry) -%}
|
| 190 |
+
{%- if not eid -%}
|
| 191 |
+
{%- set ns_chk.can_sort = false -%}
|
| 192 |
+
{%- elif has_dup_tool_result_id(block_start, ns_blk.end, eid) -%}
|
| 193 |
+
{%- set ns_chk.can_sort = false -%}
|
| 194 |
+
{%- elif not tc_id_exists(ns_a.tool_calls, eid) -%}
|
| 195 |
+
{%- set ns_chk.can_sort = false -%}
|
| 196 |
+
{%- endif -%}
|
| 197 |
+
{%- endfor -%}
|
| 198 |
+
{%- else -%}
|
| 199 |
+
{%- set tk_id = id_of(m) -%}
|
| 200 |
+
{%- if not tk_id -%}
|
| 201 |
+
{%- set ns_chk.can_sort = false -%}
|
| 202 |
+
{%- elif has_dup_tool_result_id(block_start, ns_blk.end, tk_id) -%}
|
| 203 |
+
{%- set ns_chk.can_sort = false -%}
|
| 204 |
+
{%- elif not tc_id_exists(ns_a.tool_calls, tk_id) -%}
|
| 205 |
+
{%- set ns_chk.can_sort = false -%}
|
| 206 |
+
{%- endif -%}
|
| 207 |
+
{%- endif -%}
|
| 208 |
+
{%- endfor -%}
|
| 209 |
+
{%- for i in range(ns_a.tool_calls | length) -%}
|
| 210 |
+
{%- set tc_id = id_of(ns_a.tool_calls[i]) -%}
|
| 211 |
+
{%- if not tc_id -%}
|
| 212 |
+
{%- set ns_chk.can_sort = false -%}
|
| 213 |
+
{%- endif -%}
|
| 214 |
+
{%- for j in range(i + 1, ns_a.tool_calls | length) -%}
|
| 215 |
+
{%- if id_of(ns_a.tool_calls[j]) == tc_id -%}
|
| 216 |
+
{%- set ns_chk.can_sort = false -%}
|
| 217 |
+
{%- endif -%}
|
| 218 |
+
{%- endfor -%}
|
| 219 |
+
{%- endfor -%}
|
| 220 |
+
{%- endif -%}
|
| 221 |
+
{%- if ns_chk.can_sort -%}
|
| 222 |
+
{%- for tc in ns_a.tool_calls -%}
|
| 223 |
+
{%- set tc_id = id_of(tc) -%}
|
| 224 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 225 |
+
{%- set m = messages[k] -%}
|
| 226 |
+
{%- if is_list_of_outputs(m) -%}
|
| 227 |
+
{%- for entry in m.content -%}
|
| 228 |
+
{%- set eid = id_of(entry) -%}
|
| 229 |
+
{%- if eid == tc_id -%}
|
| 230 |
+
{%- 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" -%}
|
| 231 |
+
{{- tool_references_to_response(entry.output) -}}
|
| 232 |
+
{%- else -%}
|
| 233 |
+
{{- tool_response(visible_text(entry.output)) -}}
|
| 234 |
+
{%- endif -%}
|
| 235 |
+
{%- endif -%}
|
| 236 |
+
{%- endfor -%}
|
| 237 |
+
{%- else -%}
|
| 238 |
+
{%- set tk_id = id_of(m) -%}
|
| 239 |
+
{%- if tk_id == tc_id -%}
|
| 240 |
+
{{- render_tool_response(m) -}}
|
| 241 |
+
{%- endif -%}
|
| 242 |
+
{%- endif -%}
|
| 243 |
+
{%- endfor -%}
|
| 244 |
+
{%- endfor -%}
|
| 245 |
+
{%- else -%}
|
| 246 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 247 |
+
{{- render_tool_response(messages[k]) -}}
|
| 248 |
+
{%- endfor -%}
|
| 249 |
+
{%- endif -%}
|
| 250 |
+
{% endif -%}
|
| 251 |
+
{%- elif m.role == 'system' -%}
|
| 252 |
+
<|system|>{{ visible_text(m.content) }}
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Glm5NextForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"text_config": {
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
154820,
|
| 11 |
+
154827,
|
| 12 |
+
154829
|
| 13 |
+
],
|
| 14 |
+
"first_k_dense_replace": 3,
|
| 15 |
+
"hc_eps": 1e-06,
|
| 16 |
+
"hc_mult": 4,
|
| 17 |
+
"hc_sinkhorn_iters": 20,
|
| 18 |
+
"head_dim": 0,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 4096,
|
| 21 |
+
"index_head_dim": 128,
|
| 22 |
+
"index_kpool": 4,
|
| 23 |
+
"index_kpool_always_select_tail": true,
|
| 24 |
+
"index_kpool_compress": true,
|
| 25 |
+
"index_n_heads": 32,
|
| 26 |
+
"index_topk": 2048,
|
| 27 |
+
"index_share_for_mtp_iteration": true,
|
| 28 |
+
"indexer_rope_interleave": true,
|
| 29 |
+
"indexer_types": [
|
| 30 |
+
"full",
|
| 31 |
+
"full",
|
| 32 |
+
"full",
|
| 33 |
+
"full",
|
| 34 |
+
"full",
|
| 35 |
+
"full",
|
| 36 |
+
"full",
|
| 37 |
+
"full",
|
| 38 |
+
"full",
|
| 39 |
+
"full",
|
| 40 |
+
"full",
|
| 41 |
+
"full",
|
| 42 |
+
"full",
|
| 43 |
+
"full",
|
| 44 |
+
"full",
|
| 45 |
+
"full",
|
| 46 |
+
"full",
|
| 47 |
+
"full",
|
| 48 |
+
"full",
|
| 49 |
+
"full",
|
| 50 |
+
"full",
|
| 51 |
+
"full",
|
| 52 |
+
"full",
|
| 53 |
+
"full",
|
| 54 |
+
"full",
|
| 55 |
+
"full",
|
| 56 |
+
"full",
|
| 57 |
+
"full",
|
| 58 |
+
"full",
|
| 59 |
+
"full",
|
| 60 |
+
"full",
|
| 61 |
+
"full",
|
| 62 |
+
"full",
|
| 63 |
+
"full",
|
| 64 |
+
"full",
|
| 65 |
+
"full",
|
| 66 |
+
"full",
|
| 67 |
+
"full",
|
| 68 |
+
"full",
|
| 69 |
+
"full",
|
| 70 |
+
"full",
|
| 71 |
+
"full",
|
| 72 |
+
"full",
|
| 73 |
+
"full",
|
| 74 |
+
"full"
|
| 75 |
+
],
|
| 76 |
+
"initializer_range": 0.02,
|
| 77 |
+
"intermediate_size": 12288,
|
| 78 |
+
"kv_lora_rank": 512,
|
| 79 |
+
"layer_types": [
|
| 80 |
+
"linear_attention",
|
| 81 |
+
"linear_attention",
|
| 82 |
+
"linear_attention",
|
| 83 |
+
"deepseek_sparse_attention",
|
| 84 |
+
"linear_attention",
|
| 85 |
+
"linear_attention",
|
| 86 |
+
"linear_attention",
|
| 87 |
+
"deepseek_sparse_attention",
|
| 88 |
+
"linear_attention",
|
| 89 |
+
"linear_attention",
|
| 90 |
+
"linear_attention",
|
| 91 |
+
"deepseek_sparse_attention",
|
| 92 |
+
"linear_attention",
|
| 93 |
+
"linear_attention",
|
| 94 |
+
"linear_attention",
|
| 95 |
+
"deepseek_sparse_attention",
|
| 96 |
+
"linear_attention",
|
| 97 |
+
"linear_attention",
|
| 98 |
+
"linear_attention",
|
| 99 |
+
"deepseek_sparse_attention",
|
| 100 |
+
"linear_attention",
|
| 101 |
+
"linear_attention",
|
| 102 |
+
"linear_attention",
|
| 103 |
+
"deepseek_sparse_attention",
|
| 104 |
+
"linear_attention",
|
| 105 |
+
"linear_attention",
|
| 106 |
+
"linear_attention",
|
| 107 |
+
"deepseek_sparse_attention",
|
| 108 |
+
"linear_attention",
|
| 109 |
+
"linear_attention",
|
| 110 |
+
"linear_attention",
|
| 111 |
+
"deepseek_sparse_attention",
|
| 112 |
+
"linear_attention",
|
| 113 |
+
"linear_attention",
|
| 114 |
+
"linear_attention",
|
| 115 |
+
"deepseek_sparse_attention",
|
| 116 |
+
"linear_attention",
|
| 117 |
+
"linear_attention",
|
| 118 |
+
"linear_attention",
|
| 119 |
+
"deepseek_sparse_attention",
|
| 120 |
+
"linear_attention",
|
| 121 |
+
"linear_attention",
|
| 122 |
+
"linear_attention",
|
| 123 |
+
"deepseek_sparse_attention",
|
| 124 |
+
"linear_attention"
|
| 125 |
+
],
|
| 126 |
+
"linear_attn_config": {
|
| 127 |
+
"num_heads": 64,
|
| 128 |
+
"gate_lower_bound": -5.0,
|
| 129 |
+
"head_dim": 128,
|
| 130 |
+
"short_conv_kernel_size": 4,
|
| 131 |
+
"kda_layers": [
|
| 132 |
+
0,
|
| 133 |
+
1,
|
| 134 |
+
2,
|
| 135 |
+
4,
|
| 136 |
+
5,
|
| 137 |
+
6,
|
| 138 |
+
8,
|
| 139 |
+
9,
|
| 140 |
+
10,
|
| 141 |
+
12,
|
| 142 |
+
13,
|
| 143 |
+
14,
|
| 144 |
+
16,
|
| 145 |
+
17,
|
| 146 |
+
18,
|
| 147 |
+
20,
|
| 148 |
+
21,
|
| 149 |
+
22,
|
| 150 |
+
24,
|
| 151 |
+
25,
|
| 152 |
+
26,
|
| 153 |
+
28,
|
| 154 |
+
29,
|
| 155 |
+
30,
|
| 156 |
+
32,
|
| 157 |
+
33,
|
| 158 |
+
34,
|
| 159 |
+
36,
|
| 160 |
+
37,
|
| 161 |
+
38,
|
| 162 |
+
40,
|
| 163 |
+
41,
|
| 164 |
+
42,
|
| 165 |
+
44
|
| 166 |
+
],
|
| 167 |
+
"full_attn_layers": [
|
| 168 |
+
3,
|
| 169 |
+
7,
|
| 170 |
+
11,
|
| 171 |
+
15,
|
| 172 |
+
19,
|
| 173 |
+
23,
|
| 174 |
+
27,
|
| 175 |
+
31,
|
| 176 |
+
35,
|
| 177 |
+
39,
|
| 178 |
+
43
|
| 179 |
+
]
|
| 180 |
+
},
|
| 181 |
+
"max_position_embeddings": 1048576,
|
| 182 |
+
"mhc": true,
|
| 183 |
+
"mla_use_nope": true,
|
| 184 |
+
"mlp_layer_types": [
|
| 185 |
+
"dense",
|
| 186 |
+
"dense",
|
| 187 |
+
"dense",
|
| 188 |
+
"sparse",
|
| 189 |
+
"sparse",
|
| 190 |
+
"sparse",
|
| 191 |
+
"sparse",
|
| 192 |
+
"sparse",
|
| 193 |
+
"sparse",
|
| 194 |
+
"sparse",
|
| 195 |
+
"sparse",
|
| 196 |
+
"sparse",
|
| 197 |
+
"sparse",
|
| 198 |
+
"sparse",
|
| 199 |
+
"sparse",
|
| 200 |
+
"sparse",
|
| 201 |
+
"sparse",
|
| 202 |
+
"sparse",
|
| 203 |
+
"sparse",
|
| 204 |
+
"sparse",
|
| 205 |
+
"sparse",
|
| 206 |
+
"sparse",
|
| 207 |
+
"sparse",
|
| 208 |
+
"sparse",
|
| 209 |
+
"sparse",
|
| 210 |
+
"sparse",
|
| 211 |
+
"sparse",
|
| 212 |
+
"sparse",
|
| 213 |
+
"sparse",
|
| 214 |
+
"sparse",
|
| 215 |
+
"sparse",
|
| 216 |
+
"sparse",
|
| 217 |
+
"sparse",
|
| 218 |
+
"sparse",
|
| 219 |
+
"sparse",
|
| 220 |
+
"sparse",
|
| 221 |
+
"sparse",
|
| 222 |
+
"sparse",
|
| 223 |
+
"sparse",
|
| 224 |
+
"sparse",
|
| 225 |
+
"sparse",
|
| 226 |
+
"sparse",
|
| 227 |
+
"sparse",
|
| 228 |
+
"sparse",
|
| 229 |
+
"sparse"
|
| 230 |
+
],
|
| 231 |
+
"model_type": "glm5_next_text",
|
| 232 |
+
"moe_intermediate_size": 2048,
|
| 233 |
+
"moe_router_dtype": "float32",
|
| 234 |
+
"n_group": 1,
|
| 235 |
+
"n_routed_experts": 288,
|
| 236 |
+
"n_shared_experts": 1,
|
| 237 |
+
"norm_topk_prob": true,
|
| 238 |
+
"num_attention_heads": 64,
|
| 239 |
+
"num_experts_per_tok": 8,
|
| 240 |
+
"num_hidden_layers": 45,
|
| 241 |
+
"num_key_value_heads": 64,
|
| 242 |
+
"num_nextn_predict_layers": 1,
|
| 243 |
+
"output_router_logits": false,
|
| 244 |
+
"pad_token_id": 154820,
|
| 245 |
+
"q_lora_rank": 1536,
|
| 246 |
+
"qk_head_dim": 256,
|
| 247 |
+
"qk_nope_head_dim": 256,
|
| 248 |
+
"qk_rope_head_dim": 0,
|
| 249 |
+
"rms_norm_eps": 1e-05,
|
| 250 |
+
"routed_scaling_factor": 2.5,
|
| 251 |
+
"router_aux_loss_coef": 0.001,
|
| 252 |
+
"scoring_func": "sigmoid",
|
| 253 |
+
"swiglu_limit": 10.0,
|
| 254 |
+
"tie_word_embeddings": false,
|
| 255 |
+
"topk_group": 1,
|
| 256 |
+
"topk_method": "noaux_tc",
|
| 257 |
+
"use_cache": true,
|
| 258 |
+
"v_head_dim": 256,
|
| 259 |
+
"vocab_size": 154880
|
| 260 |
+
},
|
| 261 |
+
"vision_config": {
|
| 262 |
+
"attention_bias": true,
|
| 263 |
+
"attention_dropout": 0.0,
|
| 264 |
+
"depth": 24,
|
| 265 |
+
"hidden_act": "silu",
|
| 266 |
+
"hidden_size": 1024,
|
| 267 |
+
"image_size": 448,
|
| 268 |
+
"in_channels": 3,
|
| 269 |
+
"initializer_range": 0.02,
|
| 270 |
+
"intermediate_size": 4096,
|
| 271 |
+
"model_type": "glm5_next_vision",
|
| 272 |
+
"num_heads": 16,
|
| 273 |
+
"out_hidden_size": 4096,
|
| 274 |
+
"patch_size": 14,
|
| 275 |
+
"projection_intermediate_size": 10240,
|
| 276 |
+
"rms_norm_eps": 1e-05,
|
| 277 |
+
"spatial_merge_size": 2,
|
| 278 |
+
"swiglu_limit": 10.0,
|
| 279 |
+
"temporal_patch_size": 2
|
| 280 |
+
},
|
| 281 |
+
"image_token_id": 154854,
|
| 282 |
+
"video_token_id": 154855,
|
| 283 |
+
"image_start_token_id": 154830,
|
| 284 |
+
"image_end_token_id": 154831,
|
| 285 |
+
"video_start_token_id": 154832,
|
| 286 |
+
"video_end_token_id": 154833,
|
| 287 |
+
"tie_word_embeddings": false,
|
| 288 |
+
"model_type": "glm5_next",
|
| 289 |
+
"transformers_version": "5.16.0",
|
| 290 |
+
"quantization": {
|
| 291 |
+
"group_size": 64,
|
| 292 |
+
"bits": 6,
|
| 293 |
+
"language_model.model.layers.3.self_attn.indexer.wq_b": {
|
| 294 |
+
"group_size": 64,
|
| 295 |
+
"bits": 8
|
| 296 |
+
},
|
| 297 |
+
"language_model.model.layers.3.self_attn.indexer.wk": {
|
| 298 |
+
"group_size": 64,
|
| 299 |
+
"bits": 8
|
| 300 |
+
},
|
| 301 |
+
"language_model.model.layers.3.self_attn.indexer.weights_proj": {
|
| 302 |
+
"group_size": 64,
|
| 303 |
+
"bits": 8
|
| 304 |
+
},
|
| 305 |
+
"language_model.model.layers.7.self_attn.indexer.wq_b": {
|
| 306 |
+
"group_size": 64,
|
| 307 |
+
"bits": 8
|
| 308 |
+
},
|
| 309 |
+
"language_model.model.layers.7.self_attn.indexer.wk": {
|
| 310 |
+
"group_size": 64,
|
| 311 |
+
"bits": 8
|
| 312 |
+
},
|
| 313 |
+
"language_model.model.layers.7.self_attn.indexer.weights_proj": {
|
| 314 |
+
"group_size": 64,
|
| 315 |
+
"bits": 8
|
| 316 |
+
},
|
| 317 |
+
"language_model.model.layers.11.self_attn.indexer.wq_b": {
|
| 318 |
+
"group_size": 64,
|
| 319 |
+
"bits": 8
|
| 320 |
+
},
|
| 321 |
+
"language_model.model.layers.11.self_attn.indexer.wk": {
|
| 322 |
+
"group_size": 64,
|
| 323 |
+
"bits": 8
|
| 324 |
+
},
|
| 325 |
+
"language_model.model.layers.11.self_attn.indexer.weights_proj": {
|
| 326 |
+
"group_size": 64,
|
| 327 |
+
"bits": 8
|
| 328 |
+
},
|
| 329 |
+
"language_model.model.layers.15.self_attn.indexer.wq_b": {
|
| 330 |
+
"group_size": 64,
|
| 331 |
+
"bits": 8
|
| 332 |
+
},
|
| 333 |
+
"language_model.model.layers.15.self_attn.indexer.wk": {
|
| 334 |
+
"group_size": 64,
|
| 335 |
+
"bits": 8
|
| 336 |
+
},
|
| 337 |
+
"language_model.model.layers.15.self_attn.indexer.weights_proj": {
|
| 338 |
+
"group_size": 64,
|
| 339 |
+
"bits": 8
|
| 340 |
+
},
|
| 341 |
+
"language_model.model.layers.19.self_attn.indexer.wq_b": {
|
| 342 |
+
"group_size": 64,
|
| 343 |
+
"bits": 8
|
| 344 |
+
},
|
| 345 |
+
"language_model.model.layers.19.self_attn.indexer.wk": {
|
| 346 |
+
"group_size": 64,
|
| 347 |
+
"bits": 8
|
| 348 |
+
},
|
| 349 |
+
"language_model.model.layers.19.self_attn.indexer.weights_proj": {
|
| 350 |
+
"group_size": 64,
|
| 351 |
+
"bits": 8
|
| 352 |
+
},
|
| 353 |
+
"language_model.model.layers.23.self_attn.indexer.wq_b": {
|
| 354 |
+
"group_size": 64,
|
| 355 |
+
"bits": 8
|
| 356 |
+
},
|
| 357 |
+
"language_model.model.layers.23.self_attn.indexer.wk": {
|
| 358 |
+
"group_size": 64,
|
| 359 |
+
"bits": 8
|
| 360 |
+
},
|
| 361 |
+
"language_model.model.layers.23.self_attn.indexer.weights_proj": {
|
| 362 |
+
"group_size": 64,
|
| 363 |
+
"bits": 8
|
| 364 |
+
},
|
| 365 |
+
"language_model.model.layers.27.self_attn.indexer.wq_b": {
|
| 366 |
+
"group_size": 64,
|
| 367 |
+
"bits": 8
|
| 368 |
+
},
|
| 369 |
+
"language_model.model.layers.27.self_attn.indexer.wk": {
|
| 370 |
+
"group_size": 64,
|
| 371 |
+
"bits": 8
|
| 372 |
+
},
|
| 373 |
+
"language_model.model.layers.27.self_attn.indexer.weights_proj": {
|
| 374 |
+
"group_size": 64,
|
| 375 |
+
"bits": 8
|
| 376 |
+
},
|
| 377 |
+
"language_model.model.layers.31.self_attn.indexer.wq_b": {
|
| 378 |
+
"group_size": 64,
|
| 379 |
+
"bits": 8
|
| 380 |
+
},
|
| 381 |
+
"language_model.model.layers.31.self_attn.indexer.wk": {
|
| 382 |
+
"group_size": 64,
|
| 383 |
+
"bits": 8
|
| 384 |
+
},
|
| 385 |
+
"language_model.model.layers.31.self_attn.indexer.weights_proj": {
|
| 386 |
+
"group_size": 64,
|
| 387 |
+
"bits": 8
|
| 388 |
+
},
|
| 389 |
+
"language_model.model.layers.35.self_attn.indexer.wq_b": {
|
| 390 |
+
"group_size": 64,
|
| 391 |
+
"bits": 8
|
| 392 |
+
},
|
| 393 |
+
"language_model.model.layers.35.self_attn.indexer.wk": {
|
| 394 |
+
"group_size": 64,
|
| 395 |
+
"bits": 8
|
| 396 |
+
},
|
| 397 |
+
"language_model.model.layers.35.self_attn.indexer.weights_proj": {
|
| 398 |
+
"group_size": 64,
|
| 399 |
+
"bits": 8
|
| 400 |
+
},
|
| 401 |
+
"language_model.model.layers.39.self_attn.indexer.wq_b": {
|
| 402 |
+
"group_size": 64,
|
| 403 |
+
"bits": 8
|
| 404 |
+
},
|
| 405 |
+
"language_model.model.layers.39.self_attn.indexer.wk": {
|
| 406 |
+
"group_size": 64,
|
| 407 |
+
"bits": 8
|
| 408 |
+
},
|
| 409 |
+
"language_model.model.layers.39.self_attn.indexer.weights_proj": {
|
| 410 |
+
"group_size": 64,
|
| 411 |
+
"bits": 8
|
| 412 |
+
},
|
| 413 |
+
"language_model.model.layers.43.self_attn.indexer.wq_b": {
|
| 414 |
+
"group_size": 64,
|
| 415 |
+
"bits": 8
|
| 416 |
+
},
|
| 417 |
+
"language_model.model.layers.43.self_attn.indexer.wk": {
|
| 418 |
+
"group_size": 64,
|
| 419 |
+
"bits": 8
|
| 420 |
+
},
|
| 421 |
+
"language_model.model.layers.43.self_attn.indexer.weights_proj": {
|
| 422 |
+
"group_size": 64,
|
| 423 |
+
"bits": 8
|
| 424 |
+
}
|
| 425 |
+
},
|
| 426 |
+
"quantization_config": {
|
| 427 |
+
"group_size": 64,
|
| 428 |
+
"bits": 6,
|
| 429 |
+
"language_model.model.layers.3.self_attn.indexer.wq_b": {
|
| 430 |
+
"group_size": 64,
|
| 431 |
+
"bits": 8
|
| 432 |
+
},
|
| 433 |
+
"language_model.model.layers.3.self_attn.indexer.wk": {
|
| 434 |
+
"group_size": 64,
|
| 435 |
+
"bits": 8
|
| 436 |
+
},
|
| 437 |
+
"language_model.model.layers.3.self_attn.indexer.weights_proj": {
|
| 438 |
+
"group_size": 64,
|
| 439 |
+
"bits": 8
|
| 440 |
+
},
|
| 441 |
+
"language_model.model.layers.7.self_attn.indexer.wq_b": {
|
| 442 |
+
"group_size": 64,
|
| 443 |
+
"bits": 8
|
| 444 |
+
},
|
| 445 |
+
"language_model.model.layers.7.self_attn.indexer.wk": {
|
| 446 |
+
"group_size": 64,
|
| 447 |
+
"bits": 8
|
| 448 |
+
},
|
| 449 |
+
"language_model.model.layers.7.self_attn.indexer.weights_proj": {
|
| 450 |
+
"group_size": 64,
|
| 451 |
+
"bits": 8
|
| 452 |
+
},
|
| 453 |
+
"language_model.model.layers.11.self_attn.indexer.wq_b": {
|
| 454 |
+
"group_size": 64,
|
| 455 |
+
"bits": 8
|
| 456 |
+
},
|
| 457 |
+
"language_model.model.layers.11.self_attn.indexer.wk": {
|
| 458 |
+
"group_size": 64,
|
| 459 |
+
"bits": 8
|
| 460 |
+
},
|
| 461 |
+
"language_model.model.layers.11.self_attn.indexer.weights_proj": {
|
| 462 |
+
"group_size": 64,
|
| 463 |
+
"bits": 8
|
| 464 |
+
},
|
| 465 |
+
"language_model.model.layers.15.self_attn.indexer.wq_b": {
|
| 466 |
+
"group_size": 64,
|
| 467 |
+
"bits": 8
|
| 468 |
+
},
|
| 469 |
+
"language_model.model.layers.15.self_attn.indexer.wk": {
|
| 470 |
+
"group_size": 64,
|
| 471 |
+
"bits": 8
|
| 472 |
+
},
|
| 473 |
+
"language_model.model.layers.15.self_attn.indexer.weights_proj": {
|
| 474 |
+
"group_size": 64,
|
| 475 |
+
"bits": 8
|
| 476 |
+
},
|
| 477 |
+
"language_model.model.layers.19.self_attn.indexer.wq_b": {
|
| 478 |
+
"group_size": 64,
|
| 479 |
+
"bits": 8
|
| 480 |
+
},
|
| 481 |
+
"language_model.model.layers.19.self_attn.indexer.wk": {
|
| 482 |
+
"group_size": 64,
|
| 483 |
+
"bits": 8
|
| 484 |
+
},
|
| 485 |
+
"language_model.model.layers.19.self_attn.indexer.weights_proj": {
|
| 486 |
+
"group_size": 64,
|
| 487 |
+
"bits": 8
|
| 488 |
+
},
|
| 489 |
+
"language_model.model.layers.23.self_attn.indexer.wq_b": {
|
| 490 |
+
"group_size": 64,
|
| 491 |
+
"bits": 8
|
| 492 |
+
},
|
| 493 |
+
"language_model.model.layers.23.self_attn.indexer.wk": {
|
| 494 |
+
"group_size": 64,
|
| 495 |
+
"bits": 8
|
| 496 |
+
},
|
| 497 |
+
"language_model.model.layers.23.self_attn.indexer.weights_proj": {
|
| 498 |
+
"group_size": 64,
|
| 499 |
+
"bits": 8
|
| 500 |
+
},
|
| 501 |
+
"language_model.model.layers.27.self_attn.indexer.wq_b": {
|
| 502 |
+
"group_size": 64,
|
| 503 |
+
"bits": 8
|
| 504 |
+
},
|
| 505 |
+
"language_model.model.layers.27.self_attn.indexer.wk": {
|
| 506 |
+
"group_size": 64,
|
| 507 |
+
"bits": 8
|
| 508 |
+
},
|
| 509 |
+
"language_model.model.layers.27.self_attn.indexer.weights_proj": {
|
| 510 |
+
"group_size": 64,
|
| 511 |
+
"bits": 8
|
| 512 |
+
},
|
| 513 |
+
"language_model.model.layers.31.self_attn.indexer.wq_b": {
|
| 514 |
+
"group_size": 64,
|
| 515 |
+
"bits": 8
|
| 516 |
+
},
|
| 517 |
+
"language_model.model.layers.31.self_attn.indexer.wk": {
|
| 518 |
+
"group_size": 64,
|
| 519 |
+
"bits": 8
|
| 520 |
+
},
|
| 521 |
+
"language_model.model.layers.31.self_attn.indexer.weights_proj": {
|
| 522 |
+
"group_size": 64,
|
| 523 |
+
"bits": 8
|
| 524 |
+
},
|
| 525 |
+
"language_model.model.layers.35.self_attn.indexer.wq_b": {
|
| 526 |
+
"group_size": 64,
|
| 527 |
+
"bits": 8
|
| 528 |
+
},
|
| 529 |
+
"language_model.model.layers.35.self_attn.indexer.wk": {
|
| 530 |
+
"group_size": 64,
|
| 531 |
+
"bits": 8
|
| 532 |
+
},
|
| 533 |
+
"language_model.model.layers.35.self_attn.indexer.weights_proj": {
|
| 534 |
+
"group_size": 64,
|
| 535 |
+
"bits": 8
|
| 536 |
+
},
|
| 537 |
+
"language_model.model.layers.39.self_attn.indexer.wq_b": {
|
| 538 |
+
"group_size": 64,
|
| 539 |
+
"bits": 8
|
| 540 |
+
},
|
| 541 |
+
"language_model.model.layers.39.self_attn.indexer.wk": {
|
| 542 |
+
"group_size": 64,
|
| 543 |
+
"bits": 8
|
| 544 |
+
},
|
| 545 |
+
"language_model.model.layers.39.self_attn.indexer.weights_proj": {
|
| 546 |
+
"group_size": 64,
|
| 547 |
+
"bits": 8
|
| 548 |
+
},
|
| 549 |
+
"language_model.model.layers.43.self_attn.indexer.wq_b": {
|
| 550 |
+
"group_size": 64,
|
| 551 |
+
"bits": 8
|
| 552 |
+
},
|
| 553 |
+
"language_model.model.layers.43.self_attn.indexer.wk": {
|
| 554 |
+
"group_size": 64,
|
| 555 |
+
"bits": 8
|
| 556 |
+
},
|
| 557 |
+
"language_model.model.layers.43.self_attn.indexer.weights_proj": {
|
| 558 |
+
"group_size": 64,
|
| 559 |
+
"bits": 8
|
| 560 |
+
}
|
| 561 |
+
}
|
| 562 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
154820,
|
| 5 |
+
154827,
|
| 6 |
+
154829
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 154820,
|
| 9 |
+
"temperature": 1.0,
|
| 10 |
+
"top_p": 0.95,
|
| 11 |
+
"transformers_version": "5.16.0"
|
| 12 |
+
}
|
model-00001.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57a19e6a16ed73f14093d474dc1c1a187a88ada7908c511957eca77eef316dc5
|
| 3 |
+
size 11819070608
|
model-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21a00546741b4f6f4dda7351e100a9bf733f606f228ade523b93866993d11de4
|
| 3 |
+
size 10087582241
|
model-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ab51bc8a3afcbafa8c0f5a6a666490d67ccc244a082b33455d631c73cb4dd48
|
| 3 |
+
size 10024860812
|
model-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e4987a0f318260785914f547303213330891fa7c1ef89a55ff77c2c92c00e25
|
| 3 |
+
size 10005654659
|
model-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4cfe4451be411a0a51a5f0593fa1f156f19c70e05b878232725ce218215510aa
|
| 3 |
+
size 10065952118
|
model-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5894f2a8d8c8805d876ff69a29e5bfbc80af106cf80c39617d339a223fedc097
|
| 3 |
+
size 10019227426
|
model-00007.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27dfa7bd930c7cbaa8786c3e3141b46cb4f17fa54e33f95689f5c98d5e4d3320
|
| 3 |
+
size 10032918493
|
model-00008.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed7904b0edfbe0f5ca966aaca36bcad746a777c3d5bbe74ddb84d3d2a543a575
|
| 3 |
+
size 10079387761
|
model-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0baa087997df85986be6d8ca1687faafc9978f7e32ab9a6b185b006a50fc2303
|
| 3 |
+
size 10005791897
|
model-00010.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce7d67dcd17ba76a092a61d2b54fb0bb7e6606e5aa7e3e0d19c370a6b0db672f
|
| 3 |
+
size 10011288211
|
model-00011.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e748ab5f16245422eb3b3e38dc339557945130cd3c9e45556b72d455a646cee
|
| 3 |
+
size 10101018021
|
model-00012.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96603eeae65e31d570e464192da21fb82ed04154cf26b2baef189a7c4e2f7a1e
|
| 3 |
+
size 10040389058
|
model-00013.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5458268e421887a1345950ec144ff02b7a681e3ef368f5f4968b74c2482a830a
|
| 3 |
+
size 11953061312
|
model-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4df9715d279ca138f0b327ee1d65bb1447475edef49456359331d189c3dff8fa
|
| 3 |
+
size 10087582584
|
model-00015.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1765923d1882830107dbb795366a26051a0797ab7b73a29e514222145a1b3b9
|
| 3 |
+
size 10079387761
|
model-00016.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:610dcb87f006b49bfdbcc62fb256614479128eccfa966bf9ecf2795fb72b2717
|
| 3 |
+
size 10005791865
|
model-00017.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd059c20d8a6b863ac851ed559a9c5eab16a2533b4eaab82f2d61f46cd843511
|
| 3 |
+
size 10011288237
|
model-00018.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:516b3cc3ea3eb378bd6a698bdeb9afb154fb2f969fb444c7f77dc3679541f6cf
|
| 3 |
+
size 10101017881
|
model-00019.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7452822fe57a5133ec1da911ad7d079c0a40a1a0560411ffd29dbf46094adfe0
|
| 3 |
+
size 10040389036
|
model-00020.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2c58b7c4e323f3acb01898e9d7e850eda9f06b31515966dee39e25fdda3b7d8
|
| 3 |
+
size 11953061312
|
model-00021.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8c701c2e1bb6d90872fc047153c3c40f8c849b9ed7fe15d7bbdb2c163e550ca2
|
| 3 |
+
size 10087582488
|
model-00022.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a05aa87aa2787ae147f2d75223b19ed7fda4e7f650c4d24cd599ffe93d731449
|
| 3 |
+
size 10079387759
|
model-00023.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0747db13598d1ad2973b23b734e0f8645b99c928a10d04df35e34c800d212dcf
|
| 3 |
+
size 10005791909
|
model-00024.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89587680f0a1c146f9bf3160a86e8526c4babc69c31a2a3fb202111c5a111724
|
| 3 |
+
size 10011288177
|
model-00025.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b31446a3de53cbe19ad1a7cd0f41fb7802f35e2379fe88edcb31883b73bea9bf
|
| 3 |
+
size 9129118887
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
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.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d
|
| 3 |
+
size 20217442
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": false,
|
| 4 |
+
"do_lower_case": false,
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"extra_special_tokens": [
|
| 7 |
+
"<|endoftext|>",
|
| 8 |
+
"[MASK]",
|
| 9 |
+
"[gMASK]",
|
| 10 |
+
"[sMASK]",
|
| 11 |
+
"<sop>",
|
| 12 |
+
"<eop>",
|
| 13 |
+
"<|system|>",
|
| 14 |
+
"<|user|>",
|
| 15 |
+
"<|assistant|>",
|
| 16 |
+
"<|observation|>",
|
| 17 |
+
"<|begin_of_image|>",
|
| 18 |
+
"<|end_of_image|>",
|
| 19 |
+
"<|begin_of_video|>",
|
| 20 |
+
"<|end_of_video|>",
|
| 21 |
+
"<|begin_of_audio|>",
|
| 22 |
+
"<|end_of_audio|>",
|
| 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 |
+
}
|