Fixing Qwen4-35B-A3B's Multilingual Leakage with One LoRA

Stock48 Hanzi
이로 인해 헌법 수정 과정은 사실상 극도로 경직되었고, 국가의 변화하는 요구에 부응하는 개혁이 어렵게 되었습니다. 또한 주 주권过度强调导致联邦政府在面对全国性问题时缺乏灵活应对的能力, 例如经济危机和社会改革等领域常常陷入停滞. 이러한 구조적 한계는…
+ LoRA0 leaks
이로 인해 헌법 수정 과정은 사실상 극도로 경직되었고, 국가의 변화하는 요구에 부응하는 개혁이 어렵게 되었습니다. 또한 소수 주의 대표들이 다수의 의사를 좌우할 수 있는 구조가 형성되면서, 중앙 정부의 입법과 정책 추진에도 상당한 제약이 따르게…

1. The Problem & Why It Happens

  • Qwen practically carries the local LLM scene right now, but it has one nagging quirk: chat with it in Korean and it regularly slips stray Chinese Hanzi (具体时间), broken characters (�), and out-of-nowhere English words (뭘 kind of 기분이야?) right into the middle of a sentence.
  • Scrolling through Twitter and upstream bug reports (HF #45, Qwen4 #15), I realized this wasn't just a Korean issue—people were running into the exact same thing across Thai, Taiwanese Traditional, Japanese, Indic languages, and even German, French, Russian, Ukrainian, Greek, and Arabic: 29 global language groups (60+ languages) in total.
  • Looking inside the model, the tokenizer heavily favors Hanzi (55,328 tokens) while leaving Hangul (6,807), Thai (5,741), and Indic scripts (a few hundred each) short on both vocabulary coverage and output-layer weight magnitude.

2. Fixing It Without Training

  • Fortunately, the model already knows cleanly inside itself whether it's writing Korean, Thai, or Japanese right now. Using that signal directly, I solved for a small LoRA adapter in one closed-form Ridge regression step—no fine-tuning needed.
  • It leaves the active language's characters completely untouched and only gently nudges down foreign Hanzi, stray scripts, and out-of-place English words right before sampling. Japanese keeps all its real JIS Kanji and Taiwanese keeps its Traditional characters, blocking only Simplified-Chinese-only glyphs.
  • Since the rest of the model stays untouched and only the final output layer (output.weight) gets a tiny adjustment, inference speed doesn't drop and existing capabilities stay intact.
24 Asian language groups35+ languages
한국어Korean
日本語Japanese
繁體中文Taiwanese · Cantonese
ภาษาไทยThai
Tiếng ViệtVietnamese
BahasaIndonesian · Malay · Tagalog
မြန်မာBurmese
ភាសាខ្មែរKhmer
ພາສາລາວLao
हिन्दीHindi · Nepali · Marathi
বাংলাBengali · Assamese
தமிழ்Tamil
తెలుగుTelugu
മലയാളംMalayalam
ಕನ್ನಡKannada
ગુજરાતીGujarati
ਪੰਜਾਬੀPunjabi
ଓଡ଼ିଆOdia
සිංහලSinhala
اردو · فارسیUrdu · Persian
МонголMongolian · Kazakh · Kyrgyz
བོད་ཡིགTibetan
ქართულიGeorgian
ՀայերենArmenian
New in v2.05 EU & Middle East groups · 25+ languages
Deutsch · NLGerman · Dutch · Nordic
Français · ITFrench · Italian · Romanian
Español · PTSpanish · Portuguese
Polski · TRPolish · Czech · Turkish
Русский · UKRussian · Ukrainian +3
ΕλληνικάGreek
العربيةArabic
עבריתHebrew

3. How Well It Works

Foreign-script leak rate per prompt (lower is better) Stock UD-IQ3_S+ Multilingual-Fix LoRA
Thai · Hanzi
15/16 (93.8%)
0/16 (0.0%)
Taiwanese · Simplified
13/16 (81.3%)
0/16 (0.0%)
Korean · Hanzi (OFF)
31/45 (68.9%)
0/45 (0.0%)
Japanese · Simplified
6/15 (40.0%)
0/16 (0.0%)
Greek · Hanzi (v2)
7/20 (35.0%)
0/20 (0.0%)
24 Asian Groups · Hanzi
48/271 (17.7%)
0/269* (0.0%)
EU/ME 5 Groups · Hanzi
16/106 (15.1%)
0/107 (0.0%)
* Excludes 1 valid parenthetical gloss 황동(黄銅) in Korean
Benchmark Stock UD-IQ3_S + LoRA (v2.0) Delta
MMLU (n=300) 79.0% 78.7% -0.3% (p=1.00)
GSM8K (n=150) 98.0% 97.3% -0.7% (p=1.00)
MMLU-Pro (n=250) 82.4% 84.8% +2.4% (p=0.11)
English & code PPL (KL) 5.32 5.33 +0.17% (KL 0.0014)
Clean Korean PPL 8.18 7.77 -4.95%
Brand & tech terms in Korean 79.3% 90.0% +10.7%
Intentional Hanja & cross-script 19/20 20/20 +5.0%
Tool calling (7 langs, OFF+LOW) 48/48 48/48 0%

4. How to Use It

LPFchan/Qwen4-35B-A3B-Multilingual-Fix-LoRA 13.9 MiB · Rank-29 (v2.0) · GGUF & PEFT · Apache-2.0

llama.cpp — just pass --lora and you're good to go. You can also dial the strength (:0.8) or stack it with other LoRAs separated by commas.

llama-server -m Qwen4-35B-A3B.gguf --lora qwen4-35b-a3b-multilingual-fix.gguf

transformers / vLLM — load the repo's peft/ folder directly as a standard PEFT adapter.

model = PeftModel.from_pretrained(
    base,
    "LPFchan/Qwen4-35B-A3B-Multilingual-Fix-LoRA",
    subfolder="peft",
)