Fine-Tuning Coding Agents on a 16GB Mac: PyTorch MPS vs. Apple MLX
harshitkgupta
• • 3How to use harshitkgupta/qwen-3b-mlx-2k-lora with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("harshitkgupta/qwen-3b-mlx-2k-lora")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use harshitkgupta/qwen-3b-mlx-2k-lora with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "harshitkgupta/qwen-3b-mlx-2k-lora" --prompt "Once upon a time"
LoRA adapter fine-tuned on badlogicgames/pi-mono coding-agent traces with Apple MLX (4-bit QLoRA).
mlx-community/Qwen2.5-3B-Instruct-4bitTrackio dashboard: https://huggingface.co/spaces/harshitkgupta/training-agents-trackio
Trained with training-agents tutorials/01-sft-on-traces/train_mlx.py, run name qwen-3b-mlx-2k.
Quantized