Inkling-2-Mini-pi-adapted-LayerFit-MLX-2bit
a quantized version of the coding model for Apple Silicon
2 min readupdated
This model is a variant of the Inkling 2 Mini model from Thinking Machines, merged with a LoRA (small add-on over the base model) adapter from Harness Hub and converted to the MLX format. The adapter was trained using reinforcement learning (TRL's AsyncGRPO) to run the pi coding agent at a high reasoning level. Built using LayerFit technology (a quantization method that selects optimal parameters for each layer with a fixed size), it takes up only 9.5 GB, allowing it to run on a Mac with 24 GB of RAM. It solves more agentic programming tasks while spending fewer tokens and tool calls.
Key features
- Mac optimization: Fully merges the weights of the LoRA adapter and supports operation via MLX-VLM without loading additional adapters.
- Speculative generation: Includes a DSpark speculative-decoding draft file (mtp.safetensors) to speed up generation.
- LayerFit compression: Quantization down to 2-bit with minimal deviation (KL divergence of 0.0298) from the reference build.
- Tools and vision: Includes a built-in image encoder and support for parsing OpenAI tool_calls.
What you can do
- Run a local server: Spin up an OpenAI-compatible server via mlx_vlm to process requests and function calls.
- Integrate with the pi agent: Configure the pi agent to work with the local model via the chat completions API.
- Write and edit code: Use the model in Python scripts via the mlx_vlm library to generate scripts and analyze code.
- Process images: Feed test images to the model for description and analysis in multimodal tasks.
Example
Running a local server in the terminal:
mlx_vlm.server --model netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-2bit --port 8000Read more
DetailsParameters: 26.39B parameters
File size: 9.5 GB + 0.64 GB draft model
Hardware requirements: Mac with 24 GB unified memory or higher
License: Apache-2.0










Comments