Live data from Hacker News

Llama2.java: Karpathy's llama2.c ported to Java

github.com

1–10 of 19 posts

Re: Llama2.java: Karpathy's llama2.c ported to Java

#4

How you all used these things for anything useful? I can't get them to give useful results on my 3060 8gb. If I wanted to get decent results I think I'd need to rent a GPU node somewhere, but chatGPT is still free

The 4bit quantized 13B models, give really decent answers (not as good as gpt4, but often as good as gpt 3)

Re: Llama2.java: Karpathy's llama2.c ported to Java

#6

How you all used these things for anything useful? I can't get them to give useful results on my 3060 8gb. If I wanted to get decent results I think I'd need to rent a GPU node somewhere, but chatGPT is still free

I know it might be asking a lot, but it would be great if someone could put up a HF space so I could try all the various flavours/sizes.

Re: Llama2.java: Karpathy's llama2.c ported to Java

#7
post #5

The Java code is impressively written, using newer features like MemorySegment. Looked at the author and realized it's Alfonso from the Graal team -- makes sense. I wonder whether the "matmul" code could be further optimized with the Vector API and SIMD.

Also new virtual threads might be beneficial. I was experimenting using Vector api for matrix multiplication once and effect was pretty good.

Re: Llama2.java: Karpathy's llama2.c ported to Java

#8
post #6

How you all used these things for anything useful? I can't get them to give useful results on my 3060 8gb. If I wanted to get decent results I think I'd need to rent a GPU node somewhere, but chatGPT is still free

I know it might be asking a lot, but it would be great if someone could put up a HF space so I could try all the various flavours/sizes.

/r/LocalLLaMA/

Re: Llama2.java: Karpathy's llama2.c ported to Java

#10
post #7
post #5

The Java code is impressively written, using newer features like MemorySegment. Looked at the author and realized it's Alfonso from the Graal team -- makes sense. I wonder whether the "matmul" code could be further optimized with the Vector API and SIMD.

Also new virtual threads might be beneficial. I was experimenting using Vector api for matrix multiplication once and effect was pretty good.

Virtual threads shouldn't help as the program isn't I/O or wait bottlenecked. It's a pure computation, so it's all about vectorization here.
Post reply on HN