scvcoder commited on
Commit
b8a2767
·
verified ·
1 Parent(s): e183c0c

feat: switch to Unsloth UD Q2/Q3/Q4 lineup; drop Qwen presets

Browse files
Files changed (1) hide show
  1. 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" | "qwen2.5" | "qwen3"
25
  is_default: bool = False
26
 
27
 
28
- # 후보 목록 — 답변 속도 빠른 순서 (대략).
29
- # Q4_K_M 양자화 기준. 모두 instruct/chat.
 
 
30
  PRESETS: list[ModelPreset] = [
31
  ModelPreset(
32
  # Unsloth Dynamic Quants 2.0 (UD-Q4_K_XL) — 평균 ~4-bit 이지만 층별로
33
  # 중요한 부분은 더 높은 정밀도로 보존해 동일 4-bit 그룹 중 품질 최상.
34
- # 로컬(llama-cpp-python) 은 이 GGUF 를, HF Space(ZeroGPU) 는 hf_repo 의
35
- # google/gemma-4-E2B-it BF16 transformers 가중치를 로드.
36
- id="gemma-4-e2b-unsloth",
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
- id="qwen2.5-3b",
47
- label="Qwen2.5 3B Instruct (빠름·안정)",
48
- short="3B · Gemma 4 E2B 보다 약간 빠름 · 한국어 품질 양호",
49
- llama_cpp_repo="bartowski/Qwen2.5-3B-Instruct-GGUF",
50
- llama_cpp_file="Qwen2.5-3B-Instruct-Q4_K_M.gguf",
51
- hf_repo="Qwen/Qwen2.5-3B-Instruct",
52
- family="qwen2.5",
 
 
53
  ),
54
  ModelPreset(
55
- id="qwen3-4b-instruct-2507",
56
- label="Qwen3 4B Instruct 2507 (큰 모델·non-thinking)",
57
- short="4B · 더 정확하나 더 느림 · thinking off 변형",
58
- llama_cpp_repo="bartowski/Qwen_Qwen3-4B-Instruct-2507-GGUF",
59
- llama_cpp_file="Qwen_Qwen3-4B-Instruct-2507-Q4_K_M.gguf",
60
- hf_repo="Qwen/Qwen3-4B-Instruct-2507",
61
- family="qwen3",
 
 
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