Text Generation
MLX
Safetensors
qwen3_5
apple-silicon
quantized
mixed-precision
axquant
axq
development
qwen3.8
MXFP4
mtp
vision
conversational
4-bit precision
Instructions to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP"
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": "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP 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 "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP"
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 AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP"
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 "AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP" \ --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"
Publish Qwen3.8-27B AXQ-MXFP4-MTP weights
Browse files- .gitattributes +1 -0
- README.md +196 -0
- axquant_manifest.json +226 -0
- axquant_mtp_sidecar_manifest.json +30 -0
- axquant_plan.json +0 -0
- axquant_quantizer_execution.json +0 -0
- axquant_runtime.json +58 -0
- axquant_vision_sidecar_manifest.json +30 -0
- chat_template.jinja +170 -0
- config.json +0 -0
- generation_config.json +12 -0
- model-00001-of-00003.safetensors +3 -0
- model-00002-of-00003.safetensors +3 -0
- model-00003-of-00003.safetensors +3 -0
- model-manifest.json +0 -0
- model.safetensors.index.json +0 -0
- mtp.safetensors +3 -0
- mtplx_runtime.json +5 -0
- tokenizer.json +3 -0
- tokenizer_config.json +33 -0
- vision.safetensors +3 -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
|
README.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: mlx
|
| 4 |
+
base_model: Qwen/Qwen3.8-27B
|
| 5 |
+
base_model_relation: quantized
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- mlx
|
| 9 |
+
- apple-silicon
|
| 10 |
+
- quantized
|
| 11 |
+
- mixed-precision
|
| 12 |
+
- axquant
|
| 13 |
+
- axq
|
| 14 |
+
- development
|
| 15 |
+
- qwen3.8
|
| 16 |
+
- MXFP4
|
| 17 |
+
- MXFP4
|
| 18 |
+
- mtp
|
| 19 |
+
- vision
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP — 4.84 BPW measured main
|
| 23 |
+
|
| 24 |
+
An **AXQuant (AXQ)** mixed-precision MLX checkpoint for Apple Silicon, converted directly from
|
| 25 |
+
the BF16 source model. The language path is quantized while the multi-token-prediction (MTP) head and vision tower are preserved at BF16 in the checkpoint (or a bound sidecar when present).
|
| 26 |
+
|
| 27 |
+
> **Development evidence — not a certified AXQuant release.** This package has conversion and
|
| 28 |
+
> artifact-integrity records, but it does not publish measured quality, long-context, kernel-speed,
|
| 29 |
+
> or MTP-speed evidence. Do not interpret the AXQ product label as a benchmark claim.
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
## Model details
|
| 33 |
+
|
| 34 |
+
| Property | Value |
|
| 35 |
+
| --- | --- |
|
| 36 |
+
| Base model | [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B/tree/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0) |
|
| 37 |
+
| Source revision | `1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0` |
|
| 38 |
+
| Product family | `qwen3.8` |
|
| 39 |
+
| Source architecture | `Qwen3_5ForConditionalGeneration` (dense); text path optimized |
|
| 40 |
+
| Main-model parameters | 27.36B logical parameters |
|
| 41 |
+
| Quantizer | AXQuant `1.8.1` |
|
| 42 |
+
| Hub budget class | `MXFP4` |
|
| 43 |
+
| AXQuant base precision class | `6bit` |
|
| 44 |
+
| Planned storage-adjusted BPW | 5.6720 |
|
| 45 |
+
| Measured main-model BPW | 4.8441 |
|
| 46 |
+
| Measured total BPW, including MTP | **5.0147** |
|
| 47 |
+
| Safetensors weight size | 17.41 GB |
|
| 48 |
+
| Approximate complete download | 17.44 GB |
|
| 49 |
+
| Configured maximum context | 262,144 tokens; practical limits depend on unified memory |
|
| 50 |
+
| Primary MLX runtime | MLX-LM |
|
| 51 |
+
| AX Engine native execution | Native manifest included; execution still requires a runtime check |
|
| 52 |
+
| MTP present | `True` |
|
| 53 |
+
| Vision present | `True` |
|
| 54 |
+
| Audio present | `False` |
|
| 55 |
+
|
| 56 |
+
This repository contains MLX Safetensors. It does **not** contain PyTorch or GGUF weights.
|
| 57 |
+
|
| 58 |
+
## Choosing an AXQ pack
|
| 59 |
+
|
| 60 |
+
AXQ names describe a **storage-budget product class**, not one uniform precision applied to every
|
| 61 |
+
tensor. Protected tensors remain at higher precision, so the exact measured BPW is authoritative.
|
| 62 |
+
In particular, a `6bit`-named mixed plan may retain `4bit` as its base precision while selecting
|
| 63 |
+
6-bit, 8-bit, or BF16 for other tensors to meet an approximately 6-BPW total budget. Protection
|
| 64 |
+
floors can also raise a `4bit`-named pack close to (or above) a `6bit` budget on small or heavily
|
| 65 |
+
protected models. When that collapse happens, AutomatosX does **not** publish a separate
|
| 66 |
+
misleading `4bit` sibling for that base.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
| Sibling | Intended trade-off |
|
| 70 |
+
| --- | --- |
|
| 71 |
+
| [4bit sibling](https://huggingface.co/AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-4bit-MTP) | Lower-storage AXQ budget; check its exact BPW |
|
| 72 |
+
| [6bit sibling](https://huggingface.co/AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-6bit-MTP) | Higher average precision near the 6-BPW budget |
|
| 73 |
+
|
| 74 |
+
See the [AutomatosX collections](https://huggingface.co/AutomatosX/collections)
|
| 75 |
+
for the family catalog, or the [complete index](https://huggingface.co/collections/AutomatosX/automatosx-mlx-model-catalog).
|
| 76 |
+
|
| 77 |
+
## Download
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
python -m pip install -U huggingface_hub
|
| 81 |
+
hf download AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP --local-dir ./AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
Allow at least 17.44 GB of free disk space. Pin the resulting Hub commit in reproducible
|
| 85 |
+
deployments rather than relying indefinitely on `main`.
|
| 86 |
+
|
| 87 |
+
## Run with MLX-LM
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
python -m pip install -U mlx-lm
|
| 91 |
+
mlx_lm.generate \
|
| 92 |
+
--model AutomatosX/AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP \
|
| 93 |
+
--prompt "Explain mixed-precision quantization in three sentences." \
|
| 94 |
+
--max-tokens 128 \
|
| 95 |
+
--temp 0.0
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
MLX-LM compatibility covers standard **text/backbone inference**. It may ignore AXQuant runtime
|
| 99 |
+
metadata and optional sidecars (`vision.safetensors`, `mtp.safetensors`); this command therefore
|
| 100 |
+
does not establish MTP acceleration or vision-language quality. The artifact records MLX
|
| 101 |
+
`0.32.0` and MLX-LM `0.31.3` from conversion.
|
| 102 |
+
|
| 103 |
+
## Serve with AX Engine and MTP
|
| 104 |
+
|
| 105 |
+
After installing AX Engine, download the complete repository (see
|
| 106 |
+
[AXQuant](https://github.com/defai-digital/axquant) for conversion, certificates, and
|
| 107 |
+
model-card tooling) and serve the local directory:
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
ax-engine serve ./AX-Qwen3.8-27B-MLX-AXQ-MXFP4-MTP --port 31418
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
AX Engine is the authority for the AXQ runtime contract and native MTP sidecar.
|
| 114 |
+
This development package does not claim runtime speedups until identical-checkpoint benchmarks are
|
| 115 |
+
published. The artifact records AX Engine version `not recorded`. Native
|
| 116 |
+
`model-manifest.json` status: included as `model-manifest.json`.
|
| 117 |
+
|
| 118 |
+
## Quantization layout
|
| 119 |
+
|
| 120 |
+
| Main-weight precision | Parameters | Share |
|
| 121 |
+
| --- | ---: | ---: |
|
| 122 |
+
| `4bit` | 24.35B | 87.65% |
|
| 123 |
+
| `8bit` | 2.54B | 9.15% |
|
| 124 |
+
| `bf16` | 888.07M | 3.20% |
|
| 125 |
+
|
| 126 |
+
- Quantization methods: `affine, bf16`.
|
| 127 |
+
- Group sizes used by quantized assignments: `32, 64`.
|
| 128 |
+
- MTP sidecar: 15 tensors, 424.70M parameters, 0.85 GB, BF16.
|
| 129 |
+
- Vision sidecar: 333 tensors, 460.73M parameters, 0.92 GB, BF16.
|
| 130 |
+
- Vision weights: protected BF16 sidecar.
|
| 131 |
+
- Optimization scope: `text-path`.
|
| 132 |
+
- Support tier: `convertible`.
|
| 133 |
+
|
| 134 |
+
BF16 sidecars, when present, are included in total download size. Their presence does not by itself
|
| 135 |
+
establish MTP acceleration or vision-language quality.
|
| 136 |
+
|
| 137 |
+
## Evidence and validation status
|
| 138 |
+
|
| 139 |
+
| Check | Status |
|
| 140 |
+
| --- | --- |
|
| 141 |
+
| Planning evidence | `architecture_prior` |
|
| 142 |
+
| Calibration | none; the allocation is based on architecture priors |
|
| 143 |
+
| Quantizer execution | 498/498 recorded module conversions succeeded; 0 fallbacks |
|
| 144 |
+
| AX Engine native manifest | included as `model-manifest.json` |
|
| 145 |
+
| Quality versus BF16 or uniform baselines | Not published; no quality-retention claim |
|
| 146 |
+
| MTP acceptance and speed | not measured; no MTP speedup claim |
|
| 147 |
+
| AX Engine kernel evidence | `unmeasured` |
|
| 148 |
+
| Vision-language quality | Present, not certified; text Tier 1 does not imply VLM quality |
|
| 149 |
+
| Speech-recognition quality | Not applicable (audio disabled for this pack) |
|
| 150 |
+
| Long-context quality | 262,144-token capacity is config metadata, not a validated claim |
|
| 151 |
+
| Release certification | **Not certified**; formal AXQuant M0-M8 gates are not closed |
|
| 152 |
+
|
| 153 |
+
## Modalities (capability-gated)
|
| 154 |
+
|
| 155 |
+
Text checkpoint Tier 1 does **not** imply vision or audio quality. `Vision present=true` on a pack is not a quality pass.
|
| 156 |
+
|
| 157 |
+
| Modality | Claim | Supported | Reason |
|
| 158 |
+
| --- | --- | --- | --- |
|
| 159 |
+
| Vision | `present-not-certified` | `true` | vision sidecar present; mlx-vlm smoke not a quality pass (prefixes=['model.visual']) |
|
| 160 |
+
| Audio | `not-applicable` | `false` | audio not supported on this pack |
|
| 161 |
+
|
| 162 |
+
## Intended use and limitations
|
| 163 |
+
|
| 164 |
+
- Intended for local development and evaluation on Apple Silicon with MLX-compatible runtimes.
|
| 165 |
+
- No minimum unified-memory figure is claimed; loadability depends on model size, context length,
|
| 166 |
+
KV-cache policy, runtime buffers, and other processes using unified memory.
|
| 167 |
+
- Architecture-prior allocation is not measured sensitivity. It must not be presented as measured
|
| 168 |
+
model quality.
|
| 169 |
+
- MTP may be ignored outside AX Engine and its speedup is unmeasured for this exact checkpoint.
|
| 170 |
+
- Vision weights are preserved at BF16, but this release does not claim validated VLM quality.
|
| 171 |
+
- The configured context window can require substantially more memory as the KV cache grows.
|
| 172 |
+
|
| 173 |
+
- Upstream capabilities, limitations, biases, and responsible-use guidance still apply.
|
| 174 |
+
|
| 175 |
+
## Provenance and audit files
|
| 176 |
+
|
| 177 |
+
- [`axquant_manifest.json`](axquant_manifest.json): package identity, byte accounting, runtime
|
| 178 |
+
contract, software versions, and file checksums.
|
| 179 |
+
- [`axquant_plan.json`](axquant_plan.json): per-tensor precision decisions and planning evidence.
|
| 180 |
+
- [`axquant_quantizer_execution.json`](axquant_quantizer_execution.json): conversion coverage and
|
| 181 |
+
fallback records.
|
| 182 |
+
- [`axquant_runtime.json`](axquant_runtime.json): declared AX Engine and MLX compatibility metadata; runtime checks remain separate evidence.
|
| 183 |
+
- [`axquant_mtp_sidecar_manifest.json`](axquant_mtp_sidecar_manifest.json): MTP tensor provenance.
|
| 184 |
+
- [`axquant_vision_sidecar_manifest.json`](axquant_vision_sidecar_manifest.json): protected vision tensor provenance.
|
| 185 |
+
- [`model-manifest.json`](model-manifest.json): AX Engine native tensor manifest.
|
| 186 |
+
|
| 187 |
+
All published provenance uses repository-relative paths. Local source paths are stripped before
|
| 188 |
+
publication. The checkpoint was converted from BF16 rather than re-quantized from an OptiQ
|
| 189 |
+
artifact. If an OptiQ repository is published separately, it uses a different quantizer and
|
| 190 |
+
should not be assumed to have identical BPW or quality.
|
| 191 |
+
|
| 192 |
+
## License
|
| 193 |
+
|
| 194 |
+
The checkpoint follows the upstream model license where applicable (often Apache License 2.0). See
|
| 195 |
+
the [Qwen/Qwen3.8-27B model card](https://huggingface.co/Qwen/Qwen3.8-27B/tree/1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0) for license terms, model
|
| 196 |
+
limitations, and responsible-use guidance.
|
axquant_manifest.json
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"axquant_version": "1.8.1",
|
| 3 |
+
"calibration": null,
|
| 4 |
+
"created_at": "2026-08-15T16:16:21.884670Z",
|
| 5 |
+
"effective_bpw": 5.6719817910099914,
|
| 6 |
+
"files": [
|
| 7 |
+
{
|
| 8 |
+
"path": "README.md",
|
| 9 |
+
"sha256": "fe60de522b27ad74662684c5ac94e978eea6edfdb9c112c25de70ebfcc36e9e9",
|
| 10 |
+
"size_bytes": 8973
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"path": "axquant_mtp_sidecar_manifest.json",
|
| 14 |
+
"sha256": "11cc9ea99289a7021240024358df53674102c828a8b930930af0a83074e93b87",
|
| 15 |
+
"size_bytes": 880
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"path": "axquant_plan.json",
|
| 19 |
+
"sha256": "fce5a93299e4ccc15b7d5c4d861572f3ded153b2d76d8da2e8da5919b7435b68",
|
| 20 |
+
"size_bytes": 1091360
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"path": "axquant_quantizer_execution.json",
|
| 24 |
+
"sha256": "c389d287323a820bbbd56cc49d29e0add0011db9c5cc75bc012aa5a43c6eb39b",
|
| 25 |
+
"size_bytes": 130100
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"path": "axquant_runtime.json",
|
| 29 |
+
"sha256": "35b5323bb62130be059d863dd684c17fab25157657e4788ba0a6a103192390c8",
|
| 30 |
+
"size_bytes": 1676
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"path": "axquant_vision_sidecar_manifest.json",
|
| 34 |
+
"sha256": "aa54f3fc80257ea5433e7e161e6a66d4cb25335f4fb2a00f69c2b013e2b0ef28",
|
| 35 |
+
"size_bytes": 887
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"path": "chat_template.jinja",
|
| 39 |
+
"sha256": "c3cf9e34abf4f9e36c2d72165aa9c132d3e2a725b6c2586aaa3a8af9d7a81041",
|
| 40 |
+
"size_bytes": 8952
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"path": "config.json",
|
| 44 |
+
"sha256": "5fb63c8d952c521b289e1fd412a1e225020301c37cebcb44dfa881e334003619",
|
| 45 |
+
"size_bytes": 131203
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"path": "generation_config.json",
|
| 49 |
+
"sha256": "e70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e",
|
| 50 |
+
"size_bytes": 202
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"path": "model-00001-of-00003.safetensors",
|
| 54 |
+
"sha256": "cf4901a75d3c819b69df7002d8134d81982c94d20ba600522add8a2df858033b",
|
| 55 |
+
"size_bytes": 5347788696
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"path": "model-00002-of-00003.safetensors",
|
| 59 |
+
"sha256": "e710ff4cc5964f52e422be8881cd17eacd007831d67a903ce52f3d7452dc29e8",
|
| 60 |
+
"size_bytes": 5368506182
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"path": "model-00003-of-00003.safetensors",
|
| 64 |
+
"sha256": "5cd45370f41b0d6bf5b8f10def7b0be1cbaf76cdc392320c5778726763a639f5",
|
| 65 |
+
"size_bytes": 4927126499
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"path": "model-manifest.json",
|
| 69 |
+
"sha256": "524163237ca2b879bff41f782a5eee6a1266b4f80f5d2c99e07117b7b899127a",
|
| 70 |
+
"size_bytes": 433842
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"path": "model.safetensors.index.json",
|
| 74 |
+
"sha256": "e20dbf6b96058c7b6ccfc1d79745c3f5f4cf8ea4d287ed408da95bdaa4833911",
|
| 75 |
+
"size_bytes": 138731
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"path": "mtp.safetensors",
|
| 79 |
+
"sha256": "914bef4ec6fcfde83925f9c138559253db030d9138b0a375623d6fdc06ebe898",
|
| 80 |
+
"size_bytes": 849400520
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"path": "mtplx_runtime.json",
|
| 84 |
+
"sha256": "119b930ed4b470a08008aa2a51b4a83162907a85b8455f559cffa03e33236ed6",
|
| 85 |
+
"size_bytes": 108
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"path": "tokenizer.json",
|
| 89 |
+
"sha256": "06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523",
|
| 90 |
+
"size_bytes": 19989325
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"path": "tokenizer_config.json",
|
| 94 |
+
"sha256": "95c557768e6b88a7128befc7bfd3c7de50e5d51af9b8b33a9f4dee0e04f99679",
|
| 95 |
+
"size_bytes": 1161
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"path": "vision.safetensors",
|
| 99 |
+
"sha256": "d0d927c489250588557d5761dcd47ca267ef64c95f7e7d58dd6a0cccf54ac68f",
|
| 100 |
+
"size_bytes": 921497320
|
| 101 |
+
}
|
| 102 |
+
],
|
| 103 |
+
"format": "mlx",
|
| 104 |
+
"logical_parameters": 27781427952,
|
| 105 |
+
"main_logical_parameters": 27356728560,
|
| 106 |
+
"main_weight_file_size_bytes": 16564918697,
|
| 107 |
+
"measured_main_bpw": 4.84412269125501,
|
| 108 |
+
"measured_total_bpw": 5.014664976066166,
|
| 109 |
+
"mtp_acceptance_retention": null,
|
| 110 |
+
"mtp_distribution": {
|
| 111 |
+
"bf16": {
|
| 112 |
+
"fraction": 1.0,
|
| 113 |
+
"parameters": 424699392
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
"mtp_measured_speedup": null,
|
| 117 |
+
"mtp_policy": {
|
| 118 |
+
"candidate_bits": [
|
| 119 |
+
8,
|
| 120 |
+
16
|
| 121 |
+
],
|
| 122 |
+
"min_bits": 8,
|
| 123 |
+
"mode": "protected",
|
| 124 |
+
"optimize_for_acceptance": true,
|
| 125 |
+
"preserve_external_sidecar": true,
|
| 126 |
+
"protect_norms": true,
|
| 127 |
+
"protect_output_head": true
|
| 128 |
+
},
|
| 129 |
+
"mtp_present": true,
|
| 130 |
+
"mtp_weight_file_size_bytes": 849400520,
|
| 131 |
+
"plan_sha256": "cbfbf9fbc718c89dfbd5241f97cd784bdb62bd8e570c137a0c3fc2c764d8bcb1",
|
| 132 |
+
"profile": "agent-coding",
|
| 133 |
+
"protected_weight_file_size_bytes": 921497320,
|
| 134 |
+
"quantizer": "axquant",
|
| 135 |
+
"runtime": {
|
| 136 |
+
"ax_engine": {
|
| 137 |
+
"decode_kernel": null,
|
| 138 |
+
"fused_mtp": null,
|
| 139 |
+
"kernel_evidence": "unmeasured",
|
| 140 |
+
"model_manifest": "model-manifest.json",
|
| 141 |
+
"preferred_group_size": 32
|
| 142 |
+
},
|
| 143 |
+
"compatible_runtimes": [
|
| 144 |
+
{
|
| 145 |
+
"compatibility_level": "B",
|
| 146 |
+
"manifest": "config.json",
|
| 147 |
+
"mtp_support": "runtime-dependent",
|
| 148 |
+
"name": "mlx-lm",
|
| 149 |
+
"notes": [
|
| 150 |
+
"Standard backbone inference is the compatibility target.",
|
| 151 |
+
"AXQuant MTP metadata may be ignored by MLX-LM."
|
| 152 |
+
],
|
| 153 |
+
"standard_inference": true,
|
| 154 |
+
"standard_mlx_weights": true,
|
| 155 |
+
"support_level": "standard-inference"
|
| 156 |
+
}
|
| 157 |
+
],
|
| 158 |
+
"created_at": "2026-08-15T16:16:13.776072Z",
|
| 159 |
+
"kv_cache": null,
|
| 160 |
+
"memory_policy": {
|
| 161 |
+
"kv_cache_precision": "runtime-default",
|
| 162 |
+
"mtp_buffers": "preallocate-when-enabled",
|
| 163 |
+
"prefix_cache": "runtime-managed",
|
| 164 |
+
"unified_memory_safety_margin": "benchmark-required"
|
| 165 |
+
},
|
| 166 |
+
"mtp": {
|
| 167 |
+
"acceptance_retention": null,
|
| 168 |
+
"detected": true,
|
| 169 |
+
"draft_tokens": 1,
|
| 170 |
+
"enabled_by_default": true,
|
| 171 |
+
"head_precision": null,
|
| 172 |
+
"measured_speedup": null,
|
| 173 |
+
"optimized": false,
|
| 174 |
+
"recommended_temperature_max": null,
|
| 175 |
+
"sidecar_file": "mtp.safetensors",
|
| 176 |
+
"verification_mode": "runtime-default"
|
| 177 |
+
},
|
| 178 |
+
"optimization_scope": "text-path",
|
| 179 |
+
"primary_runtime": {
|
| 180 |
+
"compatibility_level": "A",
|
| 181 |
+
"manifest": "model-manifest.json",
|
| 182 |
+
"mtp_support": "native",
|
| 183 |
+
"name": "ax-engine",
|
| 184 |
+
"notes": [
|
| 185 |
+
"Runtime claims require a passing AX Engine doctor and benchmark report."
|
| 186 |
+
],
|
| 187 |
+
"standard_inference": true,
|
| 188 |
+
"standard_mlx_weights": true,
|
| 189 |
+
"support_level": "optimized"
|
| 190 |
+
},
|
| 191 |
+
"schema_version": "axquant.runtime.v1"
|
| 192 |
+
},
|
| 193 |
+
"schema_version": "axquant.artifact.v2",
|
| 194 |
+
"software_versions": {
|
| 195 |
+
"ax_engine": null,
|
| 196 |
+
"axquant": "1.8.1",
|
| 197 |
+
"mlx": "0.32.0",
|
| 198 |
+
"mlx_lm": "0.31.3",
|
| 199 |
+
"pydantic": "2.13.4",
|
| 200 |
+
"python": "3.13.14",
|
| 201 |
+
"safetensors": "0.8.0"
|
| 202 |
+
},
|
| 203 |
+
"source_model": {
|
| 204 |
+
"architecture": "Qwen3_5ForConditionalGeneration",
|
| 205 |
+
"format": "mlx",
|
| 206 |
+
"local_path": null,
|
| 207 |
+
"model_id": "Qwen/Qwen3.8-27B",
|
| 208 |
+
"revision": "1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0"
|
| 209 |
+
},
|
| 210 |
+
"target_class": "6bit",
|
| 211 |
+
"weight_distribution": {
|
| 212 |
+
"4bit": {
|
| 213 |
+
"fraction": 0.8765048435261222,
|
| 214 |
+
"parameters": 24350556160
|
| 215 |
+
},
|
| 216 |
+
"8bit": {
|
| 217 |
+
"fraction": 0.0915286573603551,
|
| 218 |
+
"parameters": 2542796800
|
| 219 |
+
},
|
| 220 |
+
"bf16": {
|
| 221 |
+
"fraction": 0.0319664991135226,
|
| 222 |
+
"parameters": 888074992
|
| 223 |
+
}
|
| 224 |
+
},
|
| 225 |
+
"weight_file_size_bytes": 17414319217
|
| 226 |
+
}
|
axquant_mtp_sidecar_manifest.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"created_at": "2026-08-15T16:16:13.564577Z",
|
| 3 |
+
"dtypes": [
|
| 4 |
+
"BF16"
|
| 5 |
+
],
|
| 6 |
+
"output": {
|
| 7 |
+
"path": "mtp.safetensors",
|
| 8 |
+
"sha256": "914bef4ec6fcfde83925f9c138559253db030d9138b0a375623d6fdc06ebe898",
|
| 9 |
+
"size_bytes": 849400520
|
| 10 |
+
},
|
| 11 |
+
"parameters": 424699392,
|
| 12 |
+
"role": "mtp",
|
| 13 |
+
"schema_version": "axquant.protected-tensor-sidecar.v1",
|
| 14 |
+
"source_files": [
|
| 15 |
+
{
|
| 16 |
+
"path": "model-00018-of-00018.safetensors",
|
| 17 |
+
"sha256": "1d3479509e21494658f9b64d317f5ea8e55c4025d28c702d6c4d0b356ce8ea06",
|
| 18 |
+
"size_bytes": 3392197344
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"source_model": {
|
| 22 |
+
"architecture": "Qwen3_5ForConditionalGeneration",
|
| 23 |
+
"format": "mlx",
|
| 24 |
+
"local_path": null,
|
| 25 |
+
"model_id": "Qwen/Qwen3.8-27B",
|
| 26 |
+
"revision": "1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0"
|
| 27 |
+
},
|
| 28 |
+
"tensor_count": 15,
|
| 29 |
+
"tensor_names_sha256": "8cadbfe029ec03d26d19a94845830662c4220caa1b9293ab908b76099355217e"
|
| 30 |
+
}
|
axquant_plan.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
axquant_quantizer_execution.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
axquant_runtime.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"ax_engine": {
|
| 3 |
+
"decode_kernel": null,
|
| 4 |
+
"fused_mtp": null,
|
| 5 |
+
"kernel_evidence": "unmeasured",
|
| 6 |
+
"model_manifest": "model-manifest.json",
|
| 7 |
+
"preferred_group_size": 32
|
| 8 |
+
},
|
| 9 |
+
"compatible_runtimes": [
|
| 10 |
+
{
|
| 11 |
+
"compatibility_level": "B",
|
| 12 |
+
"manifest": "config.json",
|
| 13 |
+
"mtp_support": "runtime-dependent",
|
| 14 |
+
"name": "mlx-lm",
|
| 15 |
+
"notes": [
|
| 16 |
+
"Standard backbone inference is the compatibility target.",
|
| 17 |
+
"AXQuant MTP metadata may be ignored by MLX-LM."
|
| 18 |
+
],
|
| 19 |
+
"standard_inference": true,
|
| 20 |
+
"standard_mlx_weights": true,
|
| 21 |
+
"support_level": "standard-inference"
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"created_at": "2026-08-15T16:16:13.776072Z",
|
| 25 |
+
"kv_cache": null,
|
| 26 |
+
"memory_policy": {
|
| 27 |
+
"kv_cache_precision": "runtime-default",
|
| 28 |
+
"mtp_buffers": "preallocate-when-enabled",
|
| 29 |
+
"prefix_cache": "runtime-managed",
|
| 30 |
+
"unified_memory_safety_margin": "benchmark-required"
|
| 31 |
+
},
|
| 32 |
+
"mtp": {
|
| 33 |
+
"acceptance_retention": null,
|
| 34 |
+
"detected": true,
|
| 35 |
+
"draft_tokens": 1,
|
| 36 |
+
"enabled_by_default": true,
|
| 37 |
+
"head_precision": null,
|
| 38 |
+
"measured_speedup": null,
|
| 39 |
+
"optimized": false,
|
| 40 |
+
"recommended_temperature_max": null,
|
| 41 |
+
"sidecar_file": "mtp.safetensors",
|
| 42 |
+
"verification_mode": "runtime-default"
|
| 43 |
+
},
|
| 44 |
+
"optimization_scope": "text-path",
|
| 45 |
+
"primary_runtime": {
|
| 46 |
+
"compatibility_level": "A",
|
| 47 |
+
"manifest": "model-manifest.json",
|
| 48 |
+
"mtp_support": "native",
|
| 49 |
+
"name": "ax-engine",
|
| 50 |
+
"notes": [
|
| 51 |
+
"Runtime claims require a passing AX Engine doctor and benchmark report."
|
| 52 |
+
],
|
| 53 |
+
"standard_inference": true,
|
| 54 |
+
"standard_mlx_weights": true,
|
| 55 |
+
"support_level": "optimized"
|
| 56 |
+
},
|
| 57 |
+
"schema_version": "axquant.runtime.v1"
|
| 58 |
+
}
|
axquant_vision_sidecar_manifest.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"created_at": "2026-08-15T16:16:11.098120Z",
|
| 3 |
+
"dtypes": [
|
| 4 |
+
"BF16"
|
| 5 |
+
],
|
| 6 |
+
"output": {
|
| 7 |
+
"path": "vision.safetensors",
|
| 8 |
+
"sha256": "d0d927c489250588557d5761dcd47ca267ef64c95f7e7d58dd6a0cccf54ac68f",
|
| 9 |
+
"size_bytes": 921497320
|
| 10 |
+
},
|
| 11 |
+
"parameters": 460730096,
|
| 12 |
+
"role": "vision",
|
| 13 |
+
"schema_version": "axquant.protected-tensor-sidecar.v1",
|
| 14 |
+
"source_files": [
|
| 15 |
+
{
|
| 16 |
+
"path": "model-00001-of-00018.safetensors",
|
| 17 |
+
"sha256": "ba0ce20aae489ad196733da5064bcdf159a1fe84f53336648196e1ebb7751b1c",
|
| 18 |
+
"size_bytes": 3966730552
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"source_model": {
|
| 22 |
+
"architecture": "Qwen3_5ForConditionalGeneration",
|
| 23 |
+
"format": "mlx",
|
| 24 |
+
"local_path": null,
|
| 25 |
+
"model_id": "Qwen/Qwen3.8-27B",
|
| 26 |
+
"revision": "1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0"
|
| 27 |
+
},
|
| 28 |
+
"tensor_count": 333,
|
| 29 |
+
"tensor_names_sha256": "74db978fa718039692971f2ece846f2cc7a62a960047b5cebe2d758cc82ac2e9"
|
| 30 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- set image_count = namespace(value=0) %}
|
| 2 |
+
{%- set video_count = namespace(value=0) %}
|
| 3 |
+
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
|
| 4 |
+
{%- if content is string %}
|
| 5 |
+
{{- content }}
|
| 6 |
+
{%- elif content is iterable and content is not mapping %}
|
| 7 |
+
{%- for item in content %}
|
| 8 |
+
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
|
| 9 |
+
{%- if is_system_content %}
|
| 10 |
+
{{- raise_exception('System message cannot contain images.') }}
|
| 11 |
+
{%- endif %}
|
| 12 |
+
{%- if do_vision_count %}
|
| 13 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{%- if add_vision_id %}
|
| 16 |
+
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 17 |
+
{%- endif %}
|
| 18 |
+
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
|
| 19 |
+
{%- elif 'video' in item or item.type == 'video' %}
|
| 20 |
+
{%- if is_system_content %}
|
| 21 |
+
{{- raise_exception('System message cannot contain videos.') }}
|
| 22 |
+
{%- endif %}
|
| 23 |
+
{%- if do_vision_count %}
|
| 24 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
{%- if add_vision_id %}
|
| 27 |
+
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
|
| 30 |
+
{%- elif 'text' in item %}
|
| 31 |
+
{{- item.text }}
|
| 32 |
+
{%- else %}
|
| 33 |
+
{{- raise_exception('Unexpected item type in content.') }}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endfor %}
|
| 36 |
+
{%- elif content is none or content is undefined %}
|
| 37 |
+
{{- '' }}
|
| 38 |
+
{%- else %}
|
| 39 |
+
{{- raise_exception('Unexpected content type.') }}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- endmacro %}
|
| 42 |
+
{%- if not messages %}
|
| 43 |
+
{{- raise_exception('No messages provided.') }}
|
| 44 |
+
{%- endif %}
|
| 45 |
+
{%- set reasoning_instructions = '' %}
|
| 46 |
+
{%- if enable_thinking is undefined or enable_thinking is true %}
|
| 47 |
+
{%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
|
| 48 |
+
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
|
| 49 |
+
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- if resolved_reasoning_effort == 'xhigh' %}
|
| 52 |
+
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
|
| 53 |
+
{%- elif resolved_reasoning_effort == 'low' %}
|
| 54 |
+
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- endif %}
|
| 57 |
+
{%- if tools and tools is iterable and tools is not mapping %}
|
| 58 |
+
{{- '<|im_start|>system\n' }}
|
| 59 |
+
{%- if reasoning_instructions %}
|
| 60 |
+
{{- reasoning_instructions + '\n\n' }}
|
| 61 |
+
{%- endif %}
|
| 62 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
|
| 63 |
+
{%- for tool in tools %}
|
| 64 |
+
{{- "\n" }}
|
| 65 |
+
{{- tool | tojson }}
|
| 66 |
+
{%- endfor %}
|
| 67 |
+
{{- "\n</tools>" }}
|
| 68 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 69 |
+
{%- if messages[0].role == 'system' %}
|
| 70 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 71 |
+
{%- if content %}
|
| 72 |
+
{{- '\n\n' + content }}
|
| 73 |
+
{%- endif %}
|
| 74 |
+
{%- endif %}
|
| 75 |
+
{{- '<|im_end|>\n' }}
|
| 76 |
+
{%- else %}
|
| 77 |
+
{%- if messages[0].role == 'system' %}
|
| 78 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 79 |
+
{%- if content %}
|
| 80 |
+
{{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + content + '<|im_end|>\n' }}
|
| 81 |
+
{%- elif reasoning_instructions %}
|
| 82 |
+
{{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
|
| 83 |
+
{%- endif %}
|
| 84 |
+
{%- elif reasoning_instructions %}
|
| 85 |
+
{{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- endif %}
|
| 88 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 89 |
+
{%- for message in messages[::-1] %}
|
| 90 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 91 |
+
{%- if ns.multi_step_tool and message.role == "user" %}
|
| 92 |
+
{%- set content = render_content(message.content, false)|trim %}
|
| 93 |
+
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 94 |
+
{%- set ns.multi_step_tool = false %}
|
| 95 |
+
{%- set ns.last_query_index = index %}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- endif %}
|
| 98 |
+
{%- endfor %}
|
| 99 |
+
{%- if ns.multi_step_tool %}
|
| 100 |
+
{{- raise_exception('No user query found in messages.') }}
|
| 101 |
+
{%- endif %}
|
| 102 |
+
{%- for message in messages %}
|
| 103 |
+
{%- set content = render_content(message.content, true)|trim %}
|
| 104 |
+
{%- if message.role == "system" %}
|
| 105 |
+
{%- if not loop.first %}
|
| 106 |
+
{{- raise_exception('System message must be at the beginning.') }}
|
| 107 |
+
{%- endif %}
|
| 108 |
+
{%- elif message.role == "user" %}
|
| 109 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 110 |
+
{%- elif message.role == "assistant" %}
|
| 111 |
+
{%- set reasoning_content = '' %}
|
| 112 |
+
{%- if message.reasoning_content is string %}
|
| 113 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 114 |
+
{%- endif %}
|
| 115 |
+
{%- set reasoning_content = reasoning_content|trim %}
|
| 116 |
+
{%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
|
| 117 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 118 |
+
{%- else %}
|
| 119 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 120 |
+
{%- endif %}
|
| 121 |
+
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
|
| 122 |
+
{%- for tool_call in message.tool_calls %}
|
| 123 |
+
{%- if tool_call.function is defined %}
|
| 124 |
+
{%- set tool_call = tool_call.function %}
|
| 125 |
+
{%- endif %}
|
| 126 |
+
{%- if loop.first %}
|
| 127 |
+
{%- if content|trim %}
|
| 128 |
+
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 129 |
+
{%- else %}
|
| 130 |
+
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 131 |
+
{%- endif %}
|
| 132 |
+
{%- else %}
|
| 133 |
+
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 134 |
+
{%- endif %}
|
| 135 |
+
{%- if tool_call.arguments is defined and tool_call.arguments != '' %}
|
| 136 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 137 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 138 |
+
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
|
| 139 |
+
{{- args_value }}
|
| 140 |
+
{{- '\n</parameter>\n' }}
|
| 141 |
+
{%- endfor %}
|
| 142 |
+
{%- endif %}
|
| 143 |
+
{{- '</function>\n</tool_call>' }}
|
| 144 |
+
{%- endfor %}
|
| 145 |
+
{%- endif %}
|
| 146 |
+
{{- '<|im_end|>\n' }}
|
| 147 |
+
{%- elif message.role == "tool" %}
|
| 148 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 149 |
+
{{- '<|im_start|>user' }}
|
| 150 |
+
{%- endif %}
|
| 151 |
+
{{- '\n<tool_response>\n' }}
|
| 152 |
+
{{- content }}
|
| 153 |
+
{{- '\n</tool_response>' }}
|
| 154 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 155 |
+
{{- '<|im_end|>\n' }}
|
| 156 |
+
{%- elif loop.last %}
|
| 157 |
+
{{- '<|im_end|>\n' }}
|
| 158 |
+
{%- endif %}
|
| 159 |
+
{%- else %}
|
| 160 |
+
{{- raise_exception('Unexpected message role.') }}
|
| 161 |
+
{%- endif %}
|
| 162 |
+
{%- endfor %}
|
| 163 |
+
{%- if add_generation_prompt %}
|
| 164 |
+
{{- '<|im_start|>assistant\n' }}
|
| 165 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 166 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 167 |
+
{%- else %}
|
| 168 |
+
{{- '<think>\n' }}
|
| 169 |
+
{%- endif %}
|
| 170 |
+
{%- endif %}
|
config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 248044,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
248046,
|
| 6 |
+
248044
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 248044,
|
| 9 |
+
"temperature": 1.0,
|
| 10 |
+
"top_k": 20,
|
| 11 |
+
"top_p": 0.95
|
| 12 |
+
}
|
model-00001-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf4901a75d3c819b69df7002d8134d81982c94d20ba600522add8a2df858033b
|
| 3 |
+
size 5347788696
|
model-00002-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e710ff4cc5964f52e422be8881cd17eacd007831d67a903ce52f3d7452dc29e8
|
| 3 |
+
size 5368506182
|
model-00003-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cd45370f41b0d6bf5b8f10def7b0be1cbaf76cdc392320c5778726763a639f5
|
| 3 |
+
size 4927126499
|
model-manifest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mtp.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:914bef4ec6fcfde83925f9c138559253db030d9138b0a375623d6fdc06ebe898
|
| 3 |
+
size 849400520
|
mtplx_runtime.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"mtp_depth_max": 1,
|
| 3 |
+
"mtp_norm_layout": "raw_hf_delta",
|
| 4 |
+
"schema_version": "axquant.mtp-runtime.v1"
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
|
| 3 |
+
size 19989325
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"audio_bos_token": "<|audio_start|>",
|
| 4 |
+
"audio_eos_token": "<|audio_end|>",
|
| 5 |
+
"audio_token": "<|audio_pad|>",
|
| 6 |
+
"backend": "tokenizers",
|
| 7 |
+
"bos_token": null,
|
| 8 |
+
"clean_up_tokenization_spaces": false,
|
| 9 |
+
"eos_token": "<|im_end|>",
|
| 10 |
+
"errors": "replace",
|
| 11 |
+
"image_token": "<|image_pad|>",
|
| 12 |
+
"is_local": true,
|
| 13 |
+
"local_files_only": false,
|
| 14 |
+
"model_max_length": 262144,
|
| 15 |
+
"model_specific_special_tokens": {
|
| 16 |
+
"audio_bos_token": "<|audio_start|>",
|
| 17 |
+
"audio_eos_token": "<|audio_end|>",
|
| 18 |
+
"audio_token": "<|audio_pad|>",
|
| 19 |
+
"image_token": "<|image_pad|>",
|
| 20 |
+
"video_token": "<|video_pad|>",
|
| 21 |
+
"vision_bos_token": "<|vision_start|>",
|
| 22 |
+
"vision_eos_token": "<|vision_end|>"
|
| 23 |
+
},
|
| 24 |
+
"pad_token": "<|endoftext|>",
|
| 25 |
+
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 26 |
+
"split_special_tokens": false,
|
| 27 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 28 |
+
"tool_parser_type": "qwen3_coder",
|
| 29 |
+
"unk_token": null,
|
| 30 |
+
"video_token": "<|video_pad|>",
|
| 31 |
+
"vision_bos_token": "<|vision_start|>",
|
| 32 |
+
"vision_eos_token": "<|vision_end|>"
|
| 33 |
+
}
|
vision.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0d927c489250588557d5761dcd47ca267ef64c95f7e7d58dd6a0cccf54ac68f
|
| 3 |
+
size 921497320
|