// RUN โ€” FITS

Can the Apple M4 Max 48GB run CodeT5-base?

Yes โ€” here's how fast and up to what context, with real measured numbers.

CodeT5-base on the Apple M4 Max 48GB

QuantFits?Max contextSpeedBeyond context
FP16 yes 630k 843.8-1017.5 t/s ~15.5-18.6 (slow)
Q8 yes 633k 1687.6-2035.1 t/s ~30.9-37.3 (slow)
Q4 yes 634k 3013.6-3634.1 t/s ~55.2-66.6 (slow)

Estimate (memory-bound). Beyond "max context" the KV cache spills to SSD swap and speed drops to the "beyond" figure.

FAQ

Can the Apple M4 Max 48GB run CodeT5-base?โ–ถ

Yes. At Q4 it generates ~3013.6-3634.1 tok/s and fits up to 634k context; beyond that it spills to SSD swap and slows to ~55.2-66.6 tok/s.

How much context fits?โ–ถ

At Q4, up to about 634k tokens stay in fast memory; longer context spills to SSD swap and throughput collapses.