CoolFace
Modelpublic

cagataydev/Qwen3.5-4B-cagatay-4bit

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes11downloads
Model Card

๐Ÿค Q-Tiny MLX โ€” Qwen 3.5 4B Cagatay (4-bit)

<div align="center">

A 4-bit quantized MLX model for Apple Silicon โ€” fine-tuned for robotics reasoning and instruction following.

![Base Model](https://huggingface.co/Qwen/Qwen3.5-4B) ![LoRA Adapter](https://huggingface.co/cagataydev/qwen3.5-4B-cagatay) ![Strands MLX](https://github.com/strands-agents/strands-mlx) ![Strands Agents](https://github.com/strands-agents/sdk-python)

8.4 GB โ†’ 2.4 GB | 4.5 bits/weight | Runs on MacBook Air

</div>

What is this?

This is the merged + quantized version of cagataydev/qwen3.5-4B-cagatay (LoRA adapter) for native Apple Silicon inference via MLX.

Pipeline: Qwen/Qwen3.5-4B + LoRA adapter โ†’ merged weights โ†’ MLX 4-bit quantization (group size 64)

๐Ÿš€ Use with Strands Agents + MLX

The recommended way to use this model is with strands-agents and strands-mlx:

bash
pip install strands-agents strands-agents-mlx
python
from strands import Agent
from strands_mlx import MLXModel

# Load the 4-bit quantized model
model = MLXModel(model_id="cagataydev/Qwen3.5-4B-cagatay-4bit")

# Create an agent with tools
agent = Agent(model=model)

# Use it!
agent("Plan the steps to pick up a red cube and place it on the shelf")

With Custom Tools

python
from strands import Agent, tool
from strands_mlx import MLXModel

@tool
def get_robot_state() -> dict:
    """Get the current state of the robot."""
    return {"position": [0.5, 0.3, 0.1], "gripper": "open"}

model = MLXModel(
    model_id="cagataydev/Qwen3.5-4B-cagatay-4bit",
    params={"temperature": 0.7, "max_tokens": 1024}
)

agent = Agent(model=model, tools=[get_robot_state])
agent("What is the robot's current position? Then plan a pick-and-place task.")

With DevDuck

bash
pip install devduck
export MODEL_PROVIDER=mlx
export STRANDS_MODEL_ID=cagataydev/Qwen3.5-4B-cagatay-4bit
devduck

๐Ÿ“ฆ Use with mlx-lm (standalone)

bash
pip install mlx-lm
python
from mlx_lm import load, generate

model, tokenizer = load("cagataydev/Qwen3.5-4B-cagatay-4bit")

messages = [{"role": "user", "content": "Plan how to pick up a cup from the table"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_dict=False)

response = generate(model, tokenizer, prompt=prompt, verbose=True, max_tokens=512)

CLI

bash
mlx_lm generate --model cagataydev/Qwen3.5-4B-cagatay-4bit --prompt "Hello!"

๐Ÿ“Š Model Details

PropertyValue
Base ModelQwen/Qwen3.5-4B
Fine-tunecagataydev/qwen3.5-4B-cagatay (LoRA)
ArchitectureQwen 3.5 (32 layers, 2560 hidden, 16 heads)
Parameters4B total
Quantization4-bit (4.503 bits/weight, group size 64)
Model Size2.4 GB (down from 8.4 GB fp16)
FormatMLX SafeTensors
PlatformApple Silicon (M1/M2/M3/M4)
LicenseApache 2.0

๐Ÿ‹๏ธ Training Provenance

The LoRA adapter was trained with:

ParameterValue
MethodLoRA + SFT (TRL)
LoRA Rank32
LoRA Alpha64
Dropout0.05
Target Modulesqproj, kproj, vproj, oproj, gateproj, upproj, down_proj
InfrastructureHuggingFace Jobs (cloud GPU)

๐Ÿค– Use Cases

  • โ€”Robotics task planning โ€” Break down commands into step-by-step action plans
  • โ€”Embodied reasoning โ€” Spatial understanding and action sequencing
  • โ€”Edge deployment โ€” 2.4 GB fits comfortably on any Apple Silicon Mac
  • โ€”Strands agent backbone โ€” Local model for Strands Agents on Mac
  • โ€”Neon VLA โ€” Part of the Neon VLA vision-language-action stack

๐Ÿ“ฆ Q-Model Family

ModelBaseSizeQuantizedUse Case
๐ŸŒ Q-OmniQwen 2.5 Omni 3B3Bโ€”Voice & multimodal
๐Ÿค Q-Tiny (this)Qwen 3.5 4B4B2.4 GB 4-bitTask planning on Mac
๐Ÿง  Q-BrainQwen 3.5 35B MoE35B (3B active)โ€”Complex reasoning

Built with [DevDuck](https://github.com/cagataycali/devduck) ๐Ÿฆ† and [Strands Agents](https://strandsagents.com) ๐Ÿงฌ