ubuntuusers.de

KI mit Tesla M40

Status: Ungelöst | Ubuntu-Version: Nicht spezifiziert
Antworten |

darkjoda

Avatar von darkjoda

Anmeldungsdatum:
16. Oktober 2011

Beiträge: 75

Wohnort: Hamburg

Hallo zusammen,

ich bin mir nicht sicher, ob das der richtige Forumsbereich ist. Bitte gibt mir einen Tipp, wenn ich das woanders hinschreiben sollte. Ich habe ein kleines Projekt: Ich habe einen Proxmox Server, wo ich eine VM mit Ubuntu Server laufen habe. In dieser habe ich eine Tesla M40 24 GB eingebunden. Also durchgeschleift…

Ziel ist es, diese Tesla Karte für eine sprach KI über API anzusprechen. Leider bekomme ich die KI-Modelle nicht über die GPU zum Laufen. Die Tesla habe ich, meine ich, richtig installiert.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sudo apt-add-repository -r ppa:graphics-drivers/ppa
sudo apt update
sudo apt remove nvidia*
sudo apt autoremove
sudo ubuntu-drivers autoinstall
# reboot
nvidia-smi 
sudo apt-get install nvidia-cuda-dev  nvidia-cuda-toolkit
sudo rmmod nouveau
sudo modprobe nvidia  
# reboot
nvidia-smi

Die ausgabe von nvidia-ami ist als Anlage dabei. Wenn ich dann von der Github Siete https://github.com/Mozilla-Ocho/llamafile einen Clone mache (git clone https://github.com/Mozilla-Ocho/llamafile) und dann das Modell llava-v1.5-7b-q4.llamafile herunterlade. Natürlich auch alle Schritte durchlaufe, geht das Modell auf der CPU.

wenn ich dann den Fehl "./llava-v1.5-7b-q4.llamafile -ngl 99 --gpu nvidia" ausführe bekomme ich diese Meldung zurück

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import_cuda_impl: initializing gpu module...
compile_nvidia: note: building ggml-cuda with nvcc -arch=native...
llamafile_log_command: /usr/bin/nvcc -arch=native --shared --forward-unknown-to-host-compiler -use_fast_math --compiler-options "-fPIC -O3 -march=native -mtune=native" -DNDEBUG -DGGML_BUILD=1 -DGGML_SHARED=1 -DGGML_CUDA_MMV_Y=1 -DGGML_MULTIPLATFORM -DGGML_CUDA_DMMV_X=32 -DK_QUANTS_PER_ITERATION=2 -DGGML_CUDA_PEER_MAX_BATCH_SIZE=128 -DGGML_USE_CUBLAS -o /home/lan-id/.llamafile/ggml-cuda.so.e251ca /home/lan-id/.llamafile/ggml-cuda.cu -lcublas -lcuda
nvcc fatal   : Value 'native' is not defined for option 'gpu-architecture'
Compile: warning: /usr/bin/nvcc returned nonzero exit status
get_nvcc_arch_flag: note: building nvidia compute capability detector...
llamafile_log_command: /usr/bin/nvcc -o /home/lan-id/.llamafile/compcap.93sm4z /home/lan-id/.llamafile/compcap.cu
llamafile_log_command: /home/lan-id/.llamafile/compcap
compile_nvidia: note: building ggml-cuda with nvcc -arch=compute_52...
llamafile_log_command: /usr/bin/nvcc -arch=compute_52 --shared --forward-unknown-to-host-compiler -use_fast_math --compiler-options "-fPIC -O3 -march=native -mtune=native" -DNDEBUG -DGGML_BUILD=1 -DGGML_SHARED=1 -DGGML_CUDA_MMV_Y=1 -DGGML_MULTIPLATFORM -DGGML_CUDA_DMMV_X=32 -DK_QUANTS_PER_ITERATION=2 -DGGML_CUDA_PEER_MAX_BATCH_SIZE=128 -DGGML_USE_CUBLAS -o /home/lan-id/.llamafile/ggml-cuda.so.e251ca /home/lan-id/.llamafile/ggml-cuda.cu -lcublas -lcuda
/home/lan-id/.llamafile/ggml-cuda.cu(408): warning #1305-D: function declared with "noreturn" does return

/home/lan-id/.llamafile/ggml-cuda.cu(802): warning #177-D: function "warp_reduce_sum(half2)" was declared but never referenced

/home/lan-id/.llamafile/ggml-cuda.cu(823): warning #177-D: function "warp_reduce_max(half2)" was declared but never referenced

/home/lan-id/.llamafile/ggml-cuda.cu(408): warning #1305-D: function declared with "noreturn" does return

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                                                  ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                                                   ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
/home/lan-id/.llamafile/ggml-cuda.cu: In function ‘void ggml_cuda_error(const char*, const char*, const char*, int, const char*)’:
/home/lan-id/.llamafile/ggml-cuda.cu:408:1: warning: ‘noreturn’ function does return
  408 | }
      | ^
/home/lan-id/.llamafile/ggml-cuda.cu: In function ‘int64_t get_row_rounding(ggml_type, const std::array<float, 16>&)’:
/home/lan-id/.llamafile/ggml-cuda.cu:8428:18: warning: control reaches end of non-void function [-Wreturn-type]
 8428 |             GGML_ASSERT(false);
      |             ~~~~~^~~
Compile: warning: /usr/bin/nvcc returned nonzero exit status
extract_cuda_dso: note: prebuilt binary /zip/ggml-cuda.so not found
fatal error: support for --gpu nvidia was explicitly requested, but it wasn't available

Kenn jemand eine gut How To Seite geben oder kann mir jemand mit dem Problem helfen?

Danke im Voraus

Hier noch einige Informationen

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

nvcc --list-gpu-arch
compute_35
compute_37
compute_50
compute_52
compute_53
compute_60
compute_61
compute_62
compute_70
compute_72
compute_75
compute_80
compute_86
compute_87

darkjoda

(Themenstarter)
Avatar von darkjoda

Anmeldungsdatum:
16. Oktober 2011

Beiträge: 75

Wohnort: Hamburg

Nachtrag

Die Nvidia Tesla M40 funktioniert.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
./gpu_burn 60
Using compare file: compare.ptx
Burning for 60 seconds.
GPU 0: Tesla M40 24GB (UUID: GPU-572c502f-31cc-fca5-50f0-6b65c7dfe057)
Initialized device 0 with 22939 MB of memory (22736 MB available, using 20462 MB of it), using FLOATS
Results are 268435456 bytes each, thus performing 77 iterations
76.7%  proc'd: 77 (1854 Gflop/s)   errors: 0   temps: 87 C
        Summary at:   Sun 24 Mar 14:52:14 UTC 2024

91.7%  proc'd: 77 (1854 Gflop/s)   errors: 0   temps: 87 C
        Summary at:   Sun 24 Mar 14:52:23 UTC 2024

100.0%  proc'd: 77 (1854 Gflop/s)   errors: 0   temps: 87 C

verdooft

Anmeldungsdatum:
15. September 2012

Beiträge: 4369

Funktioniert jetzt nur der Test oder auch die KI-Anwendung?

Da hier womöglich nur wenige lokale KI-Anwendungen - diese eine vielleicht niemand - nutzen, ich selbst nur per CPU, würde ich das sonst auf der Github-Projektseite (Issues?) thematisieren.

darkjoda

(Themenstarter)
Avatar von darkjoda

Anmeldungsdatum:
16. Oktober 2011

Beiträge: 75

Wohnort: Hamburg

Hallo Verdooft,

die KI läuft nicht. Über CPU läuft die KI, aber das ist mega langsam. Auf meinem Windows System habe ich die KI mit einer 1060 zum Laufen bekommen. Das ist schneller als die KIs im Internet. Nur leider bekomme ich die größeren LLMs nicht mit der 1060 zum Laufen, da der Speicher zu klein ist. Auch plane ich zukünftig die KI mittels API anzusprechen. Und daher möchte ich das LLM in meinem Server laufen haben.

verdooft

Anmeldungsdatum:
15. September 2012

Beiträge: 4369

Wie geschrieben, auf den Github Projektseiten sind Leute unterwegs, die die Anwendung kennen, wissen, ob man einen Teil der Layer auf der GPU laufen lassen kann, welche CUDA-Versionen kompatibel sind, usw.. Da würde ich nach Problemlösungen recherchieren und bei Bedarf fragen.

Ich führe llava-v1.6-34b (8 Bit Quantisierung) - wesentlich besser als 1.5, was du im Eröffnungsposting versuchst - auf der CPU aus, die Performance reicht mir. Allerdings verwende ich llama.cpp. 13b und 7b Modelle sind ebenfalls verfügbar.

https://huggingface.co/cjpais

bigsatchmo

Anmeldungsdatum:
30. April 2024

Beiträge: 1

Ich weiß.. der Beitrag ist schon etwas älter. Ich hab die Karte mit Ubuntu und oobabooga zum laufen bekommen.

Mit zwei M40 / 24GB geht sogar ein 70b model.. z.B. https://huggingface.co/miqudev/miqu-1-70b

Antworten |