Instructions to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit") model = AutoModelForMultimodalLM.from_pretrained("trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit 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("trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit") 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
- vLLM
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit
- SGLang
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit", max_seq_length=2048, ) - Pi
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-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 "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-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 "trjxter/Qwimi-3.6-27B-Coder-MTP-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 trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit
Run Hermes
hermes
- OpenClaw new
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-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 "trjxter/Qwimi-3.6-27B-Coder-MTP-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 "trjxter/Qwimi-3.6-27B-Coder-MTP-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"
- MLX LM
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit with Docker Model Runner:
docker model run hf.co/trjxter/Qwimi-3.6-27B-Coder-MTP-mlx-6Bit
Qwimi-3.6-27B-Coder-MTP-MLX-6bit
A 6-bit MLX quantization of
trjxter/Qwimi-3.6-27B-Coder-MTP-BF16, a coding-focused SFT of Qwen 3.6 27B.
The model was trained in one mixed SFT run across coding, Qwen-native XML-style tool calling,
and agentic software-engineering trajectories. This repository is intended for local
inference on Apple silicon using mlx-lm.
This is an MLX repository, not GGUF. It is not intended for
llama.cpp, CUDA inference, or a GGUF-only Ollama workflow.
Quant position: balanced quality/size MLX release.
Primary tradeoff: lower quantization loss than Q4 while remaining smaller than Q8.
Recommendation: Recommended balanced release when unified memory permits.
Contents
- Source and quantization
- Which MLX quant should I use?
- Unified-memory guidance
- Installation
- How to run
- Tool calling
- Training summary
- Benchmarks
- Known limitations
- Verification and reproducibility
1. Source and quantization
- Merged source:
trjxter/Qwimi-3.6-27B-Coder-MTP-BF16 - Base architecture: Qwen 3.6 27B, approximately 27.8B parameters
- Architecture family: dense hybrid transformer with standard attention and GatedDeltaNet layers
- Specialization: text-only coding SFT; vision tower frozen
- Format: MLX model weights for Apple silicon
- Nominal weight precision: 6-bit
- Expected conversion flag:
--q-bits 6 - Validated SFT sequence length: 16,384 tokens
The uploaded repository's config.json is the source of truth for quantization mode, group
size, and tensor metadata. This README intentionally does not invent a group size that may
differ from the actual conversion.
The source name includes MTP. Do not assume that conversion to MLX automatically preserves
or activates the same MTP runtime path used by a specific llama.cpp build.
2. Which MLX quant should I use?
Choose Q6 when you want the strongest balance between coding quality, memory use, and context headroom.
Prefer Q4 when memory is the main constraint. Prefer Q8 when maximum fidelity is worth the additional memory cost.
| MLX release | Relative memory use | Expected fidelity | Best fit |
|---|---|---|---|
| Q4 | Lowest | Good, with the most quantization loss | Constrained memory and more context headroom |
| Q6 | Medium | Strong balance | General recommendation |
| Q8 | Highest | Highest of the three | Maximum quality on larger-memory Macs |
Exact quality and memory behavior should be measured with the uploaded artifacts and your own workload.
3. Unified-memory guidance
- Practical target: 48 GB unified memory or more.
- 32 GB Macs: may be tight after model cache and other applications are included.
- 64 GB+ Macs: provide comfortable room for longer contexts and agent tooling.
These are rough planning targets, not guarantees. Actual memory use depends on the exact file size, group size, prompt length, generation length, cache configuration, macOS version, and other applications using unified memory.
4. Installation
MLX requires Apple silicon.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip mlx-lm
Qwen 3.6 / qwen3_5 support is relatively new, so update mlx-lm before diagnosing model,
cache, server, or tool-parser problems.
5. How to run
One-shot generation
mlx_lm.generate \
--model trjxter/Qwimi-3.6-27B-Coder-MTP-MLX-6bit \
--prompt "Write a Python function that reverses a linked list and include tests."
Interactive chat
mlx_lm.chat --model trjxter/Qwimi-3.6-27B-Coder-MTP-MLX-6bit
Python API
from mlx_lm import generate, load
MODEL_ID = "trjxter/Qwimi-3.6-27B-Coder-MTP-MLX-6bit"
model, tokenizer = load(MODEL_ID)
messages = [
{
"role": "user",
"content": "Implement an LRU cache in Python and explain the complexity.",
}
]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=False,
)
response = generate(
model,
tokenizer,
prompt=prompt,
max_tokens=1024,
verbose=True,
)
print(response)
Local OpenAI-style server
mlx_lm.server \
--model trjxter/Qwimi-3.6-27B-Coder-MTP-MLX-6bit \
--host 127.0.0.1 \
--port 8080
mlx_lm.server is most appropriate as a local development endpoint, not a hardened public
production service.
Context guidance
The base architecture may expose a larger native context, but Qwimi was trained and validated at 16,384 tokens. Longer-context behavior should be tested separately.
6. Tool calling
Qwimi was trained on Qwen 3.6's native XML-style tool-call format rather than the older plain JSON-object style.
<tool_call>
<function=search_web>
<parameter=query>latest MLX documentation</parameter>
</function>
</tool_call>
Recommendations:
- Apply the repository's tokenizer chat template.
- Test the exact
mlx-lmversion you plan to deploy. - Validate multi-turn tool calls, inserted tool results, and stop behavior.
- Do not assume that working text generation guarantees correct server-side tool parsing.
- Keep direct XML validation or a fallback parser for agent workflows.
7. Training summary
- Base:
unsloth/Qwen3.6-27B - Model size: approximately 27.8B parameters
- Method: 4-bit QLoRA during SFT, rank 64, alpha 64
- Trainable parameters: 466,911,232, approximately 1.68%
- Training style: one mixed SFT run, not three sequential stages
- Total training rows: 22,359
- Training tokens: approximately 72.5M
- Maximum sequence length: 16,384
- Effective batch size: 16
- Epochs: 1
- Optimizer steps: 1,398
- Hardware: 1× A100-SXM4-80GB
- Vision tower: frozen
- Final eval loss: coding 0.4761; tool-calling 0.0208; agentic 0.2892
- All three eval curves improved monotonically through the run with no observed overfitting signal.
| Domain | Train rows | Eval rows | Token share |
|---|---|---|---|
| Coding | 16,083 | 1,778 | 82.5% |
| Tool-calling | 5,360 | 595 | 4.8% |
| Agentic | 917 | 102 | 12.7% |
trjxter/Kimi-K2.7-CodingTraces-9000x was used in full: 9,014 rows.
8. Benchmarks
Qwimi was compared against the base Qwen 3.6 27B model using equivalent Q6 GGUF builds with MTP enabled and the same evaluation harness.
Important: these results were produced by the Q6 GGUF /
llama.cppbuilds. They are included as evidence about the underlying Qwimi model, not as direct benchmarks of this MLX quant. MLX Q4, Q6, and Q8 should be benchmarked separately before making backend- or precision-specific claims.
8.1 Fully auto-scored 300-task custom benchmark
| Category | Tasks |
|---|---|
| Coding | 150 |
| Tool-calling | 75 |
| Agentic workflows | 75 |
| Total | 300 |
| Model | Tasks | Pass rate | Average wall time | Total wall time |
|---|---|---|---|---|
| Base Qwen 3.6 27B Q6 MTP | 300 | 81.33% | 53.56 s | 267.79 min |
| Qwimi 3.6 27B Coder Q6 MTP | 300 | 82.67% | 27.09 s | 135.45 min |
| Overall change | Result |
|---|---|
| Absolute pass-rate gain | +1.33 percentage points |
| Relative pass-rate gain | +1.64% |
| Average wall-time reduction | 49.4% |
| Effective task-level speedup | ~1.98× |
| Total evaluation time saved | 132.34 minutes |
Category results
| Category | Base pass rate | Qwimi pass rate | Accuracy delta | Base avg time | Qwimi avg time | Wall-time reduction |
|---|---|---|---|---|---|---|
| Custom coding | 81.33% | 85.33% | +4.00 pts | 59.33 s | 21.16 s | 64.3% |
| Custom tool-calling | 88.00% | 89.33% | +1.33 pts | 31.77 s | 27.13 s | 14.6% |
| Custom agentic | 74.67% | 70.67% | -4.00 pts | 63.80 s | 38.92 s | 39.0% |
Pairwise outcomes
| Pairwise result | Tasks | Share |
|---|---|---|
| Qwimi passed and base failed | 23 | 7.67% |
| Base passed and Qwimi failed | 19 | 6.33% |
| Both passed | 225 | 75.00% |
| Both failed | 33 | 11.00% |
| Total | 300 | 100% |
Among the 42 decisive tasks where only one model passed, Qwimi won 23/42 = 54.8%.
| Category | Qwimi-only wins | Base-only wins | Both pass | Both fail |
|---|---|---|---|---|
| Coding | 11 | 5 | 117 | 17 |
| Tool-calling | 4 | 3 | 63 | 5 |
| Agentic | 8 | 11 | 45 | 11 |
| Total | 23 | 19 | 225 | 33 |
300-task verdict: a slight overall quality win for Qwimi, driven by stronger coding and structured tool-use performance, with a large reduction in end-to-end task time. Agentic accuracy remains the clearest weakness.
8.2 Mixed 200-task benchmark
A separate 200-task run produced 400 raw answer rows. Categories with incomplete scorer or export integration were omitted rather than counted as zero.
| Model | Auto-scored rows | Passed | Pass rate | Average wall time |
|---|---|---|---|---|
| Base Qwen 3.6 27B Q6 MTP | 151 | 46 | 30.46% | 92.86 s |
| Qwimi 3.6 27B Coder Q6 MTP | 166 | 51 | 30.72% | 71.30 s |
| Overall change | Result |
|---|---|
| Absolute pass-rate gain | +0.26 percentage points |
| Relative pass-rate gain | +0.85% |
| Average wall-time reduction | 23.2% |
On the 146 tasks with a valid paired auto-score:
| Pairwise result | Tasks | Share |
|---|---|---|
| Qwimi better | 7 | 4.79% |
| Base better | 2 | 1.37% |
| Same result | 137 | 93.84% |
| Total paired tasks | 146 | 100% |
Among the nine decisive paired tasks, Qwimi won 7/9 = 77.8%.
| Category | Base pass rate | Qwimi pass rate | Delta |
|---|---|---|---|
| HumanEval | 80.00% | 94.29% | +14.29 pts |
| Personal XML tool tasks | 50.00% | 100.00% | +50.00 pts |
| MBPP | 5.77% | 1.92% | -3.85 pts |
| Tool-calling checks | 100% | 100% | Tie |
| Architecture checks | 100% | 100% | Tie |
| Debugging checks | 100% | 100% | Tie |
8.3 Interpreting the latency results
The measured advantage is task-level wall time, not proof of faster kernels or higher per-token throughput.
Task time ≈ prefill time + generated tokens × decode latency per token
SFT can reduce task time by producing shorter, more direct, better-formatted outputs and reaching the stop condition sooner. A controlled comparison of prompt throughput, generation throughput, and generated-token counts is required to claim a per-token speed advantage.
8.4 Benchmark limitations
- The published comparison used Q6 GGUF under
llama.cpp, not MLX. - MLX Q4, Q6, and Q8 were not benchmarked against one another.
- Wall time varies with Mac hardware,
mlx-lmversion, context length, cache behavior, generation length, and sampling settings. - The custom suite is useful internal evidence, not a replacement for broad public benchmarks.
- Agentic auto-scoring cannot capture every aspect of repository-level engineering quality.
9. Known limitations
- Text-only specialization: the vision tower was frozen during SFT and was not improved.
- Validated context: training and evaluation used a maximum sequence length of 16,384 tokens. Behavior beyond that length is unvalidated.
- Agentic coverage: agentic data was much smaller than the coding portion, and the custom benchmark showed a four-point agentic accuracy regression against the base model.
- Quantization loss: this MLX conversion adds quantization error on top of BF16.
- Apple Silicon only: MLX is designed for Apple silicon and is not a CUDA/Windows runtime.
- Bleeding-edge architecture: Qwen 3.6 uses the
qwen3_5hybrid architecture with GatedDeltaNet layers. Use a currentmlx-lmbuild and verify generation locally. - MTP caveat: the name retains
MTPfrom the source model, but this does not guarantee that MLX preserves or actively uses the same MTP acceleration path as the GGUF benchmark. - Tool-calling caveat: XML-style tool output and server-side parsing can be version-sensitive. Validate multi-turn tools before relying on them in an agent workflow.
- Server caveat:
mlx_lm.serveris intended primarily as a local endpoint and is not a hardened production service.
10. Verification and reproducibility
Record the exact:
mlx-lmversion;- source BF16 commit SHA;
- conversion command;
- quantization mode, bit width, and group size;
- output repository commit SHA;
- uploaded size and weight-shard checksums;
- smoke-test prompt and structural result.
Representative conversion command:
mlx_lm.convert \
--hf-path trjxter/Qwimi-3.6-27B-Coder-MTP-BF16 \
--mlx-path ./Qwimi-3.6-27B-Coder-MTP-MLX-6bit \
-q \
--q-bits 6
Add the actual --q-group-size, quantization mode, and upload arguments used during conversion
instead of assuming defaults.
Suggested smoke tests
- Plain coding generation.
- Exact
<think>...</think>formatting. - A single XML-style tool call.
- A multi-turn tool call with a tool result.
- A 12K-16K-token prompt to check memory and cache behavior.
- Repeated generation to detect truncation or cache regressions.
License
Apache 2.0, inherited from the base and merged source model.
- Downloads last month
- 237
6-bit