- Notifications
You must be signed in to change notification settings - Fork 14.1k
Description
Name and Version
version: 5061 (916c83b)
built with MSVC 19.38.33134.0 for x64
Operating systems
Windows
GGML backends
Vulkan
Hardware
Ryzen 7 5800H + AMD Radeon RX 6600M
Models
Any model
Problem description & steps to reproduce
When trying to run llama-server with -ub 8192 -b 8192 -c 8192, it crashes with ggml_vulkan: Device memory allocation of size 3959422976 failed. with any model I try (the allocation size differs between models), even though I have enough GPU memory after model is loaded.
I tried smaller models to exclude possible OOM (the log includes nomic-embed-text-v1.5) and I see that ~100mb of VRAM gets allocated for a model (0.9GB used), then it crashes when trying to allocate 3959422976 bytes.
When setting any of these parameters to 4096, the model loads successfully.
The same occurs with any model. Tried with Qwen2.5 3B Q8_0 and nomic-embed-text-v1.5 Q8_0.
First Bad Commit
No response
Relevant log output
.\llama-server.exe --embedding -ub 8192 -b 8192 -c 8192 --host 127.0.0.1 --port 8080 -m nomic-embed-text-v1.5.Q8_0.gguf -ngl 99 ggml_vulkan: Found 1 Vulkan devices: ggml_vulkan: 0 = AMD Radeon RX 6600M (AMD proprietary driver) | uma: 0 | fp16: 1 | warp size: 32 | shared memory: 32768 | int dot: 1 | matrix cores: none build: 5061 (916c83bf) with MSVC 19.38.33134.0 for x64 system info: n_threads = 8, n_threads_batch = 8, total_threads = 16 system_info: n_threads = 8 (n_threads_batch = 8) / 16 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | LLAMAFILE = 1 | OPENMP = 1 | AARCH64_REPACK = 1 | main: binding port with default address family main: HTTP server is listening, hostname: 127.0.0.1, port: 8080, http threads: 15 main: loading model srv load_model: loading model 'nomic-embed-text-v1.5.Q8_0.gguf' llama_model_load_from_file_impl: using device Vulkan0 (AMD Radeon RX 6600M) - 8176 MiB free llama_model_loader: loaded meta data with 23 key-value pairs and 112 tensors from nomic-embed-text-v1.5.Q8_0.gguf (version GGUF V3 (latest)) llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. llama_model_loader: - kv 0: general.architecture str = nomic-bert llama_model_loader: - kv 1: general.name str = nomic-embed-text-v1.5 llama_model_loader: - kv 2: nomic-bert.block_count u32 = 12 llama_model_loader: - kv 3: nomic-bert.context_length u32 = 2048 llama_model_loader: - kv 4: nomic-bert.embedding_length u32 = 768 llama_model_loader: - kv 5: nomic-bert.feed_forward_length u32 = 3072 llama_model_loader: - kv 6: nomic-bert.attention.head_count u32 = 12 llama_model_loader: - kv 7: nomic-bert.attention.layer_norm_epsilon f32 = 0.000000 llama_model_loader: - kv 8: general.file_type u32 = 7 llama_model_loader: - kv 9: nomic-bert.attention.causal bool = false llama_model_loader: - kv 10: nomic-bert.pooling_type u32 = 1 llama_model_loader: - kv 11: nomic-bert.rope.freq_base f32 = 1000.000000 llama_model_loader: - kv 12: tokenizer.ggml.token_type_count u32 = 2 llama_model_loader: - kv 13: tokenizer.ggml.bos_token_id u32 = 101 llama_model_loader: - kv 14: tokenizer.ggml.eos_token_id u32 = 102 llama_model_loader: - kv 15: tokenizer.ggml.model str = bert llama_model_loader: - kv 16: tokenizer.ggml.tokens arr[str,30522] = ["[PAD]", "[unused0]", "[unused1]", "...llama_model_loader: - kv 17: tokenizer.ggml.scores arr[f32,30522] = [-1000.000000, -1000.000000, -1000.00...llama_model_loader: - kv 18: tokenizer.ggml.token_type arr[i32,30522] = [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...llama_model_loader: - kv 19: tokenizer.ggml.unknown_token_id u32 = 100llama_model_loader: - kv 20: tokenizer.ggml.seperator_token_id u32 = 102llama_model_loader: - kv 21: tokenizer.ggml.padding_token_id u32 = 0llama_model_loader: - kv 22: general.quantization_version u32 = 2llama_model_loader: - type f32: 51 tensorsllama_model_loader: - type q8_0: 61 tensorsprint_info: file format = GGUF V3 (latest)print_info: file type = Q8_0print_info: file size = 138.65 MiB (8.51 BPW)load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrectload: special tokens cache size = 5load: token to piece cache size = 0.2032 MBprint_info: arch = nomic-bertprint_info: vocab_only = 0print_info: n_ctx_train = 2048print_info: n_embd = 768print_info: n_layer = 12print_info: n_head = 12print_info: n_head_kv = 12print_info: n_rot = 64print_info: n_swa = 0print_info: n_swa_pattern = 1print_info: n_embd_head_k = 64print_info: n_embd_head_v = 64print_info: n_gqa = 1print_info: n_embd_k_gqa = 768print_info: n_embd_v_gqa = 768print_info: f_norm_eps = 1.0e-12print_info: f_norm_rms_eps = 0.0e+00print_info: f_clamp_kqv = 0.0e+00print_info: f_max_alibi_bias = 0.0e+00print_info: f_logit_scale = 0.0e+00print_info: f_attn_scale = 0.0e+00print_info: n_ff = 3072print_info: n_expert = 0print_info: n_expert_used = 0print_info: causal attn = 0print_info: pooling type = 1print_info: rope type = 2print_info: rope scaling = linearprint_info: freq_base_train = 1000.0print_info: freq_scale_train = 1print_info: n_ctx_orig_yarn = 2048print_info: rope_finetuned = unknownprint_info: ssm_d_conv = 0print_info: ssm_d_inner = 0print_info: ssm_d_state = 0print_info: ssm_dt_rank = 0print_info: ssm_dt_b_c_rms = 0print_info: model type = 137Mprint_info: model params = 136.73 Mprint_info: general.name = nomic-embed-text-v1.5print_info: vocab type = WPMprint_info: n_vocab = 30522print_info: n_merges = 0print_info: BOS token = 101 '[CLS]'print_info: EOS token = 102 '[SEP]'print_info: UNK token = 100 '[UNK]'print_info: SEP token = 102 '[SEP]'print_info: PAD token = 0 '[PAD]'print_info: MASK token = 103 '[MASK]'print_info: LF token = 0 '[PAD]'print_info: EOG token = 102 '[SEP]'print_info: max token length = 21load_tensors: loading model tensors, this can take a while... (mmap = true)load_tensors: offloading 12 repeating layers to GPUload_tensors: offloading output layer to GPUload_tensors: offloaded 13/13 layers to GPUload_tensors: Vulkan0 model buffer size = 114.89 MiBload_tensors: CPU_Mapped model buffer size = 23.76 MiB......................................................llama_context: constructing llama_contextllama_context: n_seq_max = 1llama_context: n_ctx = 8192llama_context: n_ctx_per_seq = 8192llama_context: n_batch = 8192llama_context: n_ubatch = 8192llama_context: causal_attn = 0llama_context: flash_attn = 0llama_context: freq_base = 1000.0llama_context: freq_scale = 1llama_context: n_ctx_pre_seq (8192) > n_ctx_train (2048) -- possible training context overflowllama_context: Vulkan_Host output buffer size = 0.00 MiBinit: kv_size = 8192, offload = 1, type_k = 'f16', type_v = 'f16', n_layer = 12, can_shift = 1init: Vulkan0 KV buffer size = 288.00 MiBllama_context: KV self size = 288.00 MiB, K (f16): 144.00 MiB, V (f16): 144.00 MiBggml_vulkan: Device memory allocation of size 3959422976 failed.ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemoryggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 3959422976llama_init_from_model: failed to initialize the context: failed to allocate compute pp bufferscommon_init_from_params: failed to create context with model 'nomic-embed-text-v1.5.Q8_0.gguf'srv load_model: failed to load model, 'nomic-embed-text-v1.5.Q8_0.gguf'srv operator (): operator (): cleaning up before exit...