Instructions to use onelastkissforme/dadeum-gec-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use onelastkissforme/dadeum-gec-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="onelastkissforme/dadeum-gec-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("onelastkissforme/dadeum-gec-base") model = AutoModelForSeq2SeqLM.from_pretrained("onelastkissforme/dadeum-gec-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use onelastkissforme/dadeum-gec-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "onelastkissforme/dadeum-gec-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "onelastkissforme/dadeum-gec-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/onelastkissforme/dadeum-gec-base
- SGLang
How to use onelastkissforme/dadeum-gec-base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "onelastkissforme/dadeum-gec-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "onelastkissforme/dadeum-gec-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "onelastkissforme/dadeum-gec-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "onelastkissforme/dadeum-gec-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use onelastkissforme/dadeum-gec-base with Docker Model Runner:
docker model run hf.co/onelastkissforme/dadeum-gec-base
dadeum-gec-base
A small Korean spelling, spacing and grammar corrector that fixes only what is wrong and leaves the rest of the sentence alone. It comes from dadeum, a grammar checker that runs on the user's own Mac, and is trained only on openly licensed text: no training pair was annotated by an AI provider.
ํ๋ฆฐ ๊ณณ๋ง ๊ณ ์น๊ณ ๋๋จธ์ง๋ ๊ทธ๋๋ก ๋๋ ์์ ํ๊ตญ์ด ๋ง์ถค๋ฒ ยท ๋์ด์ฐ๊ธฐ ยท ๋ฌธ๋ฒ ๊ต์ ๋ชจ๋ธ์ ๋๋ค. ๊ธฐ๊ธฐ ์์์ ๋๋ ๋ง์ถค๋ฒ ๊ฒ์ฌ๊ธฐ ๋ค๋ฌ์์ ๋์๊ณ , ๊ณต๊ฐ ๋ผ์ด์ ์ค ๊ธ๊ณผ ์ ๋ต๋ง์ผ๋ก ํ์ตํ์ต๋๋ค(AI ๊ฐ ๋จ ์ ๋ต์ ์ฐ์ง ์์์ต๋๋ค). ์ฑ์ด ์ฐ๋ ๊ท์น ์์ง๋ณด๋ค๋ ๋ฎ๊ณ , ์๋ ๋น๊ตํ๋ ๋ค๋ฌ์ ์ ๋ฆฌํ ์ฐ๋ฆฌ ํ๊ฐ์ ์์ ์ฐ ๊ฒ์ ๋๋ค (Limitations ์ฐธ๊ณ ).
The model rewrites a sentence; each change it makes is then judged by its own
log-likelihood margin and kept only at or above the margin in gating.json,
and guards drop changes that touch non-Hangul, non-ASCII characters, add or
remove two or more characters, change a number, or jump three or more jamo to a
word absent from the open word list (known_words.bin). Use dadeum_correct.py,
which does all of this; plain generate() skips the judgement and the guards.
pip install torch transformers
python dadeum_correct.py "์ค๋์ ๋ ์จ๊ฐ ์ข์์ ์ฐ์ฑ
์ ๊ฐ๋๋ฐ ์ฌ๋์ด ๋ง์๋ค."
from dadeum_correct import Corrector
corrector = Corrector(".")
corrector.correct("ํ์๋ ๋ค์์ฃผ ํ์์ผ์ ํ๊ธฐ๋ก ํ์ด์.")
corrector.edits("...") # [(start, end, replacement), ...]
Model
BART, 6 encoder and 6 decoder layers, width 768, 123.9M parameters, started from KoBART (gogamza/kobart-base-v2).
Training data
Openly licensed text and targets only - no pair was annotated by an AI provider.
| Pairs | Source text | Target |
|---|---|---|
| Rule-engine corrections | nsmc (CC0), unlabeled kocohub comments, Korean Wikipedia and Wikinews (CC BY-SA 4.0), ์ ์ฑ ๋ธ๋ฆฌํ (KOGL Type 1) | the dadeum rule engine, with its parts fitted to AI-annotated data switched off |
| Wikipedia editors' corrections | Korean Wikipedia page history (CC BY-SA 4.0) | the editor's corrected sentence, filtered (no evaluation sentences, no content swaps, no foreign-script or number changes) |
Training steps, from the base: clean_full (legacy_clean:60, wiki_edits:7)
Evaluation
Measured against gold that AI annotators wrote (not distributed); F0.5 over character edits, touching edits merged. That gold trained nothing, but its val split chose the training checkpoint and the margin in gating.json, so the val scores are slightly optimistic.
| Measure | Value |
|---|---|
| Blind half of val (1,196 sentences), F0.5 (P / R) | .890 (.964 / .682); the dadeum rule engine: .899 (.946 / .750) |
| Development, 300 sentences, F0.5 | .918; rule engine .950 |
| In-domain test, 350, F0.5 | .904; rule engine .927 |
| Sealed domains (reviews, comments, policy, requests), 870, F0.5 | .820; rule engine .863 |
| Confirmation domains, 600, F0.5 | .803; rule engine .831 |
| News, business and comments (single annotator), 799, F0.5 | .788; rule engine .820 |
| Kor-Lang8 rebuild (learners), 2,000, F0.5 | .089; rule engine .088 |
| Correct workplace email (27 sentences and the whole email), sentences changed | 0 |
| Clean Wikipedia sentences (19,759), sentences changed | 694, 602 of them spacing only; rule engine 424 |
| CPU latency per sentence, Apple M4 Pro, 4 threads | 120 ms median, 325 ms p95 |
Next to other Korean correctors
The same sentences and scorer, F0.5. This model runs at its margin; the other open correctors as their cards say; the LLMs with the same annotation guideline in the prompt. The gold rewards minimal edits; on learners' writing (Kor-Lang8), where the reference corrections rewrite more, KoBART gec_kr leads. No public Korean leaderboard for this task was found, so this is our table, not a third-party ranking.
| System | Sealed domains (870) | Confirmation domains (600) | Kor-Lang8 (2,000) |
|---|---|---|---|
| this model (dadeum-gec-base) | .820 | .803 | .089 |
| dadeum rule engine (the app) | .863 | .831 | .088 |
| Claude Sonnet 5.5 with an annotation guideline | .895 | .887 | not run |
| Qwen3-8B | .548 | .562 | .127 |
| KoGrammar distil (theSOL1) | .481 | .435 | .107 |
| KoGrammar base (theSOL1) | .476 | .439 | .104 |
| ET5 typos corrector (j5ng) | .408 | .347 | .102 |
| KoBART gec_kr (Soyoung97) | .216 | .187 | .266 |
Limitations
- The benchmark above is ours and favours this model: its gold was written by Claude under our annotation guideline, and it rewards minimal edits, so correctors that rewrite score low on it. No human checked that gold.
- It learns from the dadeum rule engine's corrections and does not beat that engine, which the dadeum app uses. Its point is an open license and a single file that runs on a CPU.
- It is a corrector for native writing. On learners' writing corrected by people (Kor-Lang8), where the references rewrite whole phrases, it rarely changes anything and KoBART gec_kr does far better.
- It shares the rule engine's blind spots; it corrects spelling, spacing and particles far better than word choice or style.
- One sentence at a time, up to 128 tokens; longer text is split at sentence ends.
License
CC BY-SA 4.0 (LICENSE); attributions in NOTICE. dadeum_correct.py is MIT, like the dadeum repository.
- Downloads last month
- 380
Model tree for onelastkissforme/dadeum-gec-base
Base model
gogamza/kobart-base-v2