'2026/05'에 해당되는 글 3건

  1. 12:06:31 llama.cpp multi modal 시도
  2. 2026.05.01 asrock B360M pro4
  3. 2026.05.01 유류비 지원 때문인가?
카테고리 없음2026. 5. 2. 12:06

llama.cpp 에서 + 눌러보면 이미지가 있는데 활성화가 안되고

 

llama-swap 에서는 입력은 가능한데 막상 해보면 500에러가 발생한다.

그래서 찾아보니 음.. --mmproj 옵션?

멀티모달 입력 활성화 방법

  • 두 가지 주요 실행 방식이 안내됨: 첫 번째는 -hf 옵션 사용(지원 모델 필요), 두 번째는 -m--mmproj 옵션을 조합해 텍스트와 멀티모달 프로젝터 모델을 각각 지정하는 방법임
  • -hf 옵션 사용 시, 멀티모달 기능을 끄고 싶으면 --no-mmproj를 추가하고, 사용자 지정 mmproj 파일을 활용할 경우 --mmproj local_file.gguf 옵션을 사용함
  • GPU 오프로딩이 기본값이며, 이를 원치 않으면 --no-mmproj-offload 옵션으로 비활성화가 가능함

예시 명령어

  • 커맨드라인에서는 llama-mtmd-cli를, 서버에서는 llama-server를 활용하는 형태임
  • 로컬 파일을 사용하는 경우 --mmproj로 직접 파일을 지정하는 방식임
  • GPU 오프로딩을 비활성화하려면 --no-mmproj-offload 옵션을 추가 사용하는 방식임

즉시 사용 가능한 멀티모달 모델 목록

  • Q4_K_M 양자화를 기본으로 하는 다양한 준비된 모델들이 안내되어 있음
  • 지원 모델 예시:
    • Gemma 3: 4b, 12b, 27b 버전
    • SmolVLM 계열: 256M, 500M, 2.2B 등
    • Pixtral 12B
    • Qwen 2 VL: 2B, 7B 및 Qwen 2.5 VL: 3B, 7B, 32B, 72B
    • Mistral Small 3.1 24B (IQ2_M 양자화)
    • InternVL 2.5와 3 세대: 다양한 파라미터 크기 지원임

[링크: https://news.hada.io/topic?id=20822]

 

제미나이 검색 추천으로 보니 이런 것들이 보인다.

mmproj-model.gguf 음...??

llama-server: You can run a local server that accepts image inputs via an API.
  • Setup: Start the server with the multimodal projector: llama-server -m gemma-model.gguf --mmproj mmproj-model.gguf --port 8080.
  • Sending Images: You can then send requests with Base64 encoded images or URLs to the /v1/chat/completions endpoint.

 

도움말을 보니 multi modal proejctor 줄여서 mmproj 라..

/llama-b8925$ ./llama-server  --help
load_backend: loaded RPC backend from /mnt/Downloads/llama-b8925/libggml-rpc.so
load_backend: loaded Vulkan backend from /mnt/Downloads/llama-b8925/libggml-vulkan.so
load_backend: loaded CPU backend from /mnt/Downloads/llama-b8925/libggml-cpu-haswell.so
----- common params -----

-h,    --help, --usage                  print usage and exit


-hf,   -hfr, --hf-repo <user>/<model>[:quant]
                                        Hugging Face model repository; quant is optional, case-insensitive,
                                        default to Q4_K_M, or falls back to the first file in the repo if
                                        Q4_K_M doesn't exist.
                                        mmproj is also downloaded automatically if available. to disable, add
                                        --no-mmproj
                                        example: ggml-org/GLM-4.7-Flash-GGUF:Q4_K_M
                                        (default: unused)
                                        (env: LLAMA_ARG_HF_REPO)
-hfd,  -hfrd, --hf-repo-draft <user>/<model>[:quant]
                                        Same as --hf-repo, but for the draft model (default: unused)
                                        (env: LLAMA_ARG_HFD_REPO)
-hff,  --hf-file FILE                   Hugging Face model file. If specified, it will override the quant in
                                        --hf-repo (default: unused)
                                        (env: LLAMA_ARG_HF_FILE)
-hfv,  -hfrv, --hf-repo-v <user>/<model>[:quant]
                                        Hugging Face model repository for the vocoder model (default: unused)
                                        (env: LLAMA_ARG_HF_REPO_V)
-hffv, --hf-file-v FILE                 Hugging Face model file for the vocoder model (default: unused)
                                        (env: LLAMA_ARG_HF_FILE_V)
-hft,  --hf-token TOKEN                 Hugging Face access token (default: value from HF_TOKEN environment
                                        variable)

-mm,   --mmproj FILE                    path to a multimodal projector file. see tools/mtmd/README.md
                                        note: if -hf is used, this argument can be omitted
                                        (env: LLAMA_ARG_MMPROJ)
-mmu,  --mmproj-url URL                 URL to a multimodal projector file. see tools/mtmd/README.md
                                        (env: LLAMA_ARG_MMPROJ_URL)
--mmproj-auto, --no-mmproj, --no-mmproj-auto
                                        whether to use multimodal projector file (if available), useful when
                                        using -hf (default: enabled)
                                        (env: LLAMA_ARG_MMPROJ_AUTO)
--mmproj-offload, --no-mmproj-offload   whether to enable GPU offloading for multimodal projector (default:
                                        enabled)
                                        (env: LLAMA_ARG_MMPROJ_OFFLOAD)
--image-min-tokens N                    minimum number of tokens each image can take, only used by vision
                                        models with dynamic resolution (default: read from model)
                                        (env: LLAMA_ARG_IMAGE_MIN_TOKENS)
--image-max-tokens N                    maximum number of tokens each image can take, only used by vision
                                        models with dynamic resolution (default: read from model)
                                        (env: LLAMA_ARG_IMAGE_MAX_TOKENS)
-otd,  --override-tensor-draft <tensor name pattern>=<buffer type>,...
                                        override tensor buffer type for draft model
-cmoed, --cpu-moe-draft                 keep all Mixture of Experts (MoE) weights in the CPU for the draft
                                        model
                                        (env: LLAMA_ARG_CPU_MOE_DRAFT)
-ncmoed, --n-cpu-moe-draft N            keep the Mixture of Experts (MoE) weights of the first N layers in the
                                        CPU for the draft model

 

그래서 gemma4 저장소를 가봤더니 어라? 가장 아래 전에는 눈치채지 못하고 흘렸던 mmproj 라는 녀석이 있다.

[링크 : https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/tree/main]

 

그래서 그걸 다운로드 하고 -mm 옵션을 주면

안되네!? 혹시나 해서 F16 으로 해주니 된다. 역시 falcon이 최고여(??? 응?)

$ ./llama-b8925/llama-server -m ./model/gemma/gemma-4-E4B-it-Q4_K_M.gguf -mm ./model/gemma/mmproj-BF16.gguf

mtmd_init_from_file: error: mismatch between text model (n_embd = 2560) and mmproj (n_embd = 2816)
hint: you may be using wrong mmproj

srv    load_model: failed to load multimodal model, './model/gemma/mmproj-BF16.gguf'
srv    operator(): operator(): cleaning up before exit...
main: exiting due to model loading error

 

BF16 은 FP32 와 동일한 8bit 지수, F16은 5bit 지수

간단하게 BF16이 F16 보다 정밀도 면에서 좋다. 인데 하드웨어 지원이 안되면 무의미할테니 머.. 어쩔수 없나?

[링크 : https://g3lu.tistory.com/55]

 

+

gpt 왈 30 시리즈. ampere 부터 BF16을 지원한다고 한다.역시 3090 이런걸로 크게 갔어야 했나.. 쩝

 

아무튼 F16.gguf로 돌리니 images가 활성화 된다.



이미지가 커지면 토큰을 많이 먹는지 터지길래 조그많게 이미지 스샷 찍어서 시도 하니

먼가 분석을 시도한다 오오오!

 

 

+

 

이러니 메모리 부족 소리 나오지 -_-

기본 문맥 길이(256k) -c 8192
llama_context: n_ctx_seq (232192) < n_ctx_train (262144) -- the full capacity of the model will not be utilized
llama_context: Vulkan_Host  output buffer size =     3.79 MiB
llama_kv_cache:    Vulkan1 KV buffer size =  2267.50 MiB
llama_kv_cache:    Vulkan2 KV buffer size =  2267.50 MiB
llama_kv_cache: size = 4535.00 MiB (232192 cells,  10 layers,  4/1 seqs), K (f16): 2267.50 MiB, V (f16): 2267.50 MiB
llama_kv_cache: attn_rot_k = 0, n_embd_head_k_all = 256
llama_kv_cache: attn_rot_v = 0, n_embd_head_k_all = 256
llama_memory_recurrent:    Vulkan1 RS buffer size =   150.75 MiB
llama_memory_recurrent:    Vulkan2 RS buffer size =   100.50 MiB
llama_memory_recurrent: size =  251.25 MiB (     4 cells,  40 layers,  4 seqs), R (f32):   11.25 MiB, S (f32):  240.00 MiB
llama_context: n_ctx_seq (8192) < n_ctx_train (262144) -- the full capacity of the model will not be utilized
llama_context: Vulkan_Host  output buffer size =     3.79 MiB
llama_kv_cache:    Vulkan1 KV buffer size =    80.00 MiB
llama_kv_cache:    Vulkan2 KV buffer size =    80.00 MiB
llama_kv_cache: size =  160.00 MiB (  8192 cells,  10 layers,  4/1 seqs), K (f16):   80.00 MiB, V (f16):   80.00 MiB
llama_kv_cache: attn_rot_k = 0, n_embd_head_k_all = 256
llama_kv_cache: attn_rot_v = 0, n_embd_head_k_all = 256
llama_memory_recurrent:    Vulkan1 RS buffer size =   134.00 MiB
llama_memory_recurrent:    Vulkan2 RS buffer size =   117.25 MiB
llama_memory_recurrent: size =  251.25 MiB (     4 cells,  40 layers,  4 seqs), R (f32):   11.25 MiB, S (f32):  240.00 MiB

 

그래서 context 줄이고 mmproj 설정해주니 잘인식한다.

 ./llama-b8925/llama-server --host 0.0.0.0 --model ./model/qwen3.6_35B/Qwen3.6-35B-A3B-UD-Q2_K_XL.gguf -c 8192 -mm ./model/qwen3.6_35B/mmproj-F16.gguf

 

 

Posted by 구차니

엥?

x8 x8 도 아니고 x16 x4는 무슨 이상한(?) 구조냐 싶은데

- 2 x PCI Express 3.0 x16 슬롯 (PCIE1/PCIE4: 싱글에서 x16 (PCIE1); 듀얼에서 x16 (PCIE1) / x4 (PCIE4))*
- 2 x PCI Express 3.0 x1 슬롯 (유연한 PCIe)
- AMD Quad CrossFireX™ 및 CrossFireX™ 지원
- 1 x M.2 소켓 (Key E), type 2230 WiFi/BT PCIe WiFi 모듈용 및 Intel® CNVi (Integrated WiFi/BT)**

*PCIE2 이 점유되어 있는 경우에는 PCIE4는 x2 모드로 다운 그레이드됩니다.
부팅 디스크로 NVMe SSD 지원

**CNVio1 WiFi 모듈용(Intel® Wireless-AC 9560/9462/9461) only.

[링크 : https://www.asrock.com/mb/Intel/B360M%20Pro4/index.kr.asp]

 

그 와중에 무선랜은 전용 모듈이거나 범용 모듈인걸려나?

[링크 : https://www.asrock.com/support/faq.kr.asp?id=514]

 

순수하게(?) RF 부분만 그러니까 PHY 레이어만 AC-9560.. 나 AX101.. 이런식으로 파는건가

나머지 MAC 계층 부터는 PCH에 내장?

CNVi or CNVio ("Connectivity Integration", Intel Integrated Connectivity I/O interface)

[링크 : https://en.wikipedia.org/wiki/CNVi]

 

M.2 중 M2_2에 Sata 커넥터는 SATA3_1과 공용.

- 6 x SATA3 6.0Gb/s 커넥터, NCQ, AHCI 및 Hot Plug 기능 지원*
- 1 x Ultra M.2 소켓 (M2_1), M Key type 2230/2242/2260/2280 M.2 PCI Express module 최대. Gen3 x4 (32 Gb/s)**
- 1 x M.2 소켓 (M2_2), M Key type 2230/2242/2260/2280 M.2 SATA3 6.0 Gb/s 모듈 지원 및 M.2 PCI Express module 최대. Gen3 x1 (8 Gb/s)**

*M2_2 에 SATA 타입의 M.2 장치가 연결된 경우, SATA3_1 은 사용할 수 없습니다.

**Intel® Optane™ 기술 지원 (M2_1 전용)
부팅 디스크로 NVMe SSD 지원
ASRock U.2 키트

 

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

지름 - 케이스, 램  (0) 2026.04.30
되는게 없네 ㅋㅋㅋ - 라이트 컴 NA210  (0) 2026.04.30
듀얼 그래픽 카드!  (0) 2026.04.25
줍줍 성공?  (0) 2026.04.18
그래픽 카드 교체!  (0) 2026.04.16
Posted by 구차니

이번주 월요일 부터 이상하게(?) 차들이 넘쳐나는 느낌

그 와중에 오늘은 연휴 시작이니 많을만 하긴 했는데

그럼에도 불구하고 왜 이렇게 넘쳐나는지 -_ㅠ

집에 양평가는 길목이라 그런걸 탓해야 하려나

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

레일 교체  (0) 2026.04.08
개피곤  (0) 2026.04.02
앉아보기  (0) 2026.03.29
잠 + 밥 + 화장실 반복  (0) 2026.03.28
퇴원  (4) 2026.03.27
Posted by 구차니