Share this article:

This post follows up on the Building AI for Korean Education and Public Services series. It pairs with the admin tool-calling adapter built on the same 1.7B base.

Teachers write a lot of documents: home notices, parent counseling schedules, budget approval requests.

The request usually arrives in messenger style, something like “Field trip notice for grade 3 next Wednesday, fee twelve thousand won, replies due Friday.” Give that sentence to a language model and ask for the whole document, and you get plausible prose, but dates shift, amounts lose a digit, or content that was never in the request slips in.

So we split the work. The model extracts only the field values of the document form as JSON, and a deterministic engine writes the document file (.hwpx). ThakiEdu-Document-1.7B-v0.1, a LoRA adapter trained on Qwen3-1.7B, reaches fact preservation 0.985 and number accuracy 0.9971 on 229 held-out items, non-inferior to the in-house 27B teacher model (0.990, 1.0).

All training and evaluation requests are synthetic, though, and we did not verify opening the generated files in Hancom Office (Hangul). This post covers the method, the results, and how far the numbers can be trusted.

Model: ThakiCloud/ThakiEdu-Document-1.7B-v0.1 · Collection: ThakiEdu

ThakiEdu-Document-1.7B title card

The model extracts field values, the engine writes the file

Eight document types are supported: home notice (field trip), parent counseling schedule, after-school program application, staff business trip report, budget execution request, school steering committee minutes summary, facility repair request letter, and student award recommendation. Each type has a fixed schema, and the model returns one JSON object with those schema keys.

Conventional generation and field extraction compared When a language model writes the whole document, numbers and dates are buried in prose and hard to check. With field extraction, only the values come back as JSON, get validated, and then the engine builds the document.

The model does not compute dates. It copies expressions like “next Wednesday” as written, and application code turns them into ISO dates from a reference date. Taking calendar arithmetic out of the model removes one place where it can be wrong.

The document file is produced by the examples/document/thaki_hwpx/ engine in the same repository, which is Apache-2.0 and uses only the Python standard library.

Request to field JSON example A request written for illustration. The output shows the format only and is not an evaluation item.

Trained on 1,660 rows of perfect-score answers from a 27B teacher

Training data came from the outputs of an in-house Qwen3.8-27B (NVFP4) teacher, keeping only those with a perfect score (rejection sampling).

A perfect score means every field value and number is right, there are zero unsupported values and zero side details not in the request, and dates are kept as written. The requests themselves are synthetic sentences written from in-house templates and by the same 27B model. No AI Hub data was used.

There are 1,660 training rows. LoRA r=16, α=32, dropout 0.05 on all linear modules, learning rate 2e-4, effective batch 16, 300 steps, seed 20261130. It took 331 seconds on one GPU. Reasoning mode was off for both training and evaluation (enable_thinking=False).

Non-inferior to the 27B teacher on 229 held-out items

The evaluation criteria were pre-registered before training. The same scorer was applied to three models on 229 held-out items. Fact preservation (fact_preserve) checks whether the facts in the request land in the right output fields, and number accuracy (num_acc) checks numbers such as amounts and headcounts.

Metric Bar This model 27B teacher Base before training
render_ok (minimal HWPX check) ≥ 0.99 1.0 1.0 1.0
Fact preservation ≥ 0.95 0.985 0.990 0.851
Number accuracy ≥ 0.98 0.9971 1.0 0.768
Unsupported field rate ≤ 0.02 0.0 0.0 0.0189
Side-detail leak item rate ≤ 0.05 0.0 0.0 0.0786

Held-out fact preservation and number accuracy bar chart The base before training had number accuracy 0.768; the trained 1.7B adapter reaches 0.9971, close to the 27B teacher (1.0).

The per-item mean of (model − teacher) fact preservation is −0.0049, with a paired 95% confidence interval of [−0.0122, 0.0017]. The pre-registered non-inferiority bar was a lower bound of at least −0.03, and it passed. The 1.7B adapter is slightly below the teacher, but within the margin set in advance.

After fixing the checkpoint, we measured again across seeds and request structures

The released checkpoint was fixed at seed 20261130 before seeing results. We then pre-registered a separate confirmation evaluation, with the condition that the checkpoint would not change even if extra seeds scored better.

First, on the same held-out set, fact preservation for three seeds was 0.985, 0.98 and 0.9882. Next, we built an independent set S2 of 240 items from four request structures not seen in training: bulleted official letters, tables, emails and minutes excerpts.

S2 metric (240 items) Bar Seed 20261130 (released) 20261201 20261202
render_ok ≥ 0.99 1.0 1.0 1.0
Fact preservation ≥ 0.95 0.9831 0.9819 0.9836
Number accuracy ≥ 0.98 0.9917 0.9868 0.991
Unsupported field rate ≤ 0.02 0.0013 0.0006 0.0013
Side-detail leak item rate ≤ 0.05 0.0042 0.0042 0.0042

On S2, the released checkpoint minus the teacher in fact preservation averaged +0.0032, with a 95% confidence interval of [−0.0046, 0.0109]. The spread of fact preservation across seeds was 0.0082 on held-out and 0.0017 on S2, within the bar of 0.03.

Finally, using only the public package files and the base model, with no repository code, five examples ran in a fresh container and all passed JSON parsing, schema validation and the .hwpx structure check. All seven confirmation gates passed, and the verdict is DOC17_RELEASE_OK.

How far to trust these numbers

Every number comes from synthetic requests. Generalization to real education office or school requests was not measured. Forms that differ by region or school are not supported.

Some conditions favor the teacher. S2 requests and teacher outputs came from the same 27B model.

render_ok is not a Hancom Office compatibility metric. It only checks that the model output passed a minimal HWPX structure check. We did not verify opening the generated .hwpx files in Hancom Office (Hangul) on real machines.

Student award recommendations are the weakest type. On held-out, text fact preservation for award recommendations was 0.9355. There was only one award row in the training data. Additional training for award recommendations is a separate follow-up version and is not in this checkpoint.

Schema validation checks format only. Whether values match the request is for the caller to check. Documents outside the eight types and fields outside the schema are not produced.

Release package and verification

The public repository (Apache-2.0) contains the LoRA adapter, the adapter config, the model card, examples (infer_peft_hwpx.py, infer_cases5.py), the HWPX engine and a per-file sha256 list. The base is Qwen/Qwen3-1.7B at revision 70d244cc, used as-is. Training data, evaluation items and prediction files are not included.

After publishing, we downloaded the repository anonymously in a fresh environment with no credentials. The adapter sha256 matched the recorded value, and the base weight shards were the same files as the public revision.

The five illustrative requests in infer_cases5.py (home notice, counseling schedule, after-school application, budget request, facility repair letter) all passed JSON parsing, schema validation and the .hwpx structure check. These five are a smoke check, not a performance metric.

Closing

ThakiEdu-Document-1.7B does not write documents itself. It extracts field values only, and at 1.7B it is non-inferior to the 27B teacher with held-out fact preservation of 0.985. ThakiCloud is evaluating this design as a document-drafting assistant that runs inside the school.

The remaining work is evaluation on real requests, checking files in Hancom Office on real machines, and strengthening award recommendations. If you try it, start by feeding a few request sentences from your own school to infer_cases5.py and checking whether the JSON values match the requests.

Data sources and terms of use

Share this article:

Tags: education, hwpx, information-extraction, korean, lora, research-preview, small-language-model

Categories:

Updated: