# jasontitus/mlx-stq-trainer — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `ai-models`
- Overall score: `3.5/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `a4b6f83c62a5` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-03T05:24:11Z
- Repository: https://github.com/jasontitus/mlx-stq-trainer
- Radar entry: https://radar.alplab.co/#repo/jasontitus/mlx-stq-trainer
- License: `MIT`
- Tags: `mlx`, `deepseek`, `lora`, `fine-tuning`, `apple-silicon`, `recurrent-depth`

## Summary

An experimental MLX-based streamed EXL3 LoRA fine-tuning system for a narrowly specified local DeepSeek V4.1 repack, with recurrent-depth loop training and a local Studio UI.

## Implementation Check

README.md's core local trainer and loop claims are implemented by `exl3_mlx.cli:main`, `SFTTrainer`, and `loop.LoopModel`/`LoopSpec`; the supported checkpoint constraints are explicit in `sft.capabilities`.

## When to Use

Use for bounded Apple-silicon experiments with the required local 40-layer DeepSeek V4.1 streaming repack and substantial memory headroom. Do not use as a general trainer, production service, or evidence of broad model-quality gains.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.0/5 |
| usability | 3.0/5 |
| reliability | 3.0/5 |
| security | 4.0/5 |
| integration | 3.5/5 |

## Code Evidence

- src/exl3_mlx/sft.py `SFTConfig` validates resource, sequence, adapter-layer, and supervision constraints before training.
- src/exl3_mlx/sft.py `capabilities` rejects checkpoints outside the specified 40-layer DeepSeek V4.1 MXFP8/EXL3 layout.
- src/exl3_mlx/loop.py `LoopSpec` and `entry_forward` implement multi-pass recurrent core execution with bounded configuration validation.
- src/exl3_mlx/remote.py `fetch_linear` requires a 40-character revision and refuses range responses or payloads beyond configured bounds.
- tests/test_loop.py checks initial loop parity, gradient routing, finite-difference BPTT, and serialized loop round trips.
- src/exl3_mlx/studio.py binds Studio to 127.0.0.1 and authenticates API requests with a per-session token.

## Issues Found

- pyproject.toml has no lockfile despite README.md instructing `uv sync --locked`, weakening reproducible setup.
- src/exl3_mlx/remote.py retrieves Hugging Face payloads over HTTPS without caller-supplied content hashes for the remote source.

## Key Risks

- Requires Python 3.12+, MLX, and a local supported DeepSeek V4.1 streaming repack.
- src/exl3_mlx/sft.py limits the backend to one specific 40-layer checkpoint architecture and adapter format.
- README.md documents experimental behavior and states independent full-model parity and useful trained-text quality remain unverified.
- The repository has a large test suite, but no CI configuration is supplied in the maturity data.

## Reviewed Files

- `README.md`
- `pyproject.toml`
- `src/exl3_mlx/cli.py`
- `src/exl3_mlx/loop.py`
- `src/exl3_mlx/sft.py`
- `src/exl3_mlx/studio.py`
- `src/exl3_mlx/remote.py`
- `src/exl3_mlx/sft_cli.py`
- `tests/test_loop.py`
- `tests/test_workflow.py`
- `tests/test_studio.py`
