Downloads · 30 days
25
12% of all-time downloads
xunkutech-ai/Qwythos-9B-v2-MLX-bf16
Qwythos-9B-v2-MLX-bf16 is a image-text-to-text model from xunkutech-ai. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as apache-2.0.
This repository, xunkutech-ai/Qwythos-9B-v2-MLX-bf16, contains a bfloat16 MLX conversion of empero-ai/Qwythos-9B-v2 for Apple Silicon inference with MLX-VLM and applications that use compatible MLX backends.
Downloads · 30 days
25
12% of all-time downloads
All-time downloads
207
Public
Parameters
9.4B
18.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors18.8 GB · 100%
From the Hugging Face model README
This repository, xunkutech-ai/Qwythos-9B-v2-MLX-bf16, contains a bfloat16 MLX conversion of empero-ai/Qwythos-9B-v2 for Apple Silicon inference with MLX-VLM and applications that use compatible MLX backends.
No additional fine-tuning was performed for this repository. The weights were converted from the new upstream v2 checkpoint to MLX-compatible safetensors while preserving the upstream Apache-2.0 license and model behavior.
This conversion is built from the newer Qwythos-9B-v2 release, not from the earlier Qwythos-9B-Claude-Mythos-5-1M checkpoint.
According to the upstream model card, v2 is a robustness-focused update that:
The upstream developers describe v2 as a hygiene and robustness release rather than a new capability tier.
The model retains the Qwen3.5 visual tower and image/video special tokens. However, the upstream card primarily reports text reasoning evaluations, so users should evaluate visual performance for their own workloads.
Qwythos-9B-v2 is an Empero AI reasoning model built on Qwen3.5-9B. The v2 release applies FTPO (Final-Token Preference Optimization) to the earlier Qwythos checkpoint. Instead of broadly changing the output distribution, FTPO targets the token positions that begin repetition loops and trains the model to prefer coherent alternatives.
The upstream card reports approximately 2,000 automatically mined preference tuples, LoRA rank 256, alpha 128, a learning rate of 1.5e-5, and one training epoch with early stopping. The MTP head was restored from the Qwen3.5-9B base; the upstream card notes that it was not co-trained with the FTPO update.
The following results are copied in summary form from the upstream model card. They were measured with Empero AI's internal generative chain-of-thought harness and should not be treated as independently reproduced by this conversion.
| Benchmark | Upstream Qwythos-9B-v2 result |
|---|---|
| MMLU, chain-of-thought | 83.8% |
| MMLU, 5-shot log-likelihood | 69.6% |
| ARC-Challenge | 96.4% |
| GPQA-Diamond | 49.0% |
| GSM8K | 93.6% |
| HumanEval pass@1 | 77.4% |
| Looping rate, greedy | 0.0% |
| Refusal rate | 0.0% |
See the upstream model card for its complete evaluation methodology, comparisons, sample generations, training details, and limitations.
pip install -U mlx-vlm
or:
uv pip install -U mlx-vlm
This is a Qwen3.5 vision-language checkpoint and should be loaded with MLX-VLM. This card does not claim standalone MLX-LM compatibility.
MLX-VLM supports text-only prompts by omitting the image argument:
mlx_vlm.generate \
--model xunkutech-ai/Qwythos-9B-v2-MLX-bf16 \
--prompt "Prove that there are infinitely many primes." \
--max-tokens 2048 \
--temperature 0.6 \
--repetition-penalty 1.05 \
--gen-kwargs '{"top_p": 0.95, "top_k": 20}'
For difficult reasoning, coding, tool-use, or long-context tasks, increase the generation budget.
The converted checkpoint retains the upstream Qwen3.5 vision tower:
mlx_vlm.generate \
--model xunkutech-ai/Qwythos-9B-v2-MLX-bf16 \
--image /path/to/image.jpg \
--prompt "Describe this image and explain the important details." \
--max-tokens 1024 \
--temperature 0.6
Multiple image paths can be passed after the image argument when supported by the installed MLX-VLM release.
from mlx_vlm import generate, load
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
model_path = "xunkutech-ai/Qwythos-9B-v2-MLX-bf16"
# Load the MLX model and multimodal processor.
model, processor = load(model_path)
config = load_config(model_path)
# Use a local path, URL, or PIL image supported by MLX-VLM.
images = ["/path/to/image.jpg"]
prompt = "Analyze this image step by step."
# Format the prompt with the correct number of visual inputs.
formatted_prompt = apply_chat_template(
processor,
config,
prompt,
num_images=len(images),
)
result = generate(
model,
processor,
formatted_prompt,
images,
max_tokens=1024,
temperature=0.6,
verbose=False,
)
print(result.text)
The upstream model is designed to reason before answering. Its recommended starting point is:
generation_kwargs = {
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"repetition_penalty": 1.05,
"max_tokens": 16384,
}
The upstream v2 card reports that repetition penalty is optional rather than load-bearing because the looping behavior was trained out. A smaller max_tokens value is usually sufficient for simple prompts; difficult reasoning tasks benefit from a larger budget.
The model config contains a 1,048,576-token maximum position setting with static YaRN factor 4 over an original 262,144-token window.
Practical usable context depends on unified memory, prompt modality, KV-cache configuration, runtime version, and generation length. Static YaRN can also carry a short-context quality trade-off. Test the intended context length on the target machine rather than assuming the configured maximum is inexpensive or equally reliable for every workload.
The upstream v2 checkpoint restores 15 native MTP tensors. They are intentionally excluded from this main repository, which contains 760 main-model tensors. A companion MLX drafter can be stored separately as:
xunkutech-ai/Qwythos-9B-v2-MLX-bf16-mtp-draft
The standalone drafter uses model_type qwen3_5_mtp and contains only the sanitized MTP weights plus tokenizer files. With an MLX-VLM release that supports Qwen3.5 MTP speculative decoding, load it with:
mlx_vlm.generate \
--model xunkutech-ai/Qwythos-9B-v2-MLX-bf16 \
--draft-model xunkutech-ai/Qwythos-9B-v2-MLX-bf16-mtp-draft \
--draft-kind mtp \
--draft-block-size 4 \
--prompt "Explain speculative decoding with MTP." \
--max-tokens 2048 \
--temperature 0.6
The companion identifier can also be replaced with a local drafter directory. Speculative-decoding speedup is workload- and hardware-dependent. The upstream card cautions that acceptance may be modest because the restored MTP head was not co-trained with the FTPO-updated main weights.
The source checkpoint was converted with a streaming, GPU-independent safetensors converter. Unchanged BF16 tensors were copied without a full-model BF16-to-FP32 round trip. Only framework-required tensor transformations were applied.
The upstream config stores partial_rotary_factor at the text_config top level, while MLX-VLM Qwen3.5 code paths consume it from rope_parameters.
The converted config moves the value into:
{
"text_config": {
"rope_parameters": {
"rope_type": "yarn",
"factor": 4.0,
"original_max_position_embeddings": 262144,
"mrope_section": [11, 11, 10],
"rope_theta": 10000000,
"partial_rotary_factor": 0.25
}
}
}
This avoids errors reporting that rope_parameters is missing partial_rotary_factor.
The upstream value qwen3_5_vision was normalized to qwen3_5 for compatibility with MLX-VLM versions and bundled MLX backends that use a narrower model-type whitelist.
Hugging Face stores the visual patch projection in channels-first Conv3d layout:
[out, in, depth, height, width] = [1152, 3, 2, 16, 16]
MLX expects channels-last kernel layout:
[out, depth, height, width, in] = [1152, 2, 16, 16, 3]
Both the safetensors shape and the underlying BF16 data were transposed. This fix is required for model loading and downstream sensitivity measurement or quantization; changing only the metadata shape would be incorrect.
The conversion was independently checked without materializing the full model in memory:
| File | Size | Description |
|---|---|---|
| config.json | 2.9 KB | MLX-compatible Qwen3.5 model configuration |
| model-00001-of-00004.safetensors | 5.28 GB | BF16 model shard 1/4 |
| model-00002-of-00004.safetensors | 5.36 GB | BF16 model shard 2/4 |
| model-00003-of-00004.safetensors | 5.34 GB | BF16 model shard 3/4 |
| model-00004-of-00004.safetensors | 2.84 GB | BF16 model shard 4/4 |
| model.safetensors.index.json | 69 KB | Tensor-to-shard index |
| tokenizer.json | 20.0 MB | Qwen3.5 tokenizer |
| tokenizer_config.json | 1.2 KB | Tokenizer metadata |
| chat_template.jinja | 8.0 KB | Upstream chat template |
| preprocessor_config.json | 390 B | Image preprocessing configuration |
| video_preprocessor_config.json | 385 B | Video preprocessing configuration |
| generation_config.json | 163 B | Generation token configuration |
The upstream Qwythos model uses the Qwen3.5 chat template and is intended for tool-augmented and agentic workflows. When a runtime accepts tool definitions, pass them through the tokenizer or processor chat-template interface and parse the emitted tool-call blocks in the application.
Tool execution, argument validation, permissions, and safety policy must be enforced outside the model.
This MLX conversion is released under the same Apache-2.0 license as the upstream model.