Views
No views yet
empero-ai/Qwythos-9B-Claude-Mythos-5-1Muv tool install mlx-lmpip install -U mlx-lmmlx-vlm usage:pip install -U mlx-vlmmlx_lm.chat --model xunkutech-ai/Qwythos-9B-Claude-Mythos-5-1M-MLX-bf161from mlx_lm import load, generate
2
3model_id = "xunkutech-ai/Qwythos-9B-Claude-Mythos-5-1M-MLX-bf16"
4
5model, tokenizer = load(model_id)
6
7messages = [
8 {
9 "role": "user",
10 "content": "Explain how YaRN rope scaling enables long-context inference.",
11 }
12]
13
14prompt = tokenizer.apply_chat_template(
15 messages,
16 add_generation_prompt=True,
17)
18
19text = generate(
20 model,
21 tokenizer,
22 prompt=prompt,
23 max_tokens=2048,
24 verbose=True,
25)
26
27print(text)mlx_lm.server --model xunkutech-ai/Qwythos-9B-Claude-Mythos-5-1M-MLX-bf16 --port 80801curl -X POST "http://localhost:8080/v1/chat/completions" \
2 -H "Content-Type: application/json" \
3 --data '{
4 "model": "xunkutech-ai/Qwythos-9B-Claude-Mythos-5-1M-MLX-bf16",
5 "messages": [
6 {
7 "role": "user",
8 "content": "Give a concise explanation of Gated DeltaNet attention."
9 }
10 ],
11 "max_tokens": 1024
12 }'mlx-vlm, you can load it with:1from mlx_vlm import load, generate
2
3model_id = "xunkutech-ai/Qwythos-9B-Claude-Mythos-5-1M-MLX-bf16"
4
5model, processor = load(model_id)
6
7result = generate(
8 model=model,
9 processor=processor,
10 prompt="What is the capital of France?",
11 max_tokens=128,
12 temperature=0.6,
13)
14
15print(result.text)1generation_kwargs = {
2 "temperature": 0.6,
3 "top_p": 0.95,
4 "top_k": 20,
5 "repetition_penalty": 1.05,
6 "max_tokens": 4096,
7}max_tokens for difficult reasoning, tool-use, code, or long-context
tasks.1uv run --with mlx-vlm mlx_vlm.convert \
2 --model empero-ai/Qwythos-9B-Claude-Mythos-5-1M \
3 --mlx-path ./Qwythos-9B-Claude-Mythos-5-1M-MLX-bf16 \
4 --dtype bfloat16 \
5 --trust-remote-codemlx-vlm revealed two upstream compatibility bugs
that required patches. These affect mlx-vlm ≤ 0.6.3 and any LM Studio build
using the bundled MLX backends.partial_rotary_factor Location Mismatchmlx-vlm's qwen3_5.TextConfig.__post_init__ expected
partial_rotary_factor to be inside the rope_parameters dictionary, but the
upstream HuggingFace config places it at the text_config top level:1// Upstream config (partial_rotary_factor is OUTSIDE rope_parameters)
2{
3 "text_config": {
4 "partial_rotary_factor": 0.25,
5 "rope_parameters": {
6 "type": "yarn",
7 "mrope_section": [11, 11, 10],
8 "rope_theta": 10000000
9 // missing partial_rotary_factor → ValueError
10 }
11 }
12}ValueError: rope_parameters must contain keys {'partial_rotary_factor', 'rope_theta', 'type', 'mrope_section'}mlx_vlm/models/qwen3_5/config.py:partial_rotary_factor from the rope_parameters default factory to a
standalone TextConfig field with default 0.25."partial_rotary_factor" from the required-keys set in
__post_init__.partial_rotary_factor is found at the text_config
top level, copy it into rope_parameters so downstream code that accesses
args.rope_parameters["partial_rotary_factor"] (e.g.
qwen3_5/language.py line 1390) continues to work.vision_config.model_type Valuevision_config.model_type to qwen3_5_vision, but
mlx_vlm.models.qwen3_vl.vision.VisionModel.__init__ only whitelists
qwen3_vl, qwen3_5, and qwen3_5_moe.ValueError: Unsupported model type: qwen3_5_visionconfig.json:vision_config.model_type from qwen3_5_vision to qwen3_5 before
uploading.mlx-vlm), you may need to apply the same two fixes to the
generated config.json:1import json
2
3config_path = "path/to/config.json"
4with open(config_path) as f:
5 cfg = json.load(f)
6
7# Fix 1: move partial_rotary_factor into rope_parameters
8tc = cfg["text_config"]
9pr = tc["rope_parameters"]
10if "partial_rotary_factor" not in pr:
11 pr["partial_rotary_factor"] = tc.pop("partial_rotary_factor", 0.25)
12
13# Fix 2: correct vision model type
14vc = cfg.get("vision_config", {})
15if vc.get("model_type") == "qwen3_5_vision":
16 vc["model_type"] = "qwen3_5"
17
18with open(config_path, "w") as f:
19 json.dump(cfg, f, indent=2)tools argument when your
runtime supports it, then parse emitted tool call blocks in your application.