Tegami-27B ยท Japanese Business-Email LoRA

ๆ‰‹็ด™ (tegami) โ€” a letter. A QLoRA adapter for Qwen/Qwen3.8-27B that writes Japanese business email the way a Japanese office actually writes it: correct keigo (ๆ•ฌ่ชž), a proper address block (ๅฎ›ๅ), the internal-vs-external register split, ~30-full-width-character line wrapping, and a real signature (็ฝฒๅ) โ€” and it does not turn into a keigo firehose when you only wanted a casual message.

You can prompt it in English or Japanese; the output is Japanese business correspondence.

What makes this release different: it ships with the mechanical evaluation harness that produced every number below โ€” no LLM judge, no vibes. Three axes, one script, regex/parse-level 0/1 checks (double-keigo, address form, register mismatch, line width, markdown contamination). Point it at the base model and reproduce the delta yourself.


TL;DR

Two held-out test sets, greedy decoding, scored by eval/jp_bizmail_check.py.

Axis What it checks Base Qwen3.8-27B + Tegami LoRA
Positive โ€” in-distribution keigo + email format correct 0.0% 95.3%
Positive โ€” novel scenarios same, on held-out scenes it never saw 0.0% 88.2%
Negative (veto) a casual message is not over-formalized 80โ€“100% 100%
Preservation general Q&A / reasoning still works 100% 100%

In-distribution = eval_probes (70), eval_disjoint: scenes and identity pools disjoint from training. Novel scenarios = wild2_probes (24), a second held-out set disjoint from training, eval, and the first held-out set. The base model writes fluent Japanese โ€” it just doesn't write it as email (markdown, preamble, missing ไปถๅ/ๅฎ›ๅ/็ฝฒๅ, mixed register), which is exactly the gap this adapter closes. Proofreading (M-rev), the hardest sub-task, goes from 0/8 to 8/8 in-distribution.


Why the "Negative" axis is the headline

Most style LoRAs quietly fail here. If you train a model to love keigo, it starts sprinkling ใ€ŒใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€ onto a text to your friend. Tegami is trained against that with a dedicated negative axis โ€” a casual message that comes back over-formalized is a failure, not a success โ€” and it holds at 100%. Measuring this at all is the differentiator.


English-prompt demos (base vs. + LoRA)

Same English instruction, same greedy decoding. Left is the raw base; right is with the adapter.

Prompt (English): Write a business email in Japanese. We delivered sensor units to a client but shipped the wrong quantity. Apologize, explain the correct shipment will arrive on October 15th, and ask for their understanding.

Base Qwen3.8-27B+ Tegami LoRA
ไปถๅ๏ผšใ€้‡่ฆใ€‘ใ‚ปใƒณใ‚ตใƒผใƒฆใƒ‹ใƒƒใƒˆใฎ็ดๅ“ๆ•ฐ้‡ใซ้–ขใ™ใ‚‹ใŠ่ฉซใณใจไฟฎๆญฃๅ‡บ่ทใฎใ”้€ฃ็ตก

ๆ ชๅผไผš็คพ[ใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆๅ] [้ƒจ็ฝฒๅ] [ๆ‹…ๅฝ“่€…ๅ] ๆง˜

ใ„ใคใ‚‚ๅคงๅค‰ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ [่‡ช็คพๅ]ใฎ[่‡ชๅˆ†ใฎๅๅ‰]ใงใ™ใ€‚

ใ“ใฎๅบฆใฏใ€ๅ…ˆๆ—ฅ็ดๅ“ใ„ใŸใ—ใพใ—ใŸใ‚ปใƒณใ‚ตใƒผใƒฆใƒ‹ใƒƒใƒˆใซใคใใพใ—ใฆใ€ๅ‡บ่ทๆ•ฐ้‡ใซ่ชคใ‚ŠใŒใ”ใ–ใ„ใพใ—ใŸใ“ใจใ‚’ใ€ๆทฑใใŠ่ฉซใณ็”ณใ—ไธŠใ’ใพใ™ใ€‚

ๆœฌๆฅ็ดๅ“ใ™ในใๆ•ฐ้‡ใจ็•ฐใชใ‚‹ๆ•ฐ้‡ใงใŠๅฑŠใ‘ใ—ใฆใ—ใพใ„ใ€่ฒด็คพใฎใ”ๆฅญๅ‹™ใซๅคšๅคงใชใ‚‹ใ”่ฟทๆƒ‘ใ‚’ใŠใ‹ใ‘ใ—ใพใ—ใŸใ“ใจใ€้‡ใญใฆใŠ่ฉซใณ็”ณใ—ไธŠใ’ใพใ™ใ€‚

็พๅœจใ€ๆญฃใ—ใ„ๆ•ฐ้‡ใฎ่ฃฝๅ“ใ‚’ๅ†ๅ‡บ่ทใฎๆ‰‹็ถšใใ‚’้€ฒใ‚ใฆใŠใ‚Šใพใ™ใ€‚ ไฟฎๆญฃๅพŒใฎ่ฃฝๅ“ใฏใ€10ๆœˆ15ๆ—ฅ๏ผˆๆฐด๏ผ‰ใซ่ฒด็คพใธๅˆฐ็€ใ™ใ‚‹ไบˆๅฎšใงใ™ใ€‚

ใคใใพใ—ใฆใฏใ€ๅˆฐ็€ใพใงๆšซๅฎš็š„ใชๅฏพๅฟœใ‚’ใŠ้ก˜ใ„ใ™ใ‚‹็ญ‰ใ€ใ”ไธไพฟใ‚’ใŠใ‹ใ‘ใ„ใŸใ—ใพใ™ใŒใ€ไฝ•ๅ’ใ”็†่งฃใจใ”ๅ”ๅŠ›ใ‚’่ณœใ‚Šใพใ™ใ‚ˆใ†ใŠ้ก˜ใ„็”ณใ—ไธŠใ’ใพใ™ใ€‚

ใ”ไธๆ˜Žใช็‚นใ‚„ใ”่ณชๅ•ใŒใ”ใ–ใ„ใพใ—ใŸใ‚‰ใ€ไธ‹่จ˜้€ฃ็ตกๅ…ˆใพใงใŠๆฐ—่ปฝใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚

ไปŠๅพŒใจใ‚‚ใ€ใ‚ˆใ‚Šไธ€ๅฑคใฎๅ“่ณช็ฎก็†ใซๅŠชใ‚ใฆใพใ„ใ‚Šใพใ™ใฎใงใ€ๅค‰ใ‚ใ‚‰ใฌใ”ๆ„›้กงใ‚’่ณœใ‚Šใพใ™ใ‚ˆใ†ใŠ้ก˜ใ„็”ณใ—ไธŠใ’ใพใ™ใ€‚


[่‡ช็คพๅ] [้ƒจ็ฝฒๅ] [่‡ชๅˆ†ใฎๅๅ‰] TEL: [้›ป่ฉฑ็•ชๅท] Email: [ใƒกใƒผใƒซใ‚ขใƒ‰ใƒฌใ‚น] --------------------------------------------------

ไปถๅ๏ผšใ‚ปใƒณใ‚ตใƒผ้ƒจๅ“ ็ดๅ“ๆ•ฐ้‡่ชคใ‚ŠใฎใŠ่ฉซใณใจใ”ๅฏพๅฟœใซใคใ„ใฆ

ๆ ชๅผไผš็คพๅคงๅ’Œ็‰ฉๆต ่ณผ่ฒท้ƒจ ็”ฐไธญๆง˜

ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ ๆ˜Žๅ’Œใ‚ทใ‚นใƒ†ใƒ ๆ ชๅผไผš็คพใฎ่—คไบ•ใงใ”ใ–ใ„ใพใ™ใ€‚

ใ“ใฎใŸใณใฏใ‚ปใƒณใ‚ตใƒผ้ƒจๅ“ใฎ็ดๅ“ๆ•ฐ้‡ใซ่ชคใ‚ŠใŒ ใ”ใ–ใ„ใพใ—ใŸใ“ใจใ€่ช ใซ็”ณใ—่จณใ”ใ–ใ„ใพใ›ใ‚“ใ€‚

็ขบ่ชใ„ใŸใ—ใพใ—ใŸใจใ“ใ‚ใ€ๅผŠ็คพๅดใฎๆคœๅ“ใƒŸใ‚นใซใ‚ˆใ‚Šใ€ ๆณจๆ–‡ๆ•ฐ้‡ใ‚ˆใ‚Š5ๆœฌๅฐ‘ใชใ„็Šถๆ…‹ใงใŠๅฑŠใ‘ใ—ใฆ ใŠใ‚Šใพใ—ใŸใ€‚

ๆญฃใ—ใ„ๆ•ฐ้‡ใฎ่ฃฝๅ“ใฏ10ๆœˆ15ๆ—ฅใซใ”ๅˆฐ็€ใฎไบˆๅฎšใงใ™ใ€‚ ๅˆฐ็€ๅพŒใ€้€Ÿใ‚„ใ‹ใซๅผŠ็คพใซใฆๆคœๅ“ใ„ใŸใ—ใพใ™ใ€‚

ใ”่ฟทๆƒ‘ใ‚’ใŠใ‹ใ‘ใ—ใ€่ช ใซ็”ณใ—่จณใ”ใ–ใ„ใพใ›ใ‚“ใ€‚ ไฝ•ๅ’ใ‚ˆใ‚ใ—ใใŠ้ก˜ใ„็”ณใ—ไธŠใ’ใพใ™ใ€‚


ๆ˜Žๅ’Œใ‚ทใ‚นใƒ†ใƒ ๆ ชๅผไผš็คพ ็ทๅ‹™้ƒจ ่—คไบ• TEL: 03-XXXX-XXXX Mail: xxx@example.co.jp ------------------------------


Prompt (English): Write a Japanese internal email to my manager reporting that a client requested moving up a delivery deadline, and asking for a decision.

Base Qwen3.8-27B+ Tegami LoRA
ไปถๅ๏ผšใ€ใ”็›ธ่ซ‡ใ€‘โ—‹โ—‹ๆง˜ๅ‘ใ‘็ดๆœŸๅ‰ๅ€’ใ—ใฎๅฏๅฆใซใคใ„ใฆ

โ—‹โ—‹้ƒจ้•ท

ใŠ็–ฒใ‚Œๆง˜ใงใ™ใ€‚โ–ณโ–ณใงใ™ใ€‚

ใ“ใฎๅบฆใฏใ€โ—‹โ—‹ๆง˜ใ‚ˆใ‚Š็ดๆœŸๅ‰ๅ€’ใ—ใฎใ”ไพ้ ผใ‚’ใ„ใŸใ ใใ€ใ”็›ธ่ซ‡ใ•ใ›ใฆใใ ใ•ใ„ใ€‚

็พๅœจ้€ฒ่กŒไธญใฎใ€Œใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆๅใ€ใซใคใ„ใฆใ€โ—‹โ—‹ๆง˜ๅดใง็คพๅ†…ใ‚นใ‚ฑใ‚ธใƒฅใƒผใƒซใฎ้ƒฝๅˆใซใ‚ˆใ‚Šใ€ๅฝ“ๅˆไบˆๅฎšใฎใ€202XๅนดXๆœˆXๆ—ฅใ€‘ใ‹ใ‚‰ใ€202XๅนดXๆœˆXๆ—ฅใ€‘ใธๅ‰ๅ€’ใ—ใฎใ”ๅธŒๆœ›ใ‚’ใ„ใŸใ ใ„ใฆใŠใ‚Šใพใ™ใ€‚

ใคใใพใ—ใฆใฏใ€ไปฅไธ‹ใฎ็‚นใซใคใ„ใฆใ”ๅˆคๆ–ญใ„ใŸใ ใใŸใใ€ใ”้€ฃ็ตกใ„ใŸใ—ใพใ—ใŸใ€‚

  1. ๅฏพๅฟœๅฏๅฆ๏ผš็พๅœจใฎ้€ฒๆ—็ŠถๆณใŠใ‚ˆใณใƒชใ‚ฝใƒผใ‚นใ‚’่€ƒๆ…ฎใ—ใŸๅ ดๅˆใ€ๅ‰ๅ€’ใ—ๅฏพๅฟœใŒๅฏ่ƒฝใ‹
  2. ่ฟฝๅŠ ใ‚ณใ‚นใƒˆ/ๅทฅๆ•ฐ๏ผšๅฏพๅฟœใซไผดใ†่ฟฝๅŠ ่ฒป็”จใ‚„ใ€ไป–ๆกˆไปถใธใฎๅฝฑ้Ÿฟใซใคใ„ใฆ
  3. ใŠๅฎขๆง˜ใธใฎๅ›ž็ญ”ๆ–น้‡๏ผšๅฏ่ƒฝใงใ‚ใ‚Œใฐๅ‰ๅ€’ใ—ใงๅฏพๅฟœใ€ๅ›ฐ้›ฃใงใ‚ใ‚Œใฐ็พ็Šถ็ถญๆŒใงไบคๆธ‰ใ™ใ‚‹ใ€ใชใฉ

่ฉณ็ดฐใชใ‚นใ‚ฑใ‚ธใƒฅใƒผใƒซๆกˆใ‚„ๅฝฑ้Ÿฟ็ฏ„ๅ›ฒใซใคใ„ใฆใฏใ€ๅˆฅ้€”่ณ‡ๆ–™ใ‚’ๅ…ฑๆœ‰ใ„ใŸใ—ใพใ™ใ€‚ ใ”ๅคšๅฟ™ใฎใจใ“ใ‚ๆใ‚Œๅ…ฅใ‚Šใพใ™ใŒใ€ใ”ๅˆคๆ–ญใ„ใŸใ ใ‘ใพใ™ใจๅนธใ„ใงใ™ใ€‚

ใ‚ˆใ‚ใ—ใใŠ้ก˜ใ„ใ„ใŸใ—ใพใ™ใ€‚

โ–ณโ–ณ ๅคช้ƒŽ ้ƒจ็ฝฒๅ ้›ป่ฉฑ็•ชๅท

ไปถๅ๏ผšใ€ใ”็›ธ่ซ‡ใ€‘ๆ ชๅผไผš็คพใ‚ตใƒณใƒฉใ‚คใ‚บ้ฃŸๅ“ใ‹ใ‚‰ใฎ็ดๆœŸๅ‰ๅ€’ใ—ใฎ่ฆ่ซ‹ใซใคใ„ใฆ

ๅฒกๆœฌ้ƒจ้•ท

ใŠ็–ฒใ‚Œๆง˜ใงใ™ใ€‚้–‹็™บ้ƒจใฎ่—คไบ•ใงใ™ใ€‚

ๆ ชๅผไผš็คพใ‚ตใƒณใƒฉใ‚คใ‚บ้ฃŸๅ“ใ‚ˆใ‚Šใ€10ๆœˆ1ๆ—ฅ็ดๅ“ไบˆๅฎšใฎๆฅญๅ‹™็”จใ‚ปใƒณใ‚ตใƒผ AX-200ใซใคใ„ใฆใ€ ็ดๆœŸใ‚’9ๆœˆ17ๆ—ฅใธๅ‰ๅ€’ใ—ใ—ใŸใ„ใจใฎ่ฆ่ซ‹ใŒใ‚ใ‚Šใพใ—ใŸใ€‚

ๅ—ใ‘ใ‚‹ๅ ดๅˆใ€่ฃฝ้€ ใƒฉใ‚คใƒณใฎๆฎ‹ๆฅญใŒ้€ฑใ‚ใŸใ‚Š10ๆ™‚้–“็จ‹ๅบฆๅข—ใˆใ‚‹่ฆ‹่พผใฟใงใ™ใ€‚ ๅ—ใ‘ใ‚‹๏ผๆ–ญใ‚‹ใฎๅˆคๆ–ญใ‚’ใŠ้ก˜ใ„ใงใใพใ™ใงใ—ใ‚‡ใ†ใ‹ใ€‚

ๅ›ž็ญ”ๆœŸ้™ใฏ9ๆœˆ17ๆ—ฅใงใ™ใ€‚

ใ‚ˆใ‚ใ—ใใŠ้ก˜ใ„ใ—ใพใ™ใ€‚

้–‹็™บ้ƒจ ่—คไบ•


Prompt (English): The following Japanese email to a client has keigo mistakes. Point them out and give a corrected version.

ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ ใ”้€ไป˜ใ„ใŸใ ใ„ใŸ่ณ‡ๆ–™ใ‚’ๆ‹่ฆ‹ใ•ใ›ใฆใ„ใŸใ ใใพใ—ใŸใ€‚ ใŠไผบใ„ใ•ใ›ใฆใ„ใŸใ ใใŸใ„ใ“ใจใŒใ”ใ–ใ„ใพใ™ใ€‚

Base Qwen3.8-27B+ Tegami LoRA
This email contains a common but significant error in Japanese business etiquette (keigo) regarding the use of **double honorifics (ไบŒ้‡ๆ•ฌ่ชž, niju keigo)**.

The Mistake

Problem: The phrase "ใŠไผบใ„ใ•ใ›ใฆใ„ใŸใ ใใŸใ„" is a double honorific.

  • ไผบใ† (ukagau) is already a humble form (kenjลgo) of "to ask" or "to inquire." It means "to ask (you, the superior) something."
  • ใ•ใ›ใฆใ„ใŸใ ใ (sasete itadaku) is a humble expression meaning "to be allowed to do something" or "to do something with your permission."
  • Combining them ("to be allowed to ask you") is redundant and considered grammatically incorrect and overly obsequious in standard business Japanese. Itโ€™s like saying "I would like to be allowed to ask you" when "I would like to ask you" is sufficient and polite.

Why itโ€™s wrong

In Japanese keigo, you should not stack two humble forms for the same action. Since ukagau is already humble, you donโ€™t need sasete itadaku to make it more polite. In fact, using double honorifics can sometimes come across as unnatural or even slightly awkward to native speakers.

Corrected Version

Here are two natural and correct ways to phrase the last sentence, depending on the nuance you want:

Option 1: Most Common & Natural (Recommended)

> ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ > ใ”้€ไป˜ใ„ใŸใ ใ„ใŸ่ณ‡ๆ–™ใ‚’ๆ‹่ฆ‹ใ„ใŸใ—ใพใ—ใŸใ€‚ > ใŠไผบใ„ใ—ใŸใ„ใ“ใจใŒใ”ใ–ใ„ใพใ™ใ€‚

  • Explanation: "I have something I would like to ask you." This is clean, polite, and standard.
  • Note: I also changed "ๆ‹่ฆ‹ใ•ใ›ใฆใ„ใŸใ ใใพใ—ใŸ" to "ๆ‹่ฆ‹ใ„ใŸใ—ใพใ—ใŸ" for consistency and conciseness, though your original was not strictly wrong. "ๆ‹่ฆ‹ใ„ใŸใ—ใพใ—ใŸ" is slightly more direct and common in modern business emails.

Option 2: Slightly More Formal/Soft

> ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ > ใ”้€ไป˜ใ„ใŸใ ใ„ใŸ่ณ‡ๆ–™ใ‚’ๆ‹่ฆ‹ใ„ใŸใ—ใพใ—ใŸใ€‚ > ใ”่ณชๅ•ใŒใ”ใ–ใ„ใพใ™ใฎใงใ€ใŠไผบใ„ใ—ใŸใๅญ˜ใ˜ใพใ™ใ€‚

  • Explanation: "I have a question, and I would like to inquire about it." This uses "ๅญ˜ใ˜ใพใ™" (a humble form of "think") to soften the request.

Option 3: If you want to keep the "permission" nuance (but correctly)

> ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ โ€ฆ(truncated)

## ่ชคใ‚ŠใฎๆŒ‡ๆ‘˜

  1. ใ€Œๆ‹่ฆ‹ใ•ใ›ใฆใ„ใŸใ ใใพใ—ใŸใ€โ†’ ไบŒ้‡ๆ•ฌ่ชž ใ€€ใ€Œๆ‹่ฆ‹ใ™ใ‚‹ใ€ใŒใ™ใงใซ่ฌ™่ญฒ่ชžใงใ™ใ€‚ใ€Œใ•ใ›ใฆใ„ใŸใ ใใ€ใ‚’้‡ใญใ‚‹ใจไบŒ้‡ๆ•ฌ่ชžใซใชใ‚Šใพใ™ใ€‚ใ€Œๆ‹่ฆ‹ใ—ใพใ—ใŸใ€ใงๅๅˆ†ใงใ™ใ€‚

  2. ใ€ŒใŠไผบใ„ใ•ใ›ใฆใ„ใŸใ ใใŸใ„ใ€โ†’ ไบŒ้‡ๆ•ฌ่ชž ใ€€ใ€ŒใŠไผบใ„ใ™ใ‚‹ใ€ใ‚‚่ฌ™่ญฒ่ชžใงใ™ใ€‚ๅŒใ˜ใใ€Œใ•ใ›ใฆใ„ใŸใ ใใ€ใ‚’้‡ใญใฆใฏใ„ใ‘ใพใ›ใ‚“ใ€‚ใ€ŒใŠไผบใ„ใ—ใŸใ„ใ€ใซ็›ดใ—ใพใ™ใ€‚

ไฟฎๆญฃๅพŒ

ใ„ใคใ‚‚ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™ใ€‚ ๆ ชๅผไผš็คพใ‚ตใ‚ฏใƒฉใƒ†ใƒƒใ‚ฏใฎๆฑ ็”ฐใงใ”ใ–ใ„ใพใ™ใ€‚

ใ”้€ไป˜ใ„ใŸใ ใ„ใŸ่ณ‡ๆ–™ใ‚’ๆ‹่ฆ‹ใ—ใพใ—ใŸใ€‚ ใŠไผบใ„ใ—ใŸใ„ใ“ใจใŒใ”ใ–ใ„ใพใ™ใ€‚


โš ๏ธ Read this before downloading a GGUF

The adapter's delta is small (r=16). Baking it into bf16 weights and then quantizing to 4-bit washes out the most memory-intensive formats first. Measured honestly on the sibling v1 adapter (identical r=16 and pipeline; the effect is general and applies to this release too):

Serving path Positive M-rev (proofreading โ€” the hardest task)
transformers (NF4 + adapter) 91.9% 6 / 7
merged โ†’ bf16 โ†’ transformers 91.9% 4 / 7
merged โ†’ GGUF IQ4_XS 81.1% 1 / 7
merged โ†’ GGUF Q4_K_M 64.9% 0 / 7

The merge step is lossless; the 4-bit GGUF quantization is what costs you. If you serve via llama.cpp, use a higher-bit quant (Q6_K / Q8_0) or an imatrix quant calibrated on business-mail text โ€” the calibration corpus and the build script are in quant/. Do not judge the adapter by a Q4_K_M GGUF; that is the worst-case path.


Usage

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

base = "Qwen/Qwen3.8-27B"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "<this-repo>")

msg = [{"role": "user", "content":
        "Write a Japanese business email to Mr. Tanaka at Aoki Trading, "
        "proposing three candidate dates for a meeting about the new inventory system."}]
ids = tok.apply_chat_template(msg, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=700, do_sample=False)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))

Loading note: the base is a multimodal-capable architecture. Loading it with plain AutoModelForCausalLM can silently drop the text decoder on some builds; verify the adapter actually changes logits (max|ฮ”logit| > 0) before trusting an evaluation. The eval script in eval/ does this check for you.


What it handles

  • ๅฐŠๆ•ฌ่ชž / ่ฌ™่ญฒ่ชž / ไธๅฏง่ชž distinctions; detects and avoids double keigo (ไบŒ้‡ๆ•ฌ่ชž, e.g. ใ€ŒใŠไผบใ„ใ•ใ›ใฆใ„ใŸใ ใใ€).
  • Internal (ใŠ็–ฒใ‚Œๆง˜ใงใ™) vs. external (ใŠไธ–่ฉฑใซใชใฃใฆใŠใ‚Šใพใ™) greeting register.
  • Address forms: ใ€Œๆง˜ใ€ for individuals, ใ€Œๅพกไธญใ€ for organizations, ใ€Œๅ„ไฝใ€ for groups, and a job title as its own honorific (ใ€Œ็”ฐไธญ้ƒจ้•ทใ€, not ใ€Œ็”ฐไธญ้ƒจ้•ทๆง˜ใ€).
  • Structure: ไปถๅ โ†’ ๅฎ›ๅ โ†’ greeting โ†’ body โ†’ closing โ†’ signature; ~30-zenkaku line wrap; no markdown in the mail body.
  • Proofreading (ๆทปๅ‰Š): quotes the wrong form, explains why, gives the corrected version.

Fixed in this release: when the prompt does not supply the recipient's name, the v1 adapter dropped the address line instead of falling back to ใ€Œใ”ๆ‹…ๅฝ“่€…ๆง˜ใ€/ใ€Œๅ„ไฝใ€. Adding seeds for exactly that case raised the held-out positive score from 58.8% โ†’ 88.2% (see notes/ for the full before/after). The residual failures are a handful of missing address lines in the hardest name-absent cases โ€” the direction is right, the coverage isn't yet complete.


How it was built, and why it's synthetic

There is no license-clean corpus of real Japanese business email, and structurally there never will be โ€” real business mail is confidential. So the data is generated from a spec:

  1. Hand-written seeds carry the pragmatics (่ชž็”จ).
  2. A generator separates the reusable skeleton from surface identity โ€” companies, names, dates are placeholders drawn from disjoint pools for train vs. eval.
  3. A curated phrasebook supplies idiomatic set-phrases.
  4. A mechanical checker gates every generated sample.

No machine-translated Japanese โ€” translationese is the exact failure mode this project avoids. The seeds, generator, phrasebook, and checker are all in this repo (corpus/, eval/), so you can inspect, audit, and extend the data โ€” not just consume it.

Method QLoRA (4-bit NF4), loss masked to assistant turns only
Rank r = 16 / alpha = 32 โ€” deliberately small; style/format transfer is low-complexity, and low-data + high-rank memorizes templates
Targets all attention + MLP linears (auto), verified no adapter on vision/audio towers
Selection by the mechanical gate, not eval_loss (eval_loss rose while the gate stayed high)
Hardware single RTX 3090 Ti (24 GB)

Reproduce it

# Self-check the seed corpus (expect 0 high-severity findings)
python eval/jp_bizmail_check.py --ds-dir corpus

# Base vs. adapter, one base load, adapters swapped on top
python eval/eval_jpmail_hf.py --base Qwen/Qwen3.8-27B \
    --adapters base=NONE tegami=<this-repo> \
    --probes corpus/wild2_probes.jsonl --max-new-tokens 700

Repository layout

adapter_config.json, adapter_model.safetensors   the LoRA
corpus/     seeds, generator, phrasebook, keigo-NG table, held-out probes
eval/       jp_bizmail_check.py (the checker) + eval / rescore / compare scripts
quant/      imatrix calibration corpus + build script for domain-calibrated GGUF
notes/      design note + full run log (the numbers, and how they were isolated)
demos/      showcase.html โ€” visual before/after

License

Apache-2.0, matching the base Qwen/Qwen3.8-27B. The adapter, corpus, generator, and evaluation harness are released together.

Not affiliated with the Qwen team; "Tegami" is a nickname for this adapter, not a product of the base-model authors.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for alfaplus/tegami-27B-qw38

Base model

Qwen/Qwen3.8-27B
Adapter
(56)
this model