Benchmarking Gemma 4 E2B with Long Contexts
Post · https://dev.to/gde/benchmarking-gemma-4-e2b-with-long-contexts-1jb9
Gemma 4 E2B loses most of a long document: as served on an 8 GB RTX 3050 it found 52 of 80 hidden facts at 16k tokens and 14 at 32k. Thinking on helps and still leaves it short. Keep its documents under 16k tokens, or use the 12B.
First seen by Oriel on .
AI summary
The article benchmarks Gemma 4 E2B on an 8 GB RTX 3050 and finds that long-context recall drops sharply, while thinking with Google's sampling settings improves results but still misses most facts at greater lengths.
- Using llama.cpp and a Q4_0 repack, the test inserted hidden facts into a technical manual and measured recall and linking across documents from 16k to 127k tokens.
- As served, E2B recalled 52 of 80 codes at 16k tokens, but only 4 to 14 at lengths from 32k to 127k; it favored facts near the document's start.
- Thinking with Google's sampling settings found 264 of 640 facts versus 124 without thinking over 16k to 98k tokens, but added 5 to 11 seconds per request.
- The 12B found 48 to 59 of 80 codes from 32k to 127k in an earlier run, while q8_0 cache, the drafter, and sampling without thinking showed no clear recall gains.
- The results come from one GPU, one document, and ten trials per length and task; thinking-on tests did not include 127k tokens.
#gemma #llama.cpp #llm benchmarking #long context
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Reactions
Total public reactions reported by the source; distinct from points and likes.
- DEV Community: 25, latest observation ; +6 over observed period since
Comments
Comment count reported by the source.
- DEV Community: 3, latest observation ; 0 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| DEV Community | 5126766 | https://dev.to/gde/benchmarking-gemma-4-e2b-with-long-contexts-1jb9 Read discussion |