Mainline contribution?

#1
by NeedAHugNOW - opened

Hi, I was just curious why a separate fork is needed for llama.cpp? Why can't these changes be contributed to base project?

Team Blobfish org

Almost ready for a PR. There are still some cuda issues to fix and llama.cpp has a strong AI stance that I’m currently navigating. I anticipate I’ll get this merged eventually

I have RTX A4000(ampere) and am downloading IQ2XS quant to try it right now with cpu offload.

@cchuter

So i just went with Q2_K_XL quant, compiled the fork with my usual build conf and i got the following results:

RTX A4000 16gb ampere, 64gb ddr4, heavy cpu offload with --cpu-moe and heavy use of mmap:

prompt eval time = 1454933.93 ms / 17173 tokens (   84.72 ms per token,    11.80 tokens per second)
eval time =   49776.27 ms /   115 tokens (  432.84 ms per token,     2.31 tokens per second)
total time = 1504710.20 ms / 17288 tokens

I can get full 1M bf16/f16 precision context and routed experts in gpu like this. 15.4GiB vram usage.

one thing i noticed is the server fails to start if i set ubatch size to 1024, launches fine with 512.

EDIT: I noticed that the vram allocated for model seems to grow with cache as more is filled up? Like initial empty context uses say 15.4gb, but as actual context is provided, this vram allocation grows and ended up ooming at about 26k context, craahing the server.

@NeedAHugNOW

The Q2_K_XL is ~100GB, so you must be swapping to disk with that config. I think only the IQ1_M-XL would fit without swapping (as you still need extra VRAM beyond the weights, and some RAM for the system).

@NeedAHugNOW

The Q2_K_XL is ~100GB, so you must be swapping to disk with that config. I think only the IQ1_M-XL would fit without swapping (as you still need extra VRAM beyond the weights, and some RAM for the system).

I did mention that it was with mmap in my comment.

Sign up or log in to comment