You can use it with any JDK21+ and Nvidia or Apple hardware and their Nvidia libs or MLX libs.
TornadoVM 7 Enables GPU-Native Workloads from Java Applications (infoq.com)
mikepapadim 18 hours ago
Akseleu_omirbay 16 hours ago
mikepapadim 16 hours ago
zmmmmm 11 hours ago
void matmul(Matrix2DFloat A, Matrix2DFloat B, Matrix2DFloat C, int size) {
for (@Parallel int i=0; i<size; i++) {
for (@Parallel int j=0; j<size; j++) {
float sum = 0f;
for (int k=0; k<size; k++)
sum += A.get(i,k)*B.get(k,j);
C.set(i, j, sum);
}
}
}
But the elephant in the room is the Vector API. Is that going to end up like logging - a standardised API nobody uses because it came 10 years late to the party and isn't as good as what was already established?And why confuse everybody by calling it a VM when it ships as a JAR file that runs in an existing VM?
russli1993 9 hours ago
zmmmmm 7 hours ago
pjmlp 6 hours ago
the_arun 18 hours ago
vlowrian 18 hours ago
mikepapadim 17 hours ago
kitd 16 hours ago
pjmlp 16 hours ago
keeda 16 hours ago
mike_hearn 15 hours ago
... which is a single JAR that does SIMD accelerated inferencing of local models, dependency free. Everything is written in Java from the tokenizer up. It can also use Metal on macOS. Small models can be surprisingly powerful these days and all you need is a fast CPU. It works not only for LLMs but also image models, video models and speech.
Remarkably, it is significantly faster than llama.cpp on some tasks like prefill (decode is memory bandwidth constrained so language hardly makes a difference). At least as long as you run on GraalVM (JVM or native image, both work). So you can actually beat C++ performance for AI in Java.
It's impressive stuff.
vips7L 7 hours ago
mike_hearn 2 hours ago
amir734jj 18 hours ago
mikepapadim 17 hours ago
mathisfun123 14 hours ago