DeepSeek V4 ([#24162](https://github.com/ggml-org/llama.cpp/pull/24162)) - con
요약
llama.cpp 프로젝트에 DeepSeek V4 모델 지원을 위한 업데이트가 반영되었습니다. 모델 변환, 기본 설정, 상태 저장 및 로드 기능과 함께 성능 최적화를 위한 다양한 버그 수정 및 코드 정리가 포함되었습니다.
핵심 포인트
- DeepSeek V4 모델 변환 및 기본 설정 지원 추가
- 그래프 재사용 및 FA(Flash Attention) 활성화 기능 포함
- KV-cache 예약 및 메모리 효율화를 위한 V-cache 제거
- 채팅 템플릿 인라이닝 메커니즘 및 아키텍처 최적화
DeepSeek V4 (#24162)
-
convert: dsv4 변환 추가
-
기본 설정 (basic setup) 추가
-
llm_graph_input_dsv4 추가
-
상태 저장 및 로드 (save-load state) 추가
-
sinkhorn eps 추가 - @fairydreaming에 의한 수정
-
rope 수정 추가
-
데드 코드 (dead code) 정리
-
버그 수정
-
pro 모델 지원: @fairydreaming에 의해 추가됨
-
불필요한 V 캐시 (V cache) 제거
-
채팅 템플릿 (Chat template)
-
디버깅 잔여물 제거
-
아키텍처에 기반한 템플릿 인라이닝 (inlining templates) 메커니즘 추가
-
s/deepseek-v4-flash/deepseek4/g
-
s/deepseek-v4-flash/deepseek4/g 계속됨
-
그래프 재사용 (graph reuse) 활성화
-
FA 활성화
-
llama 아키텍처 테스트 수정
-
이름 변경
-
antirez ds4 GGUF와의 호환성
-
super class 메서드 호출을 통해 set_gguf_parameters()를 단순화하고, moe.score_func를 expert_gating_func로 교체함.
-
최악의 경우를 대비한 kv-cache 예약
-
max split inputs 되돌리기
-
리뷰 코멘트 반영
-
FA 활성화를 위한 패딩 (padding) 추가
-
plan.n_kv의 최종 값만 256으로 패딩
-
내장 cpp 채팅 템플릿 제거
-
cont: cpp 내장 템플릿 제거
-
오래된 테스트 제거
-
ggml_view_3d()를 ggml_reshape_3d()로 교체
Co-authored-By: Georgi Gerganov ggerganov@gmail.com
-
현재는 n_seq=1만 지원
-
미사용 변수 제거
-
cont: 미사용 변수 제거
-
scale bias 사용
-
can_reuse를 위한 올바른 ptr 사용
-
gen-chat-inline-templates.py 제거
-
graph reuse 단순화
-
cont: 정리 (cleanup)
-
미사용 입력 제거
-
부분 체크포인팅 (partial checkpointing) 활성화
-
kq_mask를 위한 올바른 shape 추가 + dsv4를 위해 llama_model_n_swa를 0으로 설정
-
source_idx 사전 계산 + dummy write에 대한 주석 추가
-
multi-seq 지원
-
restored_trim_pos 제거
-
가능한 경우 split_equal 사용
-
들여쓰기 수정
-
리뷰 코멘트 반영
-
LLM_KV 사용
-
CI 수정
Co-authored-by: Piotr Wilkin piotr.wilkin@syndatis.com
Co-authored-by: Stanisław Szymczyk sszymczy@gmail.com
Co-authored-by: Xuan Son Nguyen son@huggingface.co
Co-authored-by: fairydreaming 166155368+fairydreaming@users.noreply.github.com
Co-authored-by: Georgi Gerganov ggerganov@gmail.com
macOS/iOS:
- macOS Apple Silicon (arm64)
- macOS Apple Silicon (arm64, KleidiAI 활성화) 비활성화됨
- macOS Intel (x64)
- iOS XCFramework
Linux:
<strong>Linux:</strong>
- Ubuntu x64 (CPU)
- Ubuntu arm64 (CPU)
- Ubuntu s390x (CPU)
- Ubuntu x64 (Vulkan)
- Ubuntu arm64 (Vulkan)
- Ubuntu x64 (ROCm 7.2)
- Ubuntu x64 (OpenVINO)
- Ubuntu x64 (SYCL FP32)
- Ubuntu x64 (SYCL FP16)
<strong>Android:</strong>
<strong>Windows:</strong>
<strong>Windows:</strong>
- Windows x64 (CPU)
- Windows arm64 (CPU)
- Windows arm64 (OpenCL Adreno)
- Windows x64 (CUDA 12) - CUDA 12.4 DLLs
- Windows x64 (CUDA 13) - CUDA 13.3 DLLs
- Windows x64 (Vulkan)
- Windows x64 (OpenVINO)
- Windows x64 (SYCL)
- Windows x64 (HIP)**
openEuler:
- DISABLED
- openEuler x86 (310p)
- openEuler x86 (910b, ACL Graph)
- openEuler aarch64 (310p)
- openEuler aarch64 (910b, ACL Graph)**
UI:
AI 자동 생성 콘텐츠
본 콘텐츠는 llama.cpp Releases의 원문을 AI가 자동으로 요약·번역·분석한 것입니다. 원 저작권은 원저작자에게 있으며, 정확한 내용은 반드시 원문을 확인해 주세요.
원문 바로가기