feat: switch to Unsloth UD Q2/Q3/Q4 lineup; drop Qwen presets
Browse files- src/kpaa/llm/presets.py +26 -22
src/kpaa/llm/presets.py
CHANGED
|
@@ -21,21 +21,21 @@ class ModelPreset:
|
|
| 21 |
llama_cpp_repo: str # GGUF repo
|
| 22 |
llama_cpp_file: str # GGUF 파일명
|
| 23 |
hf_repo: str # transformers repo (ZeroGPU 용; 없으면 llama_cpp 와 동일 모델군 사용)
|
| 24 |
-
family: str # "gemma"
|
| 25 |
is_default: bool = False
|
| 26 |
|
| 27 |
|
| 28 |
-
# 후보 목록 —
|
| 29 |
-
#
|
|
|
|
|
|
|
| 30 |
PRESETS: list[ModelPreset] = [
|
| 31 |
ModelPreset(
|
| 32 |
# Unsloth Dynamic Quants 2.0 (UD-Q4_K_XL) — 평균 ~4-bit 이지만 층별로
|
| 33 |
# 중요한 부분은 더 높은 정밀도로 보존해 동일 4-bit 그룹 중 품질 최상.
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
label="Gemma 4 E2B Unsloth UD-Q4 (기본·고품질 4-bit)",
|
| 38 |
-
short="2B · Unsloth Dynamic Quants 2.0 · 4-bit 중 최상 품질",
|
| 39 |
llama_cpp_repo="unsloth/gemma-4-E2B-it-GGUF",
|
| 40 |
llama_cpp_file="gemma-4-E2B-it-UD-Q4_K_XL.gguf",
|
| 41 |
hf_repo="google/gemma-4-E2B-it",
|
|
@@ -43,22 +43,26 @@ PRESETS: list[ModelPreset] = [
|
|
| 43 |
is_default=True,
|
| 44 |
),
|
| 45 |
ModelPreset(
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
| 53 |
),
|
| 54 |
ModelPreset(
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
| 62 |
),
|
| 63 |
]
|
| 64 |
|
|
|
|
| 21 |
llama_cpp_repo: str # GGUF repo
|
| 22 |
llama_cpp_file: str # GGUF 파일명
|
| 23 |
hf_repo: str # transformers repo (ZeroGPU 용; 없으면 llama_cpp 와 동일 모델군 사용)
|
| 24 |
+
family: str # "gemma"
|
| 25 |
is_default: bool = False
|
| 26 |
|
| 27 |
|
| 28 |
+
# 후보 목록 — Unsloth Dynamic Quants 시리즈로 양자화 비트수만 다르게 비교용.
|
| 29 |
+
# 모두 같은 가중치(google/gemma-4-E2B-it) 의 GGUF 변환본. HF Space(ZeroGPU)
|
| 30 |
+
# 에서는 어떤 프리셋을 골라도 hf_repo 의 BF16 transformers 가중치를 로드하므로
|
| 31 |
+
# 동일한 답변 — 양자화별 차이는 *로컬(llama-cpp-python)* 에서만 체감됨.
|
| 32 |
PRESETS: list[ModelPreset] = [
|
| 33 |
ModelPreset(
|
| 34 |
# Unsloth Dynamic Quants 2.0 (UD-Q4_K_XL) — 평균 ~4-bit 이지만 층별로
|
| 35 |
# 중요한 부분은 더 높은 정밀도로 보존해 동일 4-bit 그룹 중 품질 최상.
|
| 36 |
+
id="gemma-4-e2b-unsloth-q4",
|
| 37 |
+
label="Gemma 4 E2B UD-Q4 (기본·균형)",
|
| 38 |
+
short="2B · ~1.7GB · 4-bit Dynamic · 권장 (속도·품질 균형)",
|
|
|
|
|
|
|
| 39 |
llama_cpp_repo="unsloth/gemma-4-E2B-it-GGUF",
|
| 40 |
llama_cpp_file="gemma-4-E2B-it-UD-Q4_K_XL.gguf",
|
| 41 |
hf_repo="google/gemma-4-E2B-it",
|
|
|
|
| 43 |
is_default=True,
|
| 44 |
),
|
| 45 |
ModelPreset(
|
| 46 |
+
# UD-Q3_K_XL — 3-bit Dynamic. 더 작은 RAM/디스크 + 더 빠른 토큰 속도,
|
| 47 |
+
# 답변 품질 약간 ↓ (한국어 비문 살짝 증가). 노트북 RAM 부족 환경 권장.
|
| 48 |
+
id="gemma-4-e2b-unsloth-q3",
|
| 49 |
+
label="Gemma 4 E2B UD-Q3 (3-bit·빠름)",
|
| 50 |
+
short="2B · ~1.3GB · 3-bit Dynamic · 메모리 ↓ 속도 ↑ 품질 살짝 ↓",
|
| 51 |
+
llama_cpp_repo="unsloth/gemma-4-E2B-it-GGUF",
|
| 52 |
+
llama_cpp_file="gemma-4-E2B-it-UD-Q3_K_XL.gguf",
|
| 53 |
+
hf_repo="google/gemma-4-E2B-it",
|
| 54 |
+
family="gemma",
|
| 55 |
),
|
| 56 |
ModelPreset(
|
| 57 |
+
# UD-Q2_K_XL — 2-bit Dynamic. 가장 작고 빠르나 품질 손실 뚜렷.
|
| 58 |
+
# 저사양 환경 실험·벤치마킹용. 일반 답변 품질은 권장 안 함.
|
| 59 |
+
id="gemma-4-e2b-unsloth-q2",
|
| 60 |
+
label="Gemma 4 E2B UD-Q2 (2-bit·실험)",
|
| 61 |
+
short="2B · ~1.0GB · 2-bit Dynamic · 가장 빠르나 품질 저하 뚜렷",
|
| 62 |
+
llama_cpp_repo="unsloth/gemma-4-E2B-it-GGUF",
|
| 63 |
+
llama_cpp_file="gemma-4-E2B-it-UD-Q2_K_XL.gguf",
|
| 64 |
+
hf_repo="google/gemma-4-E2B-it",
|
| 65 |
+
family="gemma",
|
| 66 |
),
|
| 67 |
]
|
| 68 |
|