Instructions to use baa-ai/Krea-2-Turbo-RAM-8bit-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use baa-ai/Krea-2-Turbo-RAM-8bit-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download baa-ai/Krea-2-Turbo-RAM-8bit-MLX --local-dir Krea-2-Turbo-RAM-8bit-MLX
- mflux
How to use baa-ai/Krea-2-Turbo-RAM-8bit-MLX with mflux:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Krea 2 Turbo β RAM 8bit (MLX)
A mixed-precision MLX build of krea/Krea-2-Turbo, produced with the RAM Pipeline by baa.ai. Runs natively on Apple Silicon through mflux β no PyTorch, no MPS fallback.
RAM's quality ceiling build. At the predicted global peak the allocator's saturation gate refuses every upgrade past 8-bit β the probe measured no further SQNR gain above it β so the optimal allocation converges on uniform 8-bit. Highest fidelity of the three.
| Property | Value |
|---|---|
| Transformer size | 13.92 GB (from 25.64 GB bf16 β 1.84Γ smaller) |
| Total repo size | 22.48 GB (incl. bf16 text encoder + VAE) |
| Average bits | 8.00 |
| Bit distribution | 8-bit Γ 256 |
| Quantization | affine, group size 64 |
| Format | MLX (mflux Krea 2) |
| Base model | krea/Krea-2-Turbo |
The Qwen3-VL text encoder is deliberately left at bf16 β quantizing it measurably degrades prompt conditioning. The VAE is also left at full precision.
β οΈ Required: this checkpoint needs the bundled loader
This build is uniform 8-bit across the transformer, but the VAE and text encoder are
deliberately left at full precision, which stock mflux's own predicate would not
reproduce. Use the bundled load_krea2_ram.py (with ram_bits.json) so the module
structure matches the stored weights exactly. The loader raises rather than silently
mis-loading.
Usage
pip install "mflux>=0.18,<0.19"
hf download baa-ai/Krea-2-Turbo-RAM-8bit-MLX --local-dir Krea-2-Turbo-RAM-8bit-MLX
# CLI β writes out.png
python load_krea2_ram.py --model Krea-2-Turbo-RAM-8bit-MLX \
--prompt "a photograph of a red fox in a sunlit forest clearing, sharp focus, bokeh" \
--seed 42 --steps 8 --width 1024 --height 1024 --output out.png
# Python
from load_krea2_ram import load_ram_krea2
model = load_ram_krea2("Krea-2-Turbo-RAM-8bit-MLX")
image = model.generate_image(
seed=42,
prompt="a photograph of a red fox in a sunlit forest clearing, sharp focus, bokeh",
num_inference_steps=8, width=1024, height=1024, guidance=1.0,
)
image.image.save("out.png")
Requirements
- Apple Silicon Mac (M1 or later)
- 32 GB+ unified memory recommended
mflux>=0.18,<0.19β earlier versions have no Krea 2 support
Turbo is a timestep-distilled model: use 8 steps and guidance 1.0. More steps will not improve it.
Benchmark results
10 prompts, matched seeds, 1024Γ1024, 8 steps, guidance 1.0, measured on an M2 Ultra. Every arm quantizes the same 256 transformer linears and differs only in bit allocation, so the comparison isolates allocation policy. LPIPS is perceptual distance from the bf16 reference β lower is better.
| Build | Transformer | LPIPS β | PSNR β | CLIP β | s/image |
|---|---|---|---|---|---|
| Uniform 4-bit | 7.67 GB | 0.2423 | 19.2 | 34.50 | 56 s |
| RAM 9 GB (this family) | 9.19 GB | 0.2076 | 20.6 | 34.41 | 58 s |
| Hand-tuned mixed 4/8* | 9.84 GB | 0.2102 | 20.3 | 34.42 | 57 s |
| RAM 11.4 GB | 11.44 GB | 0.1319 | 24.4 | 34.44 | 59 s |
| RAM 8bit (this family) | 13.92 GB | 0.0630 | 29.2 | 34.22 | 59 s |
| bf16 (reference) | 25.64 GB | ref | ref | 34.35 | 56 s |
* Our reimplementation of the community hand-tuned 4/8 recipe (8-bit down_proj +
first/last-2 attention, 4-bit elsewhere, bf16 text-fusion), not that author's checkpoint.
How to read these numbers β including where RAM does *not* win
- At 9 GB, RAM matches the hand-tuned recipe while being 0.65 GB smaller. RAM wins on 7 of 10 prompts, but a paired t-test gives p = 0.89 β that is not a statistically significant quality difference at n = 10. The honest claim is equal quality, fewer bytes, not better quality.
- At aggressive budgets RAM currently loses. A 7.4 GB RAM build scored LPIPS 0.301 against 0.242 for uniform 4-bit at 7.7 GB β uniform won 10/10 prompts, p = 0.001. RAM's 3-bit assignments hurt at that budget. Do not use RAM below ~9 GB for this model.
- 8-bit is not free. q8 still measures LPIPS 0.063 / PSNR 29.2 dB against bf16, so 8-bit is not perceptually lossless here.
- CLIP is flat everywhere (34.2β34.9, within noise). Quantization changes which image you get more than whether it matches the prompt.
- Quantization buys memory, not speed. All arms ran 56β60 s/image; bf16 was fastest at 55.7 s. Generation is attention-bound and attention math is not quantized.
Sensitivity was measured weights-only (SQNR per tensor per bit width), because a
diffusion transformer has no mlx_lm forward path for RAM's usual activation probe. A
uniform-5-bit control at matched bytes is still pending; these results will be updated
when it lands.
How it was built
RAM probed all 256 transformer linears at 2/3/4/5/6/8 bits, measured per-tensor SQNR, and solved a knapsack allocation against a size budget. The resulting per-layer curve is U-shaped β layers 0 and 27 get ~5.4 bits, mid-stack ~4.7 β which the probe measured rather than being told; no architectural priors were applied. K/V projections landed at 8-bit, Q/O at 6-bit, and the MLP bulk at 4β4.7 bits.
License
Krea 2 is licensed under the Krea 2 Community License Agreement. For more information, visit https://krea.ai/krea-2-licensing.
This is a modified version of the Krea Model β post-training weight quantization only;
no retraining, fine-tuning or distillation. It is not an official Krea product and is
not endorsed by Krea. A copy of the Agreement is included as LICENSE.pdf, and the
required attribution notice as Notice. Your use is subject to that Agreement, including
its Acceptable Use Policy and the commercial-use revenue threshold in Section 2.3.
Quantized by baa.ai
Black Sheep AI Products
Black Sheep AI builds private AI with the Bounded AI Architecture (BAA): three layers, each bound to something you control, on infrastructure you control. Nothing leaves your boundary.
Ram (Reasoning Layer) β Full-capability frontier models, shrunk to fit smaller GPUs with reasoning kept and certified. They rely strictly on your Data Modules for knowledge, so you swap the model as better ones ship.
Paddock (Knowledge Plane) β Binds your Data Modules directly to the reasoning layer: one per topic, period, person, permission or tenant. Permission, freeze, hand back or delete each one on its own.
Watchman (GRC Layer) β Governance, risk and compliance in a single, complete audit log: every module permission, every bind, every model's provenance. Five certificates before anything goes live.
Shepherd β Takes a frontier model, compresses it into a Ram reasoning model, certifies it with Watchman, binds it to your Paddock, and deploys the Bounded AI Architecture to your infrastructure: your cloud, a Mac Studio, or an air-gapped facility.
Learn more at baa.ai β Private AI for enterprises whose data cannot leave the building.
Quantized