Home›Local LLM / Open Models›9 意図に絞ったら 38MB で足りた — 30M のモデルをゼロから学習した実測

9 意図に絞ったら 38MB で足りた — 30M のモデルをゼロから学習した実測By limiting intent classification to just 9 categories, the author trained a…

元記事を読むRead original articlezenn.dev(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary

意図分類を9種類に限定することで、30Mパラメータ・38MBという極小モデルをゼロから学習し実用精度を達成した実験報告。タスクを絞ることでローカルLLMの軽量化が現実的に可能であることを示している。

By limiting intent classification to just 9 categories, the author trained a 30M-parameter (38 MB) model from scratch and achieved practical accuracy. This demonstrates that scoping tasks aggressively makes ultra-lightweight local LLMs viable.

AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (zenn.dev) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (zenn.dev).

9意図に絞った30Mモデル

アプリにLLMを組み込む際の既定路線は、汎用の巨大モデルをAPI越しに呼ぶことです。この記事は、タスクを「9意図の意図分類+関数呼び出し」に絞ることで、38MB・30Mパラメータのモデルをゼロから学習し、意図分類正解率91.11%(ホールドアウト90件)に届いたという実測報告です。学習はMac 1台、43.75分で終わったとされています。

数値はすべて社内で実施したPoC(概念実証)の実測値です。検証リポジトリは非公開のため、モデル構成・学習設定・評価セット・実行環境・量子化条件が本文中に記載されているといいます。

完全一致率では17.78ポイント負け

「小さいほうが常に勝つ」という話ではない、と筆者は明確に述べています。同じ評価セットで、この30Mモデルの完全一致率は74.44%でした。比較対象は、Qwen2.5-0.5B-InstructをLow-Rank Adaptation(LoRA)で特化させた版で、こちらは92.22%です。差は17.78ポイントで、30Mモデルが下回っています。

勝ったのはサイズと速度

比較条件は、タスクを「タスク/ノート管理アプリのアプリ内アシスタント」に絞ったものです。相手はQwen2.5-0.5B-Instruct+LoRA・INT4(Q4_K_M)の構成です。from-scratchのtiny-30mは、この構成に対して次のように上回ったと報告されています。

配布サイズは90.4%削減されました。Time To First Token(TTFT)は7.3〜7.8倍、トークン毎秒は約3.6倍です。筆者は、勝ったのはサイズと速度であって精度ではないと整理しています。

ボトルネックは学習データ

筆者の中核の主張は、適切に特化すれば桁違いに小さくても勝てる領域がある、というものです。そのうえで、その領域でのボトルネックはモデル容量ではなく、学習データの意味的多様性だと述べています。

記事は各セクションで結論を先に置き、根拠となるデータと導出は折りたたみにしてあります。そのため結論だけを追って読むこともできます。想定読者は、LLM機能をアプリに組み込んでいる、または検討しているエンジニアです。

Embedding an LLM in an app usually means calling a large general-purpose model over an API. This write-up reports an in-house proof of concept that narrows the task and trains a very small model instead, and it is explicit about where that model wins and where it loses.

Narrowed to 9 Intents

The task was restricted to intent classification across nine intents plus function calling, for an in-app assistant in a task and note management app. Under that scope, the author trained a 30M-parameter, 38MB model from scratch. It reached 91.11% intent classification accuracy on a 90-case holdout set. Training ran on a single Mac and took 43.75 minutes.

According to the author, all figures are measured values from an internal PoC. The verification repository is private, so the article documents the model configuration, training settings, evaluation set, execution environment, and quantization conditions in place of a URL. Each section states its conclusion first and folds the supporting data and derivations away.

Size and Speed Against Qwen2.5-0.5B

The comparison baseline is Qwen2.5-0.5B-Instruct specialized with Low-Rank Adaptation (LoRA) and quantized to INT4 (Q4_K_M). Against it, the from-scratch tiny-30m model cut distribution size by 90.4%. Time To First Token was 7.3 to 7.8 times faster, and tokens per second improved by about 3.6 times.

Exact Match Lags by 17.78 Points

The article stresses that this is not a story of smaller always winning. On the same evaluation set, the 30M model's exact match rate was 74.44%. The LoRA-specialized Qwen2.5-0.5B-Instruct scored 92.22%, so the small model trails by 17.78 percentage points. In the author's words, what the small model won was size and speed, not accuracy.

Semantic Diversity of Training Data

The author's central claim is that, with suitable specialization, there are domains where a model orders of magnitude smaller can still be competitive. In such a domain, the stated bottleneck is the semantic diversity of the training data rather than model capacity. The intended readers are engineers who are building or considering LLM features in their applications.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPokoアプリに入れるAIが38MBって、普段の何が変わるの?An AI that's only 38MB inside an app. What changes for everyday use?
  2. TECHガイドTECH Guide巨大モデルをAPIで呼ぶのが定番ですが、この記事は9意図の分類と関数呼び出しに絞り、30Mモデルで意図分類91.11%に届きました。Calling a huge model over an API is the usual route. Here the task was narrowed to 9 intents plus function calling, and a 30M model hit 91.11% intent accuracy.
  3. ポコPoko前は、小さいモデルだと厳しかったの? 何と比べているんだろう。Was it harder with small models before? What is it being compared with?
  4. TECHガイドTECH Guide従来との差は書かれていません。比較相手はQwen2.5-0.5BのLoRA版で、サイズは90.4%減、TTFTは7.3〜7.8倍速いけど、完全一致率は17.78ポイント負けです。Past comparisons aren't covered. Against the Qwen2.5-0.5B LoRA version, size is down 90.4% and TTFT is 7.3–7.8x faster, but exact match is 17.78 points lower.
  5. ポコPokoじゃあ一番の収穫は、小さいほうが常に勝つんじゃなく、絞れば軽さと速さで勝てる場面があるってことだね。So the big takeaway isn't that small always wins. With a narrow task, it can win on size and speed.
  6. TECHガイドTECH Guideそう読めます。次は、この記事がボトルネックと言う学習データの意味的多様性に注目です。モデル容量より、そちらだと述べています。That's how I read it. Next, watch the semantic diversity of the training data. The article names that, not model capacity, as the bottleneck.
記事情報・収集記録Article details & collection record
出典Source
Zenn LLMコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
MediumMedium priority(Local LLM / Open Models 239件中、同等以上 192件)(192 of 239 Local LLM / Open Models entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.1 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🏠Local LLM / Open Models の他の記事More from Local LLM / Open Modelsもっと見る →View more →

ページ上部へScroll to top