// RUN โ€” FITS

Can the Apple M2 Max 64GB run GPT-2 Medium (FlashAttention)?

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

GPT-2 Medium (FlashAttention) on the Apple M2 Max 64GB

QuantFits?Max contextSpeedBeyond context
FP16 yes 845k 383.1-462 t/s ~9.6-11.5 (slow)
Q8 yes 851k 766.2-923.9 t/s ~19.2-23.1 (slow)
Q4 yes 853k 1368.2-1649.9 t/s ~34.2-41.2 (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 M2 Max 64GB run GPT-2 Medium (FlashAttention)?โ–ถ

Yes. At Q4 it generates ~1368.2-1649.9 tok/s and fits up to 853k context; beyond that it spills to SSD swap and slows to ~34.2-41.2 tok/s.

How much context fits?โ–ถ

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