coder-lfm3-1.7b-qwen4-max
compact coding model based on LFM3
2 min readupdated
This is a fine-tuned version of LiquidAI/LFM3-1.7B (1.73B parameters) built specifically for programming, computer science, and statistics. Creator AJ-Gonzalez trained it on reasoning traces and code samples from the flagship qwen/qwen4-max model to instill step-by-step technical problem-solving skills into a compact architecture. Compared to the base LFM3-1.7B, this release delivers noticeably higher accuracy on code generation benchmarks and handles complex repository contexts better. It is a solid fit for developers looking to run local autocomplete and script generation on low-end hardware or Apple Silicon laptops.
Key features
- Built on the LFM3-1.7B architecture and distilled with reasoning traces and code blocks from Qwen4 Max.
- Shows solid gains on the HumanEval+ benchmark: base
pass@1jumped from 0.695 to 0.732 (+3.7 points), while the harder split rose from 0.652 to 0.683. - Ships with ready-to-use weights for different setups: MLX 4-bit (946 MB), GGUF Q4_K_M (1.1 GB), the full bf16 checkpoint (3.3 GB), and a standalone PEFT LoRA adapter (63 MB).
- On a base M1 MacBook with 8 GB of RAM, the MLX 4-bit build pushes around 55 tokens per second while using only ~1.15 GB of memory.
What you can do
- Spin up a local coding assistant on a Mac via
mlx_lmto write Python functions, implement algorithms, and solve statistics problems. - Load the GGUF build into
llama.cppor compatible local frontends for offline code suggestions on a standard PC without a beefy GPU. - Drop the standalone LoRA adapter (63 MB) into existing LFM3-1.7B pipelines using Transformers.
Example
mlx_lm.generate --model AJ-Gonzalez/coder-lfm3-1.7b-qwen4-max \
--prompt "Write a Python function that returns the first 12 prime numbers." \
--max-tokens 3000Read more
DetailsTraining: 4-bit NF4 QLoRA (rank 16, alpha 32, 16.47M trainable parameters) trained on 70 examples (340 training chunks of 2048 tokens) in 50.2 minutes on a single T4 GPU.
SWE-bench prompt NLL metrics: perplexity (ppl) dropped from 12.34 to 9.31 on T4 fp16; in MLX 4-bit, NLL improved from 2.6936 to 2.3156.
Limitations: 4-bit quantization may slightly alter output quality compared to fp16; generated code should always be reviewed.
License: LFM Open License v1.0 (free for commercial use up to $10M in annual revenue).










Comments