Closed bryndin closed 6 months ago
Did you get your ollama here ? (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha) That's seems the problem of cuda , if you have any other Navida gpu connect your pc ,if so that's the issue came from . otherwise you are using something like zluda, try to remove the nvml.dll from the zluda folder . and restar the ollama again . if not working , try to follow this guide to build your own (https://github.com/likelovewant/ollama-for-amd/blob/main/wiki%20for%20build%20on%20amd]((ollama))
I used ollama v0.1.30(windows),installed hips and zluda,use command:""D:\Zluda\zluda.exe "C:\Users\……\AppData\Local\Programs\Ollama\ollama app.exe"""manually,could run ollama on 780m successfully.But when I updated ollama,had the same error"ggml_cuda_compute_forward: RMS_NORM failed".
I used ollama v0.1.30(windows),installed hips and zluda,use command:""D:\Zluda\zluda.exe "C:\Users\……\AppData\Local\Programs\Ollama\ollama app.exe"""manually,could run ollama on 780m successfully.But when I updated ollama,had the same error"ggml_cuda_compute_forward: RMS_NORM failed".
sorry ,this a not repo for ollama , if you have ollama issue ,you may raise an isuse there https://github.com/likelovewant/ollama-for-amd, rocmlibs for gfx1103 should not be the issue. anyway , if you download the ollama installer from above rellease page, That's because I did not not install any cuda tool kit during the build wich is for nvida gpu. In the past few version of ollama ,ollama has several bugs will wrong take amd zluda as nvida . and zluda has fixed it .but still not perferct . Try to remove the the nvml.dll from the zluda folder . and restar the ollama again . only use rocm rather than zluda . otherwise , you may try to build your version of ollama. It's works pefect on my pc .
Did you get your ollama here ? (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha)
Replacing the original Ollama with your files in ollama-windows-amd64.zip
did work. Thank you!
I wonder why the same can't be integrated into Ollama itself.
Did you get your ollama here ? (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha)
Replacing the original Ollama with your files in
ollama-windows-amd64.zip
did work. Thank you! I wonder why the same can't be integrated into Ollama itself.
Try the ollama instller ,it's natively support for amd780m ,you don't need to replace any other file .
Thanks,this ollama (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha) works on my 780m apu,I can use the tiny vision language model moondream on ollama now.
OK,other large language model and vision language model llava worked,but moondream couldn't.
Thanks,this ollama (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha) works on my 780m apu,I can use the tiny vision language model moondream on ollama now.
OK,other large language model and vision language model llava worked,but moondream couldn't.
Try the new update vesrionv0.1.34-alpha or git clone ollama ,edit as guide on wiki for build on amd
[ollama-for-amd],build your own ollama
Thanks,this ollama (https://github.com/likelovewant/ollama-for-amd/releases/tag/V0.1.33-alpha) works on my 780m apu,I can use the tiny vision language model moondream on ollama now. OK,other large language model and vision language model llava worked,but moondream couldn't.
Try the new update vesrionv0.1.34-alpha or git clone ollama ,edit as guide on
wiki for build on amd
[ollama-for-amd],build your own ollama
I download from https://github.com/likelovewant/ollama-for-amd/releases/download/v0.1.34-alpha/ollama-windows-amd64.zip and overwrite ollama,but couldn't use model moondream.
use command:ollama -v
return:ollama version is 0.1.33-alpha-5-g3952ceb
some error in server.log:
llama_model_loader: loaded meta data with 20 key-value pairs and 245 tensors from C:\Users\^.ollama\models\blobs\sha256-e554c6b9de016673fd2c732e0342967727e9659ca5f853a4947cc96263fa602b (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 = phi2
llama_model_loader: - kv 1: general.name str = moondream2
llama_model_loader: - kv 2: phi2.context_length u32 = 2048
llama_model_loader: - kv 3: phi2.embedding_length u32 = 2048
llama_model_loader: - kv 4: phi2.feed_forward_length u32 = 8192
llama_model_loader: - kv 5: phi2.block_count u32 = 24
llama_model_loader: - kv 6: phi2.attention.head_count u32 = 32
llama_model_loader: - kv 7: phi2.attention.head_count_kv u32 = 32
llama_model_loader: - kv 8: phi2.attention.layer_norm_epsilon f32 = 0.000010
llama_model_loader: - kv 9: phi2.rope.dimension_count u32 = 32
llama_model_loader: - kv 10: general.file_type u32 = 2
llama_model_loader: - kv 11: tokenizer.ggml.add_bos_token bool = false
llama_model_loader: - kv 12: tokenizer.ggml.model str = gpt2
llama_model_loader: - kv 13: tokenizer.ggml.tokens arr[str,51200] = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv 14: tokenizer.ggml.token_type arr[i32,51200] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 15: tokenizer.ggml.merges arr[str,50000] = ["Ġ t", "Ġ a", "h e", "i n", "r e",...
llama_model_loader: - kv 16: tokenizer.ggml.bos_token_id u32 = 50256
llama_model_loader: - kv 17: tokenizer.ggml.eos_token_id u32 = 50256
llama_model_loader: - kv 18: tokenizer.ggml.unknown_token_id u32 = 50256
llama_model_loader: - kv 19: general.quantization_version u32 = 2
llama_model_loader: - type f32: 147 tensors
llama_model_loader: - type q4_0: 97 tensors
llama_model_loader: - type q6_K: 1 tensors
llm_load_vocab: missing pre-tokenizer type, using: 'default'
llm_load_vocab:
llm_load_vocab: ****
llm_load_vocab: GENERATION QUALITY WILL BE DEGRADED!
llm_load_vocab: CONSIDER REGENERATING THE MODEL
llm_load_vocab: ****
llm_load_vocab:
llm_load_vocab: mismatch in special tokens definition ( 910/51200 vs 944/51200 ).
llm_load_print_meta: format = GGUF V3 (latest)
llm_load_print_meta: arch = phi2
llm_load_print_meta: vocab type = BPE
llm_load_print_meta: n_vocab = 51200
llm_load_print_meta: n_merges = 50000
llm_load_print_meta: n_ctx_train = 2048
llm_load_print_meta: n_embd = 2048
llm_load_print_meta: n_head = 32
llm_load_print_meta: n_head_kv = 32
llm_load_print_meta: n_layer = 24
llm_load_print_meta: n_rot = 32
llm_load_print_meta: n_embd_head_k = 64
llm_load_print_meta: n_embd_head_v = 64
llm_load_print_meta: n_gqa = 1
llm_load_print_meta: n_embd_k_gqa = 2048
llm_load_print_meta: n_embd_v_gqa = 2048
llm_load_print_meta: f_norm_eps = 1.0e-05
llm_load_print_meta: f_norm_rms_eps = 0.0e+00
llm_load_print_meta: f_clamp_kqv = 0.0e+00
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
llm_load_print_meta: f_logit_scale = 0.0e+00
llm_load_print_meta: n_ff = 8192
llm_load_print_meta: n_expert = 0
llm_load_print_meta: n_expert_used = 0
llm_load_print_meta: causal attn = 1
llm_load_print_meta: pooling type = 0
llm_load_print_meta: rope type = 2
llm_load_print_meta: rope scaling = linear
llm_load_print_meta: freq_base_train = 10000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_yarn_orig_ctx = 2048
llm_load_print_meta: rope_finetuned = unknown
llm_load_print_meta: ssm_d_conv = 0
llm_load_print_meta: ssm_d_inner = 0
llm_load_print_meta: ssm_d_state = 0
llm_load_print_meta: ssm_dt_rank = 0
llm_load_print_meta: model type = 1B
llm_load_print_meta: model ftype = Q4_0
llm_load_print_meta: model params = 1.42 B
llm_load_print_meta: model size = 788.55 MiB (4.66 BPW)
llm_load_print_meta: general.name = moondream2
llm_load_print_meta: BOS token = 50256 '<|endoftext|>'
llm_load_print_meta: EOS token = 50256 '<|endoftext|>'
llm_load_print_meta: UNK token = 50256 '<|endoftext|>'
llm_load_print_meta: LF token = 128 'Ä'
llm_load_tensors: ggml ctx size = 0.24 MiB
llm_load_tensors: offloading 24 repeating layers to GPU
llm_load_tensors: offloading non-repeating layers to GPU
llm_load_tensors: offloaded 25/25 layers to GPU
llm_load_tensors: ROCm0 buffer size = 732.30 MiB
llm_load_tensors: CPU buffer size = 56.25 MiB
..............................................................................
llama_new_context_with_model: n_ctx = 2048
llama_new_context_with_model: n_batch = 512
llama_new_context_with_model: n_ubatch = 512
llama_new_context_with_model: freq_base = 10000.0
llama_new_context_with_model: freq_scale = 1
llama_kv_cache_init: ROCm0 KV buffer size = 384.00 MiB
llama_new_context_with_model: KV self size = 384.00 MiB, K (f16): 192.00 MiB, V (f16): 192.00 MiB
llama_new_context_with_model: ROCm_Host output buffer size = 0.20 MiB
llama_new_context_with_model: ROCm0 compute buffer size = 160.00 MiB
llama_new_context_with_model: ROCm_Host compute buffer size = 8.01 MiB
llama_new_context_with_model: graph nodes = 921
llama_new_context_with_model: graph splits = 2
ggml_cuda_compute_forward: MUL_MAT failed
CUDA error: named symbol not found
current device: 0, in function ggml_cuda_compute_forward at D:/ollama-for-amd/llm/llama.cpp/ggml-cuda.cu:2300
err
GGML_ASSERT: D:/ollama-for-amd/llm/llama.cpp/ggml-cuda.cu:60: !"CUDA error"
0.1.33-alpha-5 The 0.1.33-alpha-5 is exactly same as v0.1.34 ollama offocial , as my repo was aim show ollama can support more amd gpu ,so there is no offoicial release over there .
llama_new_context_with_model: KV self size = 384.00 MiB, K (f16): 192.00 MiB, V (f16): 192.00 MiB llama_new_context_with_model: ROCm_Host output buffer size = 0.20 MiB llama_new_context_with_model: ROCm0 compute buffer size = 160.00 MiB llama_new_context_with_model: ROCm_Host compute buffer size = 8.01 MiB
The ROCm is working ollama is working but something not override ollama offocial release which not from my repo,that's the cause of cuda error.
make sure fully close the ollama .and reinstall the OllamaSetup.exe rather the [ollama-windows-amd64.zip]
also make sure the nvdml.dll and nvcuda.dll not in the zluda folder.
if not try to remove the moodream model and download again .
Downloaded and installed
AMD-Software-PRO-Edition-23.Q4-Win10-Win11-For-HIP.exe
Replaced
"c:\Program Files\AMD\ROCm\5.7\bin\rocblas.dll"
and"c:\Program Files\AMD\ROCm\5.7\bin\rocblas\library"
with the content in
rocm gfx1103 AMD780M phoenix V3.7z
Ollama (Windows) can find the GPU, but then fails with
ggml_cuda_compute_forward: RMS_NORM failed CUDA error: invalid device function current device: 0, in function ggml_cuda_compute_forward at C:/a/ollama/ollama/llm/llama.cpp/ggml-cuda.cu:2300 err GGML_ASSERT: C:/a/ollama/ollama/llm/llama.cpp/ggml-cuda.cu:60: !"CUDA error"
Any idea what could be wrong? I tried all other versions of gfx1103 files you have.
Win 11, latest Ollama with
llama3:8b-instruct-q6_K
AMD drivers:amd-software-adrenalin-edition-24.4.1-minimalsetup-240423_web.exe
Here's the full log