Instructions to use stbenjam/qwen3-4b-claudish-mlx-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use stbenjam/qwen3-4b-claudish-mlx-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("stbenjam/qwen3-4b-claudish-mlx-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use stbenjam/qwen3-4b-claudish-mlx-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "stbenjam/qwen3-4b-claudish-mlx-lora" --prompt "Once upon a time"
- Atomic Chat
Experimental Claudish Qwen3-4B โ MLX LoRA
Early preview: the training goal is not achieved. The demo adds a style prompt; answers can be verbose and recognizable while still being wrong.
This is an MLX LoRA adapter, not a standalone model or a PEFT adapter. Use the pinned 4-bit MLX base with it. For a single download with no Python, use the Q4 GGUF:
ollama run hf.co/stbenjam/qwen3-4b-claudish-gguf:Q4_K_M
Colored Python chat on Apple Silicon
git clone https://github.com/stbenjam/posttrain-demo.git
cd posttrain-demo
uv venv --python 3.12
uv pip install --python .venv/bin/python -r requirements.lock.txt
.venv/bin/python prepare_models.py --only claudish-4b
.venv/bin/python claudish/chat.py --four-b
Each question starts fresh. --raw disables the style prompt;
--base disables the adapter for comparison;
--history enables experimental memory. The setup installs the corrected
non-thinking ChatML template shipped here as train_template.jinja.
For direct MLX use, load the base and adapter, assign that template to
tokenizer.chat_template, render the latest user message with style.txt as the
system prompt (or a neutral system prompt for raw evaluation) and add_generation_prompt=True, and generate up to 1,536 tokens
at temperature 0.7, top-p 0.8, and top-k 20. Tested with MLX LM 0.31.3 and MLX 0.32.2.
This is an experimental early 4B checkpoint, not a demonstrated improvement over the original 0.6B demo. Training did not reliably teach the desired voice; stronger and later checkpoints developed severe repetition. There are no Claude weights in this Qwen experiment, and it is unaffiliated with Anthropic.
The demo uses an explicit exaggerated style prompt to request mannered prose,
long answers, load-bearing, earns its keep, and emphatic contrasts. This
can produce unsupported details and irrelevant padding. The raw weights are
much milder. Prompt-assisted behavior is not evidence that training succeeded.
Use Python's --raw or override Ollama's system prompt with
You are a helpful assistant. to compare the weights alone.
Training and evidence
The base is the pinned MLX 4-bit conversion of Qwen3-4B-Instruct-2507. Rank-16 LoRA trains attention query/value matrices in the final 12 layers (1.966 million parameters), with batch size two, learning rate 0.00001, LoRA scale 8, and a 2,048-token sequence limit. Selected checkpoint: update 40. Training ran locally on an M4 Pro with 48 GB memory.
The corpus combines 256 filtered public instruction answers and 23 original parody answers given double weight: 302 rows, 279 unique examples. The public dataset's author attributes its synthetic outputs to Claude; that attribution has not been independently authenticated. Its card declares Apache-2.0. See ATTRIBUTION.md for the exact source, changes, and review limits.
Results and complete responses separate qualitative answer review from length and phrase frequency. The main comparison uses the same quantized 4B base with and without the adapter; these are small experiments, not broad accuracy or Claude-equivalence benchmarks. Research and references describe the public style specimens and relevant prior work.
The model can invent facts, overexplain, and repeat favorite phrases. It has no tools or live information. Fresh context is deliberate: earlier messages are discarded, so contextual follow-ups require a different setup. Its verbosity can conflict with requests for short answers. It is an educational parody.
License and provenance
Apache-2.0 for this release and the Qwen base; see LICENSE, NOTICE, and
ATTRIBUTION.md. selection.json records the checkpoint and its SHA-256;
training-data-manifest.json records the source revision, filters, weighting,
and data hashes. No endorsement by Qwen, Anthropic, or dataset contributors is implied.
Quantized
Model tree for stbenjam/qwen3-4b-claudish-mlx-lora
Base model
Qwen/Qwen3-4B-Instruct-2507