ko-anti-cliche-gemma4-26b-a4b
A LoRA adapter for google/gemma-4-26B-A4B-it that suppresses the translationese typical of LLM-generated Korean — phrasings such as 단순히 ~가 아니라 ("not just X, but Y"), 핵심은 ~에 있다 ("the key lies in X"), and 반만 맞다 ("that's only half true") — and rewrites them into natural Korean.
What it suppresses
단순히 ~가 아닌 B — a manufactured contrast (English "not just X, but Y")
An English-style construction that props up a foil A — set up only to be knocked down — so that B sounds bigger.
단순히 통제가 아닌 비전이다 → 비전을 제시하는 능력이다
Genuine factual distinctions like GPU 문제가 아니라 드라이버 문제다 ("it's a driver issue, not a GPU issue") are natural in Korean and are left untouched.
핵심은 ~에 있다 — a "lies in" calque (English "the key lies in X")
A literal rendering of "the key lies in"; the ~에 있다 tail is the tell.
협업의 핵심은 신뢰에 있다 → 협업의 핵심은 신뢰다
반만 맞다 — an "only half true" calque (English "that's only half true")
Common in answers that judge whether a claim holds.
Training
| Base | google/gemma-4-26B-A4B-it (MoE) |
| Adapter | LoRA, r=16, α=32, dropout=0.05, target q,k,v,o (language tower) |
| Objective | 1.0·localized-DPO + 0.3·clean-anchor-CE + 0.7·token-unlikelihood |
| Data | 428 preference pairs (nabb 311 / ultimately 85 / half_right 32) |
| Schedule | β=0.3, lr 2e-5, 2 epochs |
The preference signal is localized to the scaffold span/sentence rather than the full response (full-response DPO dilutes the gradient across hundreds of tokens). Token-level unlikelihood directly lowers the probability of the scaffold tokens (excluded on factual-correction rows), and a small CE anchor on the clean continuation preserves fluency. This recipe was chosen after plain weighted-SFT and full-response DPO both underperformed.
Self-evaluation
Protocol. 1,375 synthetic "definition" prompts were generated (275 abstract nouns × 5 templates); the 1,167 on which the base model actually emitted a not-A-but-B scaffold were retained. Base and adapter were decoded through the same inference stack (HuggingFace, greedy) — vLLM cannot serve LoRA on this MoE architecture. Rows whose output appears truncated were dropped, leaving N = 1,162. Pattern detection is a regex proxy (not audit-grade); rates are reported with 95% Wilson confidence intervals.
Table 1 — Conditional removal rate (denominator = prompts where the base emits the target)
| Target pattern | n | Removed | 95% CI |
|---|---|---|---|
① 단순히/단순한 forced contrast |
1,063 | 86.6% | 84.5 – 88.6 |
② ~에 있다 lies-in calque |
13 | 100.0% | 77.2 – 100 |
Table 2 — Auxiliary measures (N = 1,162)
| Measure | Base | Adapter |
|---|---|---|
결국 frequency (token count) |
222 | 17 |
| Degenerate outputs (loop / breakage) | — | 0 (0.0%) |
| Length ratio, adapter ÷ base (median) | — | 0.93 |
| New scaffold family introduced (base-positive) | — | 0 / 1,091 |
Limitations
English and Korean differ in how paragraphs and arguments are organized (point-first vs. point-last, etc.), and a LoRA does not change that discourse structure. It does, however, reduce the most visible translationese so individual sentences read less awkwardly.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained(
"google/gemma-4-26B-A4B-it", torch_dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("google/gemma-4-26B-A4B-it")
model = PeftModel.from_pretrained(base, "sdgb-ai/ko-anti-cliche-gemma4-26b-a4b")
한국어
본 LoRA는 Gemma가 한국어를 생성할 때 나타나는 "단순히 ~가 아니라", "핵심은 ~에 있다", "반만 맞다" 같은 LLM 특유의 번역투를 억제하고, 자연스러운 한국어로 교정한다.
억제 대상
"단순히 ~가 아닌 B" — B를 강조하기 위해 깎아내릴 A를 인위적으로 만들어 내세우는 영어식 구문.
단순히 통제가 아닌 비전이다 → 비전을 제시하는 능력이다 다만 "GPU 문제가 아니라 드라이버 문제다"처럼 실제 사실을 구분하는 표현은 한국어에서도 자연스러우므로 억제하지 않음.
"핵심은 ~에 있다" — 영어 "the key lies in"의 직역. "~에 있다" 꼬리.
협업의 핵심은 신뢰에 있다 → 협업의 핵심은 신뢰다
"반만 맞다" — "that's only half true"의 직역으로, 주장을 평가하는 답변에서 자주 나타남.
학습 방법
| 베이스 | google/gemma-4-26B-A4B-it (MoE) |
| 어댑터 | LoRA, r=16, α=32, dropout=0.05, target q,k,v,o (language tower) |
| 목적함수 | 1.0·localized-DPO + 0.3·clean-anchor-CE + 0.7·token-unlikelihood |
| 데이터 | 선호쌍 428개 (nabb 311 / ultimately 85 / half_right 32) |
| 스케줄 | β=0.3, lr 2e-5, 2 epoch |
선호 신호를 응답 전체가 아니라 스캐폴드 구간(문장/스팬)에 국소화함(전체 응답 DPO는 수백 토큰에 신호가 희석됨). token-level unlikelihood로 스캐폴드 토큰 확률을 직접 하향(사실 교정 행은 제외), 작은 CE 앵커로 유창성을 유지함. weighted-SFT, full-response DPO가 부진해 이 레시피로 전환함.
자체 평가
방법. synthetic 정의형 프롬프트 1,375개(추상명사 275 × 템플릿 5) 중 base가 not-A-but-B를 실제로 생성한 1,167개를 추림. base와 adapter를 동일 추론 스택(HF greedy) 으로 디코딩(vLLM은 이 MoE에 LoRA 미지원). 잘린 출력 제외 → N = 1,162. 탐지는 정규식 proxy, 95% Wilson 신뢰구간.
표 1 — 조건부 제거율 (분모 = base가 해당 패턴을 생성한 프롬프트)
| 표적 패턴 | n | 제거 | 95% CI |
|---|---|---|---|
① 단순히/단순한 강제대조 |
1,063 | 86.6% | 84.5 – 88.6 |
② ~에 있다 lies-in 직역투 |
13 | 100.0% | 77.2 – 100 |
표 2 — 보조 지표 (N = 1,162)
| 지표 | base | adapter |
|---|---|---|
결국 빈도 (토큰 수) |
222 | 17 |
| degenerate 출력 (반복/깨짐) | — | 0 (0.0%) |
| 길이비 adapter ÷ base (중앙값) | — | 0.93 |
| 새 골격 family 도입 (base-positive) | — | 0 / 1,091 |
한계
영어와 한국어는 문단 구성·논리 전개 방식 자체가 다르지만(두괄식 vs 미괄식 등), 이 어댑터가 그 담화 구조까지 바꾸지는 못함. 다만 눈에 띄는 번역투를 줄여 문장 단위의 어색함을 완화하는 수준으로 사용할 수 있음.
LoRA r=16, q/k/v/o (language tower), 44MB. base google/gemma-4-26B-A4B-it (gemma license). Sibling adapters: ko-anti-cliche-gemma4-12b, ko-anti-cliche-gemma4-31b (planned), ko-anti-cliche-qwen3 (planned).