// RUN โ€” FITS

Can the Apple M4 Max 36GB run CodeT5-large?

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

CodeT5-large on the Apple M4 Max 36GB

QuantFits?Max contextSpeedBeyond context
FP16 yes 448k 241.1-290.7 t/s ~4.4-5.3 (slow)
Q8 yes 460k 482.2-581.5 t/s ~8.8-10.6 (slow)
Q4 yes 465k 861-1038.3 t/s ~15.8-19 (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 36GB run CodeT5-large?โ–ถ

Yes. At Q4 it generates ~861-1038.3 tok/s and fits up to 465k context; beyond that it spills to SSD swap and slows to ~15.8-19 tok/s.

How much context fits?โ–ถ

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