在进行一些实验时,我们发现 Qwen3.8-27B(最受欢迎的中小语言模型之一)无法书写老挝语,这是一种属于西南台语支的语言,也是老挝的官方语言。如果你要求它将一个英文句子翻译成老挝语,它会用泰语回答——这是与老挝语关系最近的亲属语言,但使用的是完全不同的文字系统。在 FLORES-200 老挝语测试集上,该模型的 chrF++ 得分为 5.5(这是一个衡量翻译结果与人工参考译文匹配程度的 0 到 100 分的指标),其输出中仅有 11% 使用老挝文字。而在同一测试中,Kimi-K3.1-Pro 的得分高达 47.5。
诚然,这是一个小众用例,但这种模式相当普遍:中小语言模型表现出“参差不齐”的智能水平,在你关心的某项狭窄任务上表现不佳,而更大、更昂贵的模型却能轻松胜任。为了解决这个问题,我们以 Kimi-K3.1-Pro 作为教师模型,并使用 Together Post-Training 将其老挝语翻译能力蒸馏到 Qwen3.8-27B 中。
在对大约 3,800 条 Kimi-K3.1-Pro 的翻译数据进行训练后,这个拥有 270 亿参数的学生模型在每条测试句子上都能用老挝语作答,得分达到 44.3,相当于教师模型分数的 93%。它还保留了泰语翻译能力,有趣的是,这反而成了最难的部分。我们的第一次尝试在 25 个训练步骤内修复了老挝语能力,但也因此失去了泰语翻译能力。
本文详细介绍了我们如何发现这一差距以及最终行之有效的方案。代码、设置和成本信息位于文章后半部分。所有实验的总成本为 260 美元。
学生模型从仅会写泰语变为能写老挝语,得分达到教师模型的 93%,且未丧失其泰语能力。发现差距
Kimi-K3.1-Pro 在所有 11 种语言上均优于 Qwen3.8-27B。其中老挝语的差距最大(49.0 对比 7.2)。我们使用的指标是 chrF++,它衡量的是字符和词汇与人工参考译文的重叠程度,分数范围为 0 到 100。关于 Qwen 老挝语得分低的重要一点是,在 chrF++ 指标下,泰语答案与老挝语参考译文几乎没有共同之处。当被要求翻译成老挝语时,学生模型的输出中有 45 个句子使用了泰文字母,仅有 6 个句子使用了老挝文:
英文:“We now have 4-month-old mice that are non-diabetic that used to be diabetic,” he added.
Qwen3.8-27B(基础模型): “ปัจจุบันเรามีหนูอายุ 4 เดือนที่ไม่เป็นโรคเบาหวาน ซึ่งเคยเป็นโรคเบาหวานมาก่อน” เขากล่าวเสริม
Kimi-K3.1-Pro: "ພວກເຮົາຕອນນີ້ມີໜູອາຍຸ 4 ເດືອນ ທີ່ບໍ່ເປັນໂຣກເບົາຫວານ ເຊິ່ງເຄີຍເປັນໂຣກເບົາຫວານມາກ່ອນ," ລາວກ່າວຕື່ມ.
基础模型的泰语翻译是合理的,只是用错了语言。我们将在结果部分对此进行回顾。
关于数据的一点说明:在这 50 个句子中,Qwen3.8-27B 的老挝语得分为 7.2,Kimi-K3.1-Pro 为 49.0;而在完整的 1,012 句测试集上,得分分别为 5.5 和 47.5。测试集详情列在“我们如何构建它”部分。
计划:离线策略蒸馏
蒸馏技术旨在让一个小模型(学生)在特定领域模仿一个大模型(教师)的行为。有两种实现方式。
如 Thinking Machines 在该主题的文章中所描述的,在线策略蒸馏(OPD)让学生生成文本,并由教师对每个 token 进行评分。这需要教师模型提供学生生成 token 的对数概率,在实际操作中意味着两个模型必须共享同一个分词器。由于这里我们将 Kimi 蒸馏到 Qwen,而它们并不共享分词器,因此我们选择了另一条路径。
离线策略蒸馏由教师生成文本,并通过监督微调(SFT)训练学生去模仿它。在最简单的形式中,它只需要教师的文本数据。
我们采用了离线策略蒸馏。这种方式让教师端的成本保持较低:每次调用教师模型都是一次普通的无服务器聊天请求,而 Kimi-K3.1-Pro 作为一个相当大的模型,完全不需要占用任何专用的训练资源。
端到端流程:英文句子输入到 Kimi-K3.1-Pro,经过过滤后,成为 Together Post-Training 模型资源上针对 Qwen3.8-27B LoRA 会话的监督微调数据行。具体步骤如下:
收集英文源句子。
让 Kimi-K3.1-Pro 进行翻译,并关闭思维链功能。
丢弃那些主要不是目标脚本的翻译。
在 Qwen3.8-27B 上针对这些翻译作为目标微调 LoRA 适配器,并在训练过程中对保留的测试句子进行评估。
将适配器保存到模型注册表中。
我们在 Together Post-Training 上对学生模型进行了训练。一个模型资源同时负责训练 LoRA 适配器和从中采样,因此我们可以在模型训练时对其评分。我们对每次评估使用了四个指标:
在 FLORES-200 devtest 上与人工参考的 chrF++:每个运行开始和结束时的全部 1,012 个句子,以及每 25 步抽取的 300 个句子(在两个最长的运行中为每 50 或 100 步)。
老挝语脚本率:输出内容主要为老挝语字母的比例。这直接捕捉到了泰语问题。
泰语保留率:在 300 个英译泰测试句子上的 chrF++,以检查模型是否丢失了它原本就具备的语言能力。
往返充分性:Kimi-K3.1-Pro 将每个系统的老挝语翻译回英语,我们将其与原始英语进行评分。这独立于参考风格来检查含义。
在获得老挝语翻译能力的同时保留泰语最终变得最为棘手。
泰语的意外发现
其中一次运行是控制组:它在人工老挝语参考数据上训练,共 945 条来自 FLORES dev,未涉及教师模型。老挝语得分在 25 步内从 6.7 跃升至 43.3。
然后我们查看泰语表现。它已从 46.7 降至 11.7,并在运行结束时跌至 5.3,且 0% 的泰语输出使用了泰语脚本。模型学会了“当被要求翻译时写老挝语”,而不是“写出你被要求的那种语言”。问题方向发生了反转。
在 300 个测试句子上的英译泰 chrF++。仅使用人工老挝语数据进行训练会导致泰语崩溃;混合数据运行则能保持泰语。如果我们仅评估老挝语,这次运行看起来会是赢家。它拥有本文所有学生模型中最高的老挝语得分。
修复泰语
仅针对老挝语的蒸馏运行使用 Kimi-K3.1-Pro 对相同句子的人工参考翻译进行训练。这大大减缓了损害,但未能阻止它。泰语在前两个 epoch 中得以保持,但在第三个 epoch 中滑落至 44.3,300 个泰语答案中有 17 个是用老挝语写的。
在训练数据中加入约 1,000 条 Kimi-K3.1-Pro 的泰语翻译解决了这一问题。在两个混合运行中,泰语最终得分分别为 47.4 和 47.8,高于基础模型,且在任何评估中均未低于 47.3。
当你请求老挝语和泰语时,每种训练混合所起的作用。这是一个关于持续学习的重要观点:当你教模型新东西时,混入保护其已有优势的数据,以免在你关心的方面出现倒退。在这里,那就是泰语,这是最容易与老挝语混淆的语言。
填补剩余的老挝语差距
泰语已安全,但老挝语仍有欠缺。在拥有约 950 条老挝语示例的情况下,基于人工参考训练的学生模型得分 44.7,而两个蒸馏学生模型的得分分别为 41.8 和 41.9。
部分原因是可预期的。人工参考在人工参考指标上表现更好:FLORES dev 和 devtest 均通过相同的人工流程翻译,因此在 dev 上训练会教出 devtest 的参考风格。蒸馏学生模型则学习教师的风格。在与 Kimi-K3.1-Pro 自身翻译对比评分时,蒸馏学生模型的 chrF++ 从 8 升至 58,而基于人工参考训练的学生模型达到了 47。
另一个差异在于数据供给。FLORES dev 仅有 997 条人工参考,再无更多;而 Kimi-K3.1-Pro 可以翻译你拥有的任何英文文本。加入其翻译的 3,000 个维基百科句子将老挝语训练集从 965 个示例扩充至 3,834 个,并将老挝语得分从 41.9 提升至 44.3。这与人工参考运行的差距在半分以内,且泰语完好无损。
更多数据也优于更多轮次:4 倍数据量的一个 epoch 在 300 个测试句子上达到 43.2,而较小老挝语 + 泰语数据集经过三个 epoch 后仅为 41.3。
四个训练运行在 300 个测试句子上的英译老 chrF++,相对于 SFT 步数。虚线表示教师模型。结果
运行训练数据 Lao chrF++ Lao 脚本 Thai chrF++
基础学生模型 无 5.5 11% 46.7
在人类参考译文上进行监督微调(SFT) 945 条人工翻译的 Lao 语 44.7 100% 5.3
蒸馏,仅 Lao 语 965 条 Kimi-K3.1-Pro 翻译的 Lao 语 41.8 100% 44.3
蒸馏,Lao + Thai 965 条 Lao + 989 条 Thai,来自 Kimi-K3.1-Pro 41.9 100% 47.4
蒸馏,Lao + Thai,4 倍 Lao 数据 3,834 条 Lao + 989 条 Thai,来自 Kimi-K3.1-Pro 44.3 100% 47.8
Kimi-K3.1-Pro 教师模型 - 47.5 100% 49.9
Lao 语使用全部 1,012 条测试句子,Thai 语使用 300 条。最佳运行结果达到了教师模型得分的 93%。从基础模型的起点计算,它填补了基础模型到教师模型之间差距的 92%:
$$\text{gap closed} = \frac{s_{\text{student}} - s_{\text{base}}}{s_{\text{teacher}} - s_{\text{base}}} = \frac{44.3 - 5.5}{47.5 - 5.5} = 0.92$$
基础模型主要具备正确的含义,只是写错了语言。还记得那个关于老鼠的例子吗。在往返充分性(round-trip adequacy)方面,基础模型的 Thai 语输出得分为 64.6,略高于人工 Lao 语参考译文(64.0)。蒸馏后的学生模型得分为 65.7,并在 100% 的测试句子中输出了 Lao 语。因此,主要的差距在于语言身份识别,这也是为什么每次运行都在前 25 或 50 步的评估中就修正了脚本的原因。
以 Lao 脚本书写的 Lao 答案比例。每次运行都在首次评估时修正了脚本。损失曲线、标记计数和每次运行的详细信息可在附录中找到。
在五种语言上进行训练
为了确认这并非仅针对 Lao 语的特例,我们训练了一个适配器,涵盖 Lao、Northern Sotho 和 Zulu(差距最大的三种语言)以及 Yoruba(两种模型得分最低的拉丁字母脚本语言),并保留 Thai 语:总共使用 8,871 条 Kimi-K3.1-Pro 翻译数据,每种语言约 2,000 条,Thai 语为 1,000 条,经过 831 步训练。
一个蒸馏后的适配器改善了 Lao、Northern Sotho、Yoruba 和 Zulu 的表现,同时保持了 Thai 语的性能。语言 基础学生模型 蒸馏后 Kimi-K3.1-Pro 填补的差距
Lao 5.5 41.8 47.5 87%
Northern Sotho 32.7 48.0 50.7 85%
Yoruba 20.7 25.7 27.7 71%
Zulu 37.7 39.2 50.3 12%
Thai 46.7 48.0 49.9 有所改善
Lao 语使用全部 1,012 条测试句子;其余语言使用 300 条,教师模型在同一组句子上进行评分。每种语言的表现均有提升。Zulu 语改善最少:在训练期间,其输出的 1% 到 2% 陷入了重复循环,因此我们会首先尝试增加 Zulu 数据或引入重复惩罚机制。
如果你面临类似的差距
以下是我们再次会采取的措施:
首先进行筛查。每种语言 50 条句子足以看出教师模型领先之处。
在训练前查看基础模型出错的地方。此处含义是正确的,但语言是错误的,这就是为什么脚本在前 25 到 50 步内得到修正的原因。
当学生模型表现停滞时,在增加轮次(epochs)之前生成更多的教师数据。
混合用于保留所需邻近技能的数据,并在训练期间对其进行评分。如果仅评估 Lao 语,就会选出破坏 Thai 语表现的那次运行作为最佳结果。
我们是如何构建的
本文的其余部分是操作指南:教师数据、训练循环、设置、测试集和成本。
使用无服务器 Kimi-K3.1-Pro 生成教师数据
每次调用教师模型都是普通的聊天补全,且关闭了思维链(thinking)。翻译不需要长推理:开启思维链时,Kimi-K3.1-Pro 在 300 条 Lao 语测试句子上的得分较低(43.5 对比 47.3),且使用的标记数约为关闭时的 8 倍。关闭后,Lao 语答案平均输出约 175 个标记。
from together import Together
client = Together()
resp = client.chat.completions.create(
model="moonshotai/Kimi-K3.1-Pro",
messages=[{"role": "user", "content": (
"Translate the following English text into Lao. "
"Output only the Lao translation, with no explanation.\n\n" + english
)}],
max_tokens=1024,
temperature=0.0,
chat_template_kwargs={"thinking": False},
)
lao = resp.choices[0].message.content
源文本包括 FLORES-200 dev 集的 997 条句子,以及来自英语维基百科的 4,000 条句子(Lao 语 3,000 条,Thai 语 1,000 条)。
关于数据值得了解的两点:
中文翻译:
从教师模型生成数据的成本很低。Kimi-K3.1-Pro 无服务器版本的输入令牌价格为每百万个 2 美元,输出令牌为每百万个 10 美元。所有 4,000 条老挝语翻译的总成本仅为 7.46 美元。
训练前进行过滤。我们仅保留那些至少有 70% 的字母属于目标脚本且不是英语回声的翻译。该过滤器去除了 Kimi-K3.1-Pro 生成的 4% 的老挝语翻译。
每条幸存的翻译都成为一行聊天格式的 Training 数据:
{"messages": [
{"role": "user", "content": "将以下英文文本翻译成老挝语。仅输出老挝语翻译,不要解释。\n\n
{"role": "assistant", "content": "
]}
在 Together Post-Training 上训练学生模型
Together Post-Training 将训练过程分配给您的代码和 GPU。模型资源是一组加载了基础模型的 GPU(此处为 B200)。它包含一个 trainer,用于运行 forward_backward 和 optim_step,并可选地包含一个 generator,用于从中间检查点采样文本。会话是在该资源上训练一个 LoRA 适配器。
一个训练步骤:笔记本电脑构建样本并发送它们;模型资源计算损失、应用优化器步骤并进行评估采样。我们使用了 cookbook 来实现三个目的:
get_codec("Qwen/Qwen3.8-27B", enable_thinking=False) 使用 Qwen 自己的模板渲染每个聊天。
build_conversation_samples 屏蔽提示(损失权重为 0),仅训练助手的翻译(权重为 1),包括回合结束令牌,从而使模型学会何时停止。
build_cross_entropy_sample 将令牌移位到 API 期望的下一个令牌目标。
from together import Together
from together.post_training import (AdamParams, LoraConfig, LossConfig,
ModelResourcesClient, SamplingParams)
from post_training_cookbook.codecs import get_codec
from post_training_cookbook.samples import make_prompt
from post_training_cookbook.sft.train import TRAIN_ON_LAST, build_conversation_samples
codec = get_codec("Qwen/Qwen3.8-27B", enable_thinking=False)
samples = [s for row in rows for s in build_conversation_samples(
row["messages"], codec=codec, train_on_what=TRAIN_ON_LAST, max_length=2048)]
raw = Together().post_training.model_resources.create(
base_model="Qwen/Qwen3.8-27B", lora_enabled=True,
compute_config={"gpu_type": "B200-SXM", "num_generator_replicas": 1},
extra_body={"inactive_timeout": 1200})
record_in_ledger(raw.id) # 在等待之前记录,以防崩溃导致泄漏
wait_until_ready(raw.id) # 我们大约需要 4 到 5 分钟
resources = ModelResourcesClient.attach(model_resources_id=raw.id)
session = resources.create_session(lora_config=LoraConfig(rank=64, alpha=128))
for step in range(total_steps):
batch = next_batch(samples, size=16)
session.trainer.forward_backward(samples=batch,
loss=LossConfig(type="LOSS_TYPE_CROSS_ENTROPY"))
session.trainer.optim_step(adam_params=AdamParams(learning_rate=lr_at(step)))
if (step + 1) % 25 == 0:
session.trainer.weights_sync() # 将新权重发布到生成器
outs = session.generator.sample_batch(
[make_prompt(codec.encode_messages(m, add_generation_prompt=True)) for m in test_prompts],
num_samples=1, sampling_params=SamplingParams(max_tokens=1024, temperature=0.0))
score(outs)
checkpoint = session.create_inference_checkpoint() # 注册适配器 (ml_...)
record_in_ledger 、 wait_until_ready 、 next_batch 、 lr_at 和 score 是我们的辅助小工具。
设置如下:
LoRA rank 64(Qwen3.8-27B 的最大值)和 alpha 128
峰值学习率 1e-4,带有 5% 的预热以及余弦衰减至峰值的十分之一
批次大小 16
由于资源包含生成器,因此我们不需要部署单独的端点来进行评估。
测试集
您会在不同地方看到同一模型的分数略有不同,因为我们在三组 FLORES-200 句子上进行了评分:
切片 用于基础老挝语教师模型
中文翻译:
每种语言50个句子 11种语言的屏幕 7.2 49.0
300个开发测试句子 训练期间的评估,以及泰语 6.7 47.3
全部 1,0
While running some experiments we found out that Qwen3.8-27B , one of the most popular small language models (SLMs), can't write Lao, a Southwestern Tai language and the official language of Laos. If you ask it to translate an English sentence into Lao, it answers in Thai, Lao's closest relative, which uses an entirely different script. On the FLORES-200 Lao test set, the model scores 5.5 chrF++, a 0 to 100 score for how closely a translation matches a human reference, and only 11% of its outputs are in Lao script. Kimi-K3.1-Pro scores 47.5 on the same test.
Admittedly, this is a niche use case, but the pattern is quite common: a small language model displays jagged intelligence, falling flat on a narrow task you care about while a larger, more expensive model handles it with ease. To fix this, we used Kimi-K3.1-Pro as a teacher and distilled its Lao translation ability into Qwen3.8-27B using Together Post-Training.
After training on about 3,800 of Kimi-K3.1-Pro's translations, the 27B student answers in Lao on every test sentence and scores 44.3, which is 93% of the teacher's score. It also kept its Thai translation ability, which interestingly turned out to be the hardest part. Our first attempt fixed Lao within 25 training steps but also lost Thai translating capabilities along with it.
This post walks through how we found the gap and what ended up working. The code, settings and costs are in the second half. All the experiments together cost \$260.
The student goes from writing Thai to writing Lao at 93% of the teacher's score, without losing its Thai capabilities. Finding the gap
Kimi-K3.1-Pro beats Qwen3.8-27B on all 11 languages. Lao has by far the largest gap (49.0 vs 7.2). The metric we use is chrF++, which scores character and word overlap with a human reference translation, from 0 to 100. The important thing to know about Qwen's low Lao score is that, to chrF++, a Thai answer shares almost nothing with a Lao reference. When asked to translate into Lao, the student's output contained Thai script in 45 of 50 sentences and Lao in only 6:
English: "We now have 4-month-old mice that are non-diabetic that used to be diabetic," he added.
Qwen3.8-27B (base): “ปัจจุบันเรามีหนูอายุ 4 เดือนที่ไม่เป็นโรคเบาหวาน ซึ่งเคยเป็นโรคเบาหวานมาก่อน” เขากล่าวเสริม
Kimi-K3.1-Pro: "ພວກເຮົາຕອນນີ້ມີໜູອາຍຸ 4 ເດືອນ ທີ່ບໍ່ເປັນໂຣກເບົາຫວານ ເຊິ່ງເຄີຍເປັນໂຣກເບົາຫວານມາກ່ອນ," ລາວກ່າວຕື່ມ.
The base model's Thai is a reasonable translation, just in the wrong language. We'll come back to this in the results.
One note on the numbers: on these 50 sentences Lao scores 7.2 for Qwen3.8-27B and 49.0 for Kimi-K3.1-Pro, and on the full 1,012-sentence test set it's 5.5 and 47.5. The test sets are listed under "How we built it."
The plan: off-policy distillation
Distillation trains a small model (the student) to behave like a large one (the teacher) on a given domain. There are two ways to do it.
On-policy distillation (OPD) , described in Thinking Machines' post on the topic , has the student generate text and the teacher grade every token. It needs the teacher's log-probabilities on the student's tokens, which in practice means the two models have to share a tokenizer. Here since we are distilling Kimi into Qwen and they don’t share a tokenizer we went another direction.
Off-policy distillation has the teacher generate the text and trains the student to imitate it with supervised fine-tuning (SFT). In its simplest form it only needs the teacher's text.
We used off-policy distillation. It keeps the teacher side fairly cheap: every teacher call is an ordinary serverless chat request, and Kimi-K3.1-Pro, which is quite a large model, never needs a training resource of its own.
End-to-end pipeline: English sentences go to Kimi-K3.1-Pro, are filtered, and become SFT rows for a Qwen3.8-27B LoRA session on a Together Post-Training model resource. The steps:
Collect English source sentences.
Have Kimi-K3.1-Pro translate them, with thinking turned off.
Drop any translation that isn't mostly in the target script.
Fine-tune a LoRA adapter on Qwen3.8-27B with the translations as targets, evaluating on held-out test sentences as it trains.
Save the adapter to the model registry.
We trained the student on Together Post-Training. One model resource both trains the LoRA adapter and samples from it, so we could score the model as it trained. We scored every evaluation on four metrics:
chrF++ against human references on FLORES-200 devtest: all 1,012 sentences at the start and end of each run, and 300 every 25 steps (every 50 or 100 in the two longest runs).
Lao-script rate: the share of outputs whose letters are mostly Lao. This catches the Thai problem directly.
Thai retention: chrF++ on 300 English-to-Thai test sentences, to check the model hasn't lost a language it already had.
Round-trip adequacy: Kimi-K3.1-Pro translates each system's Lao back into English, and we score that against the original English. This checks meaning independently of reference style.
Thai retention while also gaining Lao translation capability ended up being the trickiest part.
The Thai surprise
One run was a control: it trained on human Lao references, 945 of them from FLORES dev, with no teacher involved. Lao jumped from 6.7 to 43.3 within 25 steps.
Then we looked at Thai. It had dropped from 46.7 to 11.7, and by the end of the run it was 5.3, with 0% of Thai outputs in Thai script. The model had learned to "write Lao when asked to translate", not "write the language you were asked for". The problem had swapped direction.
English-to-Thai chrF++ on 300 test sentences. Training on human Lao alone collapses Thai; the mixed runs keep it. If we'd evaluated Lao alone, this run would have looked like the winner. It has the highest Lao score of any student in this post.
Fixing Thai
The Lao-only distillation run trains on Kimi-K3.1-Pro's translations of the same sentences in place of the human ones. That slowed the damage a lot but didn't stop it. Thai held for two epochs, then slipped to 44.3 in the third, with 17 of 300 Thai answers written in Lao.
Adding about 1,000 Kimi-K3.1-Pro Thai translations to the training data fixed it. Thai finished at 47.4 and 47.8 in the two mixed runs, above the base model, and never dropped below 47.3 at any evaluation.
What each training mix does when you ask for Lao and when you ask for Thai. This is a great point to make about continual learning: when you teach a model something new, mix in data that protects what it already does well, so you don't get regressions in things you care about. Here that was Thai, the language most easily confused with Lao.
Closing the rest of the Lao gap
Thai was safe, but Lao was still short. With about 950 Lao examples each, the student trained on human references scored 44.7 and the two distilled students scored 41.8 and 41.9.
Part of that is expected. Human references do better on a human-reference metric: FLORES dev and devtest were translated through the same human process, so training on dev teaches devtest's reference style. The distilled student learns the teacher's style instead. Scored against Kimi-K3.1-Pro's own translations, the distilled student climbed from 8 to 58 chrF++, and the student trained on human references reached 47.
The other difference is supply. FLORES dev has 997 human references and no more, while Kimi-K3.1-Pro can translate any English text you have. Adding its translations of 3,000 Wikipedia sentences took the Lao training set from 965 to 3,834 examples and raised Lao from 41.9 to 44.3. That's within half a point of the human-reference run, with Thai intact.
More data also beat more passes: one epoch of the 4× data reached 43.2 on the 300 test sentences, against 41.3 after three epochs of the smaller Lao + Thai set.
English-to-Lao chrF++ on 300 test sentences for the four training runs, against SFT step. The dashed line is the teacher. Results
Run Training data Lao chrF++ Lao script Thai chrF++
Base student none 5.5 11% 46.7
SFT on human references 945 human Lao translations 44.7 100% 5.3
Distilled, Lao only 965 Kimi-K3.1-Pro Lao translations 41.8 100% 44.3
Distilled, Lao + Thai 965 Lao + 989 Thai, from Kimi-K3.1-Pro 41.9 100% 47.4
Distilled, Lao + Thai, 4× Lao data 3,834 Lao + 989 Thai, from Kimi-K3.1-Pro 44.3 100% 47.8
Kimi-K3.1-Pro teacher - 47.5 100% 49.9
Lao numbers use all 1,012 test sentences and Thai uses 300. The best run reaches 93% of the teacher's score. Measured from where the base model started, it closed 92% of the base-to-teacher gap on Lao:
$$\text{gap closed} = \frac{s_{\text{student}} - s_{\text{base}}}{s_{\text{teacher}} - s_{\text{base}}} = \frac{44.3 - 5.5}{47.5 - 5.5} = 0.92$$
The base model mostly had the meaning; it just wrote the wrong language. Remember the mice example. On round-trip adequacy, the base model's Thai output scored 64.6, slightly above human Lao references (64.0). The distilled student scored 65.7 and wrote Lao on 100% of the test sentences. So the main gap was language identity, which is why every run had fixed the script by its first evaluation, 25 or 50 steps in.
Share of Lao answers written in Lao script. Every run fixes the script by its first evaluation. Loss curves, token counts and per-run details can be found in the appendix.
Training on five languages
To check this wasn't specific to Lao, we trained one adapter on Lao, Northern Sotho and Zulu (the three largest gaps) plus Yoruba, the lowest-scoring Latin-script language for both models, with Thai for retention: 8,871 Kimi-K3.1-Pro translations in all, about 2,000 per language and 1,000 for Thai, over 831 steps.
One distilled adapter improves Lao, Northern Sotho, Yoruba and Zulu and keeps Thai performance. Language Base student Distilled Kimi-K3.1-Pro Gap closed
Lao 5.5 41.8 47.5 87%
Northern Sotho 32.7 48.0 50.7 85%
Yoruba 20.7 25.7 27.7 71%
Zulu 37.7 39.2 50.3 12%
Thai 46.7 48.0 49.9 improved
Lao is on all 1,012 test sentences; the rest use 300, with the teacher scored on the same sentences. Every language improved. Zulu improved least: 1 to 2% of its outputs fell into repetition loops during training, so more Zulu data or a repetition penalty is the first thing we'd try.
If you have a gap like this
Here's what we'd do again:
Screen first. Fifty sentences per language was enough to see where the teacher was far ahead.
Look at what the base model is getting wrong before you train. Here the meaning was there and the language was wrong, which is why the script was fixed within the first 25 to 50 steps.
When the student plateaus, generate more teacher data before you add epochs.
Mix in data for the nearby skill you want to keep, and score it during training. A Lao-only evaluation would have picked the run that broke Thai as the best one.
How we built it
The rest of this post is the how-to: the teacher data, the training loop, the settings, the test sets and the cost.
Generating teacher data with serverless Kimi-K3.1-Pro
Every teacher call is an ordinary chat completion with thinking turned off. Translation doesn't need long reasoning: with thinking on, Kimi-K3.1-Pro scored lower on 300 Lao test sentences (43.5 against 47.3) and used about 8 times as many tokens. With it off, a Lao answer averages about 175 output tokens.
from together import Together
client = Together()
resp = client.chat.completions.create(
model="moonshotai/Kimi-K3.1-Pro",
messages=[{"role": "user", "content": (
"Translate the following English text into Lao. "
"Output only the Lao translation, with no explanation.\n\n" + english
)}],
max_tokens=1024,
temperature=0.0,
chat_template_kwargs={"thinking": False},
)
lao = resp.choices[0].message.content
The source text was the 997 sentences of FLORES-200 dev , plus 4,000 sentences from English Wikipedia (3,000 for Lao, 1,000 for Thai).
Two things worth knowing about the data:
Generating data from the teacher is cheap. Kimi-K3.1-Pro serverless costs \$2 per million input tokens and \$10 per million output tokens. All 4,000 Lao translations together cost \$7.46.
Filter before training. We kept a translation only if at least 70% of its letters were in the target script and it wasn't an echo of the English. The filter removed 4% of Kimi-K3.1-Pro's Lao.
Each surviving translation becomes one chat-format training row:
{"messages": [
{"role": "user", "content": "Translate the following English text into Lao. Output only the Lao translation, with no explanation.\n\n
{"role": "assistant", "content": "
]}
Training the student on Together Post-Training
Together Post-Training splits a training run between your code and the GPUs. A model resource is a set of GPUs (B200s here) with the base model loaded. It has a trainer , which runs forward_backward and optim_step , and optionally a generator that samples text from intermediate checkpoints. A session is one LoRA adapter training on that resource.
One training step: the laptop builds samples and sends them; the model resource computes the loss, applies the optimizer step, and samples for evaluation. We used the cookbook for three things:
get_codec("Qwen/Qwen3.8-27B", enable_thinking=False) renders each chat with Qwen's own template.
build_conversation_samples masks the prompt (loss weight 0) and trains only the assistant's translation (weight 1), including the end-of-turn token, so the model learns when to stop.
build_cross_entropy_sample shifts the tokens to the next-token targets the API expects.
from together import Together
from together.post_training import (AdamParams, LoraConfig, LossConfig,
ModelResourcesClient, SamplingParams)
from post_training_cookbook.codecs import get_codec
from post_training_cookbook.samples import make_prompt
from post_training_cookbook.sft.train import TRAIN_ON_LAST, build_conversation_samples
codec = get_codec("Qwen/Qwen3.8-27B", enable_thinking=False)
samples = [s for row in rows for s in build_conversation_samples(
row["messages"], codec=codec, train_on_what=TRAIN_ON_LAST, max_length=2048)]
raw = Together().post_training.model_resources.create(
base_model="Qwen/Qwen3.8-27B", lora_enabled=True,
compute_config={"gpu_type": "B200-SXM", "num_generator_replicas": 1},
extra_body={"inactive_timeout": 1200})
record_in_ledger(raw.id) # before waiting, so a crash can't leak it
wait_until_ready(raw.id) # about 4 to 5 minutes for us
resources = ModelResourcesClient.attach(model_resources_id=raw.id)
session = resources.create_session(lora_config=LoraConfig(rank=64, alpha=128))
for step in range(total_steps):
batch = next_batch(samples, size=16)
session.trainer.forward_backward(samples=batch,
loss=LossConfig(type="LOSS_TYPE_CROSS_ENTROPY"))
session.trainer.optim_step(adam_params=AdamParams(learning_rate=lr_at(step)))
if (step + 1) % 25 == 0:
session.trainer.weights_sync() # publish new weights to the generator
outs = session.generator.sample_batch(
[make_prompt(codec.encode_messages(m, add_generation_prompt=True)) for m in test_prompts],
num_samples=1, sampling_params=SamplingParams(max_tokens=1024, temperature=0.0))
score(outs)
checkpoint = session.create_inference_checkpoint() # registers the adapter (ml_...)
record_in_ledger , wait_until_ready , next_batch , lr_at and score are small helpers of ours.
The settings were:
LoRA rank 64 (Qwen3.8-27B's maximum) and alpha 128
peak learning rate 1e-4, with 5% warmup and cosine decay to a tenth of the peak
batch size 16
Because the resource has a generator, we didn't need to deploy a separate endpoint to evaluate.
The test sets
You'll see slightly different scores for the same model in different places, because we scored on three sets of FLORES-200 sentences:
Slice Used for Base Lao Teacher Lao
50 sentences per language The 11-language screen 7.2 49.0
300 devtest sentences Evaluations during training, and Thai 6.7 47.3
All 1,0
首次收录 · 2026-11-27 · 8.95 分