Trying something new, going to pin this thread as a place for beginners to ask what may or may not be stupid questions, to encourage both the asking and answering.
Depending on activity level I’ll either make a new one once in awhile or I’ll just leave this one up forever to be a place to learn and ask.
When asking a question, try to make it clear what your current knowledge level is and where you may have gaps, should help people provide more useful concise answers!
I get an error when offloading the whole model to GPU
./build/bin/llama-cli -m ~/software/ai/models/deepseek-math-7b-instruct.Q8_0.gguf -n 200 -t 10 -ngl 31 -if
The relevant output is:
…
llama_model_load_from_file_impl: using device Vulkan0 (Intel® Iris® Xe Graphics (RPL-U)) - 7759 MiB free
…
print_info: file size = 6.84 GiB (8.50 BPW)
…
load_tensors: loading model tensors, this can take a while… (mmap = true) load_tensors: offloading 30 repeating layers to GPU load_tensors: offloading output layer to GPU load_tensors: offloaded 31/31 layers to GPU load_tensors: Vulkan0 model buffer size = 6577.83 MiB load_tensors: CPU_Mapped model buffer size = 425.00 MiB
…
ggml_vulkan: Device memory allocation of size 2013265920 failed ggml_vulkan: vk::Device::allocateMemory: ErrorOutOfDeviceMemory llama_kv_cache_init: failed to allocate buffer for kv cache llama_init_from_model: llama_kv_cache_init() failed for self-attention cache common_init_from_params: failed to create context with model ‘~/software/ai/models/deepseek-math-7b-instruct.Q8_0.gguf’ main: error: unable to load model
It seems to me that there is enough room for the model, but I don’t know what “Device memory allocation of size 2013265920” means.
I suppose that line means llama.cpp tried to allocate another chunk of memory, roughly 2GB and that failed because there wasn’t any memory left. I’m not sure about the details, maybe it’s the KV cache and additional stuff that is required for the computation aside from the model itself? Have you tried lowering the number of layers to offload to the iGPU and see if that works? Like lowering the value to
-ngl 20
might leave additional space for other important things.Yeah I tested with lower numbers and it works, I just wanted to offload the whole model thinking it will work, 2GB it’s a lot. With other models it prints about 250MB when fails and if you sum up the model size it’s still well below the iGPU free memory so I dont get it… anyway, I was thinking about upgrading the memory to 32GB or may be 64GB but I hesitate because with models around 7GB and CPU only I get around 5 t/s and with 14GB 2-3 t/s, so I run one of around 30GB I guess it will get around 1 t/s? My supposition is that increasing RAM doesn’t increase performance per se, just let’s you upload bigger models to memory, so performance is approximately linear on model size… what do you think?
From what I know, I assume yes, the relation between model size and speed/performance should be linear. Maybe there is some additional small overhead making it a bit faster or slower than expected. But I’m really not an expert on the maths, so don’t trust me.
And maybe have a look at this bugreport: https://github.com/ggml-org/llama.cpp/issues/11332
I think it matches your situation. They resolve this by messing with the batch size and someone recommends not to use Vulkan on an iGPU.Oh great, thanks
deleted by creator
Where is the sweet spot for running CPU bound models? I’ve just started playing with llama.cpp but the big models do make the cores work pretty hard. Should I look at using quantisation or more fine tuned models for the tasks I care about (developer assistance mainly).
What can I run on a 1080ti and how does it compare to what’s available in general?
On Huggingface is a space where you can select the model and your graphics card and see if you can run it, or how many cards you need to run it. https://huggingface.co/spaces/Vokturz/can-it-run-llm
You should be able to do inference on all 7b or smaller models with quantization.
Late to the party, I never got FOSAI working until I found LMStudio, but I have 2 questions:
-
Is there any way I could utilize my GPU, a Radeon RX6800M (12GB VRAM)? I got Mistral-7B doing 5 tokens/s but it’s all running on the CPU.
-
Is there any model specifically for programming questions? This could be of immense help to my projects without having to ask ChatGPT.
I got a question about LMStudio! Is it FOSS, or is it just partly open?
On their website I see that they do have a github link, but I can’t identify the “main” project.
Looks like LMStudio is FOSS although I’m not 100% sure. What if does is allow you to run FOSAI models locally.
Yeah, that I understand. I was just curious, since currently I’m using ollama, which is fully FOSS, and some web UI to work with the LLMs in chat. but having it all in one place would be really nice.
I’ve heard some good things about LMStudio, but if it’s not FOSS, it’s not getting on my machine.
-
Question: What is the best self hosted coding assistant?
The (only) project i found, that does what i want:
It works ok for the most part. The problem i have with it is that inline completion is more annoying then helpful, because the AI only sees the last few lines that you wrote and therefore does not know the larger context of the project.
I also found this project, it looks promising. Has anyone tested it? Can you separate the server from the client?
Are there other projects that integrate well into an IDE?
I’ve had decent results with continue, it’s similar to copilot and actually works decently with local models lately:
Thanks for the suggestion, I tried it and the diff view is very good. The setup was not really easy for my local models, but after i set it up, it was really fast. The biggest problem with the tool is that the open source models are not that good, i tried if it could fix a bug in my code and it was only able to make it worse. On a more positive note, you at least do not need to copy all text over to another window and it is great for generating boilerplate code nearly flawlessly every time.
Yeah definitely need to still understand the open source limits, they’re getting pretty dam good at generating code but their comprehension isn’t quite there, I think the ideal is eventually having 2 models, one that determines the problem and what the solution would be, and another that generates the code, so that things like “fix this bug” or more vague questions like “how do I start writing this app” would be more successful