Skip to content

docs(gemma4): add minimum device RAM to support table - #561

Open
todkarsant wants to merge 4 commits into
apple:mainfrom
todkarsant:docs/gemma4-memory-requirements
Open

todkarsant wants to merge 4 commits into
apple:mainfrom
todkarsant:docs/gemma4-memory-requirements

Conversation

@todkarsant

Copy link
Copy Markdown

Summary

  • Add a Min. Device RAM column to the Gemma 4 support table
  • E4B peaks above 6 GB resident during specialization and cannot complete on 8 GB devices
  • Note explains which devices are affected, with a link to the reporter's jetsam measurements

Addresses #507

E4B peaks above 6 GB resident during on-device specialization and
cannot complete on 8 GB devices (iPhone 15 Pro, iPad mini A17 Pro).
Add a Min. Device RAM column so developers know before downloading
whether a model will fit their target device.

Addresses apple#507
@todkarsant
todkarsant requested a review from a team as a code owner November 20, 2026 09:30
@todkarsant

Copy link
Copy Markdown
Author

@tjia1818 @kevchengcodes Could you review this docs addition? It adds a Min. Device RAM column to the Gemma 4 support table, since E4B does not fit on 8 GB devices — context from #507.

@tjia1818
tjia1818 requested a review from Lewis300 November 20, 2026 17:00
@todkarsant

Copy link
Copy Markdown
Author

@tjia1818 Could you review this PR? It adds minimum device RAM requirements to the Gemma 4 support table. Thanks!

@tjia1818

tjia1818 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@tjia1818 Could you review this PR? It adds minimum device RAM requirements to the Gemma 4 support table. Thanks!

thanks for creating the PR. Can you clarify what context length you use to export this E4B model?

Also, have you tried to use --measure-peak-memory option on llm-benchmark on your Mac to see how much peak memory it reports? That should report the peak including specialization phase.

@todkarsant

Copy link
Copy Markdown
Author

@tjia1818 Thanks for the review — good questions.

Context length: The RAM figures in the PR are sourced from the jetsam measurements reported in #507 by @LawrenceNorman, who exported with "the repository's 4-bit palettized E4B recipe" at the default settings. That would be IOS_MAX_CONTEXT_LENGTH = 131072 (128K) unless they passed --max-context-length explicitly — the issue does not mention overriding it.

--measure-peak-memory: I did not run llm-benchmark --measure-peak-memory myself — I do not have the hardware setup to do so. The 6 GB+ peak figure in the PR comes from the iOS jetsam reports in #507 (6.45 GB resident at termination on the 8 GB iPad mini A17 Pro).

If you would prefer the table to use llm-benchmark --measure-peak-memory output instead, I am happy to update the PR with those values once measured — either by me if you can point me to the right setup steps, or from your team's numbers. I can also reduce the context length in the note if the RAM requirement is context-length-dependent and the default 128K is not representative.

Comment thread models/gemma4/README.md Outdated
| Gemma 4 E4B Instruct | 8.0B | Yes (27.2+) |
| Model | Parameters | iOS | Min. Device RAM |
| -------------------- | ---------- | --- | --------------- |
| Gemma 4 E2B Instruct | 5.0B | Yes (27.2+) | 8 GB |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please align the table

@todkarsant

Copy link
Copy Markdown
Author

@stikves Table aligned — iOS column separator extended to 11 dashes and Min. Device RAM values padded.

@tjia1818

tjia1818 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

@stikves Table aligned — iOS column separator extended to 11 dashes and Min. Device RAM values padded.

@todkarsant can you add (context length 128k) to the column header? If someone exports with smaller or larger context length, the cell value do not apply

@todkarsant

Copy link
Copy Markdown
Author

@tjia1818 Done — added (context length 128k) to the column header. The values reflect the default 128k context used by the repository's E4B recipe. Let me know if anything else needs adjusting.

@todkarsant

Copy link
Copy Markdown
Author

@stikves Fixed — aligned the evaluation table so all four rows have consistent column widths.

@todkarsant

Copy link
Copy Markdown
Author

@stikves — alignment is fixed in the latest commit. All columns in the evaluation table now have consistent widths. Thanks for the review!

@todkarsant

Copy link
Copy Markdown
Author

@stikves Table alignment has been fixed per your feedback (rework pushed 2026-12-04). Could you take another look and approve when you get a chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants