Can the Apple M4 Max 40-core (128 GB) run h2o-lightning-31b?
h2o-lightning-31b·31.3B·Apple M4 Max 40-core (128 GB)·128 GB unified memory
Yes. The Apple M4 Max 40-core (128 GB) runs h2o-lightning-31b fully in unified memory at FP16 / BF16 (about 64 GB of 96 GB), at roughly 4.8 tokens/s.
- best quant
- FP16 / BF16
- needs
- 64 GB
- usable
- 96 GB
- est. speed
- ~4.8 tok/s
Estimates for an 8K context; offload assumes 32 GB of system RAM.Try other contexts on the h2o-lightning-31b page →
Every quantisation of h2o-lightning-31b on the Apple M4 Max 40-core (128 GB)
| Quant | Memory | Fit | Speed |
|---|---|---|---|
| Q2_K | 13 GB | fits | ~29 tok/s |
| Q3_K_M | 17 GB | fits | ~20 tok/s |
| Q4_K_M | 21 GB | fits | ~16 tok/s |
| Q5_K_M | 24 GB | fits | ~14 tok/s |
| Q6_K | 28 GB | fits | ~12 tok/s |
| Q8_0 | 35 GB | fits | ~9 tok/s |
| FP16 / BF16 pick | 64 GB | fits | ~4.8 tok/s |
Speed is a bandwidth-based estimate for generating text (546 GB/s); prompt processing and long contexts are slower.
Measured speed on the Apple M4 Max 40-core (128 GB)
No community reports for this pair yet.
Report your own speed →Run h2o-lightning-31b on the Apple M4 Max 40-core (128 GB)
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="h2oai/h2o-lightning-31b", dtype="auto", device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
{"type": "text", "text": "Describe this image."},
],
}
]
out = pipe(text=messages, max_new_tokens=256)
print(out[0]["generated_text"][-1]["content"])Gated on Hugging Face: accept the licence on the model page and export HF_TOKEN first.
Vision models that fit the Apple M4 Max 40-core (128 GB) comfortably
All that fit →| Model | Params | Best quant | Memory | Speed |
|---|---|---|---|---|
| 31.3B | Q8_0 | ≈40 GBFits in memory | ~9 tok/s | |
| 27.8B | Q8_0 | ≈31 GBFits in memory | ~10 tok/s | |
| 36BA3B | Q8_0 | ≈38 GBFits in memory | ~94 tok/s | |
| 29.8B | Q8_0 | ≈30 GBFits in memory | ~9.5 tok/s | |
| 27.8B | Q8_0 | ≈30 GBFits in memory | ~10 tok/s | |
| 25.8BA4B | Q8_0 | ≈29 GBFits in memory | ~71 tok/s |
Other GPUs that run h2o-lightning-31b
Frequently asked questions
- Can the Apple M4 Max 40-core (128 GB) run h2o-lightning-31b?
- Yes. The Apple M4 Max 40-core (128 GB) runs h2o-lightning-31b fully in unified memory at FP16 / BF16 (about 64 GB of 96 GB), at roughly 4.8 tokens/s.
- How fast does h2o-lightning-31b run on the Apple M4 Max 40-core (128 GB)?
- An estimate from memory bandwidth gives about 4.8 tokens/s at FP16 / BF16.
- Which quantisation of h2o-lightning-31b should I use on the Apple M4 Max 40-core (128 GB)?
- FP16 / BF16: the largest one that fits. Expected quality: lossless compared with the full-precision weights.
Memory and speed are estimates from the model's size and the card's memory bandwidth; real numbers depend on the runtime, drivers and context length. Community figures are medians of user reports.