LLM-OS-Models/LFM2.5-8B-A1B-KO-SFT
LFM2.5-8B-A1B-KO-SFT
Korean full-parameter SFT continuation of LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL, based on LiquidAI/LFM2.5-8B-A1B.
- GitHub: <https://github.com/gyunggyung/LFM25-KO-SFT>
- CPT GitHub: <https://github.com/gyunggyung/LFM25-KO-CPT>
- CPT base checkpoint: <https://huggingface.co/LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL>
- Agentic follow-up repo: <https://huggingface.co/LLM-OS-Models/LFM2.5-8B-A1B-KO-Agentic-SFT>
- Public data releases: 14 Hugging Face dataset repos are published with
README.md,dataset_manifest.json, and uploadeddata/files. Combined uploaded size is about 79.94GB, including duplicate raw/tokenized releases. - Korean section: 한국어 설명
- Base model: <https://huggingface.co/LiquidAI/LFM2.5-8B-A1B>
- Liquid prompting docs: <https://docs.liquid.ai/lfm/key-concepts/text-generation-and-prompting>
- Liquid chat template docs: <https://docs.liquid.ai/lfm/key-concepts/chat-template>
- Liquid tool-use docs: <https://docs.liquid.ai/lfm/key-concepts/tool-use>
Status
Important result: this Stage2 KO-SFT checkpoint is not an improvement over KO-CPT on the selected public benchmark matrix. It is published for reproducibility and failure analysis, not as the recommended checkpoint over LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL.
Final closeout on 2026-06-30: the later Agentic/Fable, KO-CPT Repair-SFT, and BarExamV5-SFT experiments also failed to produce a reliable broad benchmark improvement. The representative model remains `LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL`. This repository should be treated as a reproducible negative-result SFT record.
Final lesson: CPT improved Korean/domain knowledge and parts of the public benchmark profile, but weakened short exact-answer, MCQA, and option-mapping behavior. Broad SFT did not reliably recover that behavior; in these runs it often moved the model toward verbose assistant responses and made MCQA/exact extraction worse. Future repair should be small, gated, and targeted. Korean bar exam solving should be treated as an evidence-grounded workflow problem, not a standalone SFT-only model problem.
At A Glance
Quick Score Snapshot
Higher is better. Base/CPT reference scores are copied from the KO-CPT model card. This table is intentionally near the top because it is the main verdict.
Which Model To Use
For the strongest current Korean benchmark checkpoint from this project:
model_id = "LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL"For reproducing the failed SFT experiment in this repository:
model_id = "LLM-OS-Models/LFM2.5-8B-A1B-KO-SFT"Stage2 is the main KO-SFT model line and has been uploaded to this repository. Stage3 Agentic/Fable training is a separate follow-up model line under LLM-OS-Models/LFM2.5-8B-A1B-KO-Agentic-SFT.
The first selected full benchmark run shows that this Stage2 SFT checkpoint is not a blanket improvement over Base/CPT. It preserves or recovers a few axes, but it is weak on multiple-choice likelihood-style Korean benchmarks. Treat the numbers below as a diagnostic snapshot for the Stage2 SFT checkpoint, not as the final Agentic model report.
Current staged main SFT total is about 4.309577B tokens:
- Stage1 4k finance/Text2SQL: 1.286B tokens
- Stage1 8k legal/terminal: 1.659B tokens
- Stage2 diverse plus KoTSQA: 1.364864B tokens
Experiment Verdict
If another SFT experiment is run later, the safer starting point is KO-CPT, not this regressed KO-SFT checkpoint. The next run should be a small MCQA and answer-format repair SFT with frequent gates.
Stage2 Selected Full Benchmark Snapshot
Evaluation was run with vLLM/lm-eval on the uploaded Stage2 full checkpoint. Base and CPT reference values are copied from the CPT model card for the same task axes. KMMLU direct hard STEM failed once during a crowded vLLM queue and is marked as pending rather than reported here.
Interpretation:
- Stage2 SFT preserved only a small subset of public benchmark axes. BoolQ is slightly above Base, Global MMLU KO medical genetics is slightly above Base, and high school statistics recovers part of the CPT regression.
- Korean multiple-choice and exact-answer tasks are mostly below Base/CPT. This suggests the SFT mix improved conversation/domain behavior more than likelihood-style option selection.
- The next SFT data mix should add explicit Korean MCQA formats: question, choices, answer-only labels, and short rationales with the final option separated. This is especially important for KMMLU, Global MMLU KO, and MMLU-ProX style evaluation.
Stage3 Agentic/Fable Diagnostic Snapshot
Stage3 Agentic/Fable was trained as a separate model line with Fable5/Helio and workspace document/log grounding. It was useful as a behavior experiment but did not repair public benchmark quality.
This is not enough to call Stage3 successful. The stage is too small 7.12M tokens, and its data targets terminal/log/document behavior rather than multiple-choice likelihood or exact-answer repair.
Failure Analysis
The main failure mode is a mismatch between SFT behavior data and public benchmark scoring. The Stage2 mix teaches long Korean legal/finance answers, terminal/tool traces, Text2SQL, coding, and evidence QA. Those are useful assistant behaviors, but public MCQA benchmarks often score answer-token likelihood or exact final option extraction. A model can become more verbose and domain-specific while becoming worse at selecting a short option token.
The response-only SFT format also did not directly optimize the choice ranking used by KMMLU, Global MMLU KO, and MMLU-ProX. KoTSQA is useful for evidence QA and false-premise correction, but it is not a direct MCQA repair set. Agentic Fable data is even further from public benchmark repair: it targets log reading, tool planning, and grounded terminal behavior.
Next time, the repair experiment should start from KO-CPT and use a compact 100M-300M token set focused on Korean MCQA, answer-only outputs, short rationales, final-option separation, and strict JSON/exact-answer formats. It should be stopped immediately if quick gates fall below KO-CPT.
Goal
The goal is to keep LFM2.5 chat, tool-use, and general reasoning behavior while improving Korean legal, finance, Text2SQL, coding, and exact-answer behavior.
The SFT data follows the LFM ChatML-like template and keeps tool-use examples in the LFM tool-call style. Liquid's public docs describe this format with structured conversation roles and tool call delimiters such as <|tool_call_start|> and <|tool_call_end|>.
Data
Main source groups:
- Korean legal tasks, bar-style JSON answers, source-grounded legal agent data, and RAG-style legal QA. Legal data includes sources from the legalize-kr ecosystem: <https://github.com/legalize-kr>.
- Korean finance/accounting instruction data.
- Text2SQL and structured reasoning data.
- Terminal/tool-use and ToolBench-style conversations.
- Coding/SWE data.
- KoTSQA train split for Korean evidence QA and false-premise correction. The test split is kept out for later evaluation: <https://huggingface.co/datasets/etri-lirs/KoTSQA-v.2.0>.
- Korean dataset index reviewed for additional candidates: <https://github.com/gyunggyung/LLM-Ko-Datasets>.
Project implementation and runbooks are public at:
- SFT code and docs: <https://github.com/gyunggyung/LFM25-KO-SFT>
- CPT code and docs: <https://github.com/gyunggyung/LFM25-KO-CPT>
Public dataset releases:
The current prepared Stage1 pool is about 2.945B tokens:
- 4k finance/Text2SQL: 1.286B tokens
- 8k legal/terminal: 1.659B tokens
The Stage2 pool was prepared from Korean domain SFT, behavior mix, SWE/coding, reasoning, compact finance/legal, and Text2SQL reinforcement data. Raw CPT-style corpora such as Korean Wikipedia and raw law text were intentionally excluded from this SFT phase.
Quick Sanity Evaluation
This is a small limit=50 vLLM sanity slice, not a final benchmark.
The current CPT checkpoint is Korean-knowledge heavy and does not improve this small English/general sanity slice. The SFT stages were intended to recover instruction following, reasoning format, legal/finance QA, tool use, and coding behavior, but the selected public benchmark results show that this attempt did not preserve broad benchmark quality.
Training Recipe
- Method: full-parameter supervised fine-tuning, not LoRA.
- Precision: BF16.
- Parallelism:
torchrunDDP across 8 H200 GPUs. - Optimizer: fused AdamW.
- Scheduler: cosine with warmup.
- Stage0b batch:
per_device_train_batch_size=2,gradient_accumulation_steps=8, effective batch128sequences/update. - Checkpoints: every 1000 steps with total limit 2, plus final full model.
The direct DDP trainer is used because a previous Hugging Face Trainer attempt loaded the model but stalled before active GPU training on the second stage.
Evaluation Plan
We will report base, CPT, and SFT under the same vLLM settings. Planned public benchmark families:
The selected public matrix above is enough to mark the Stage2 KO-SFT line as a failed public-benchmark improvement. Slower official-card harnesses should be treated as future optional diagnostics, not as a reason to claim this checkpoint is stronger than KO-CPT.
Usage
For best broad benchmark performance, replace model_id with LLM-OS-Models/LFM2.5-8B-A1B-KO-CPT-FULL. Keep the same LFM chat-template usage.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "LLM-OS-Models/LFM2.5-8B-A1B-KO-SFT"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a helpful Korean legal and finance assistant."},
{"role": "user", "content": "대한민국 상법상 이사의 충실의무를 간단히 설명해줘."},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))Colab Example
!pip install -U transformers accelerate safetensors
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "LLM-OS-Models/LFM2.5-8B-A1B-KO-SFT"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a precise Korean assistant."},
{"role": "user", "content": "한국어로 LFM2.5 모델을 사용할 때 chat template을 쓰는 이유를 설명해줘."},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
output = model.generate(inputs, max_new_tokens=512, temperature=0.3, do_sample=True)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))한국어 설명
LFM2.5-8B-A1B-KO-SFT는 LFM2.5-8B-A1B-KO-CPT-FULL 위에 이어서 학습하는 한국어 SFT 모델입니다. 목표는 한국어 법률, 금융, 회계, Text2SQL, 코딩, 터미널 및 툴콜 동작을 강화하면서 기존 LFM2.5의 영어 추론과 도구 사용 능력을 유지하는 것입니다.
2026-06-30 기준 공개 벤치 결과는 실패로 판정합니다. Stage2 KO-SFT는 BoolQ와 일부 Global MMLU KO 세부 항목에서만 제한적으로 회복했고, IFEval, GSM8K, ARC-Challenge, PIQA, KMMLU, MMLU-ProX Lite KO 등 핵심 공개 벤치에서는 Base/CPT 보다 크게 낮았습니다. Stage3 Agentic/Fable도 일부 작은 회복은 있었지만 공개 벤치 개선 모델로 보기에는 부족합니다.
따라서 현재 대표 모델은 KO-CPT입니다. 이 KO-SFT 모델은 재현성과 실패 원인 분석 목적으로 공개합니다. 다시 SFT를 한다면 이 체크포인트에서 이어가는 것보다 KO-CPT에서 작은 다지선다/정확답 repair SFT를 새로 시작하는 편이 낫습니다.
한국어 사용 예시는 위 Usage와 Colab Example을 참고하면 됩니다.
프로젝트 코드와 실행 문서는 GitHub에 공개되어 있습니다.
- SFT: <https://github.com/gyunggyung/LFM25-KO-SFT>
- CPT: <https://github.com/gyunggyung/LFM25-KO-CPT>
