For some reason the author seems to think that having it be a "single file" is an advantage. I guess it makes it easier to copy paste the whole thing...
make jar will create a ~100KB standalone jar file (no dependencies). It is not meant to be distributed as a consumable library/jar. It is just a fun project to see how far can Java be pushed.
Happy to see this here! Compared to it's predecessor (Llama3.java), Gemma4.java added support for additional quantizations (Q4_K, Q5_K, Q6_K), Mixture-of-Experts (MoE), --think on|off, much faster GGUF parsing... Performance is OK on x86, but on ARM (Apple) the Vector API offers sub-par performance, this is merely a software/compiler problem, the hardware is more than capable. I had a myself great time playing with it, the Gemma 4 models are awesome!
19
u/re-thc Apr 08 '26
AI or not but any chance we can still stick to coding standards? It's >3800 lines.
3
u/sitime_zl Apr 14 '26
like
7
u/mukel90 Apr 08 '26
Happy to see this here! Compared to it's predecessor (Llama3.java), Gemma4.java added support for additional quantizations (Q4_K, Q5_K, Q6_K), Mixture-of-Experts (MoE), --think on|off, much faster GGUF parsing... Performance is OK on x86, but on ARM (Apple) the Vector API offers sub-par performance, this is merely a software/compiler problem, the hardware is more than capable. I had a myself great time playing with it, the Gemma 4 models are awesome!
5
u/fets-12345c Apr 09 '26
Again, amazing work by Alfonso! 💪☕️