Skip to content
KoishiAI
ไทย
← Contents

Chapter 6 of 9 · AI 101 — A Practical Guide for People Who Will Actually Deploy It

Choosing a Model That Fits the Job

Start from your constraints, not from a leaderboard. A job-to-model table, the one rule that always holds, how to build your own eval set, what is specific to Thai, and how to read a licence before you use a model commercially.

6.1 Start from constraints, not from a leaderboard

Answer these in order, before looking at any score.

#QuestionWhat the answer eliminates
1May the data leave the organisation?If not, every API option is gone
2How fast must it answer?Within a second, or is thirty seconds acceptable?
3How many concurrent users?Determines the runtime class and the VRAM
4What hardware do you have?Sets the largest possible model size
5What is the monthly budget?Weighs API cost against self-hosting cost
6How much does Thai matter?Removes models weak in Thai, however high their English scores
7What exactly is the job?Only now do you pick a type and size

Questions 1–6 typically eliminate more than 90% of the options before any score is consulted.

6.2 Job-to-model table

JobType neededSize that sufficesNotes
Classifying text into categoriesSmall LLM, or a classifier0.5–3BThis needs no large model at all. A fine-tuned small model is usually more accurate and far cheaper
Extracting data as JSONLLM + structured output3–8BA runtime that enforces a schema raises accuracy sharply without a larger model
Summarising and rewritingLLM8–14BFor genuinely fluent Thai, size up, or pick a model trained specifically on Thai
Answering questions from documentsEmbedding + Reranker + LLM8–14BQuality depends on retrieval more than on LLM size. Invest in retrieval first
Writing codeCoder-family LLM14–32B and upSize matters visibly here. Small models write code that looks right and does not run
Maths and complex logicReasoning model14B and upA mid-size reasoning model usually beats a larger ordinary one at this
Reading scans and receiptsVLM2–8BA small VLM trained specifically for OCR usually beats a larger general one
TranscriptionASRParameter count is not the metricChoose by accuracy in your language
Semantic searchEmbedding0.3–1BPick one that is multilingual and whose vector dimension your database accepts
Predicting numbers from tablesNot an LLMXGBoost or LightGBM: more accurate, faster, explainable, and runs on CPU

6.3 The one rule that always holds

Choose the smallest model that passes your own test set.

Not the best model on a leaderboard. A smaller model means faster answers, lower cost, room to run several at once, and VRAM left over for something else.

In practice: start with one that is obviously too small, step up until it passes, then stop. Do not start large and try to come down — you never actually come down.

6.4 Building your own eval set — the step people skip

A public leaderboard score tells you how good a model is at general work. It does not tell you how good it is at your work, and benchmark contamination keeps those scores flattering. The answer is a small test set you build yourself.

{"id":"ocr-01","input":"[receipt image]","expect":{"vendor":"Shop A","total":1250.00},"why":"normal case"}
{"id":"ocr-02","input":"[image skewed 15 degrees]","expect":{"total":890.50},"why":"handheld photo"}
{"id":"ocr-03","input":"[receipt with a watermark]","expect":{"total":2100.00},"why":"a case that failed before"}
{"id":"sum-01","input":"2000-word article...","expect_contains":["main point A","45%"],"why":"must not drop the figure"}
{"id":"neg-01","input":"question outside scope","expect_behavior":"refuse","why":"must not invent"}

How to choose the examples:

  • 60% the ordinary cases you see most often
  • 30% hard cases that actually failed before — the most valuable ones; capture every single one
  • 10% cases the model should refuse or say it does not know

Comparing several models against one bar:

import json, time
from openai import OpenAI

MODELS = [
    ("qwen3:4b",  "http://localhost:11434/v1"),
    ("qwen3:8b",  "http://localhost:11434/v1"),
    ("qwen3:14b", "http://localhost:11434/v1"),
]

cases = [json.loads(l) for l in open("evalset.jsonl", encoding="utf-8")]

for name, base in MODELS:
    client = OpenAI(base_url=base, api_key="local")
    ok, latencies = 0, []
    for c in cases:
        t0 = time.perf_counter()
        r = client.chat.completions.create(
            model=name,
            messages=[{"role": "user", "content": c["input"]}],
            temperature=0, max_tokens=512)
        latencies.append(time.perf_counter() - t0)
        out = r.choices[0].message.content
        # The check must be automatic. Do not grade by eye
        if all(k in out for k in c.get("expect_contains", [])):
            ok += 1
    latencies.sort()
    print(f"{name:14s} passed {ok}/{len(cases)} "
          f"p50={latencies[len(latencies)//2]:.2f}s "
          f"p95={latencies[int(len(latencies)*.95)-1]:.2f}s")

Decide from that table, not from how a handful of chat turns felt.

6.5 What is specific to Thai

IssueEffect and what to do
Inefficient tokenizerThai costs several times more tokens than English for the same meaning, which raises API cost, fills the context sooner, and slows generation. Test with real text to learn your chosen model’s ratio
Word segmentationThai has no spaces between words. A model with little Thai training segments badly and distorts meaning
High English scores do not imply good ThaiA model with excellent English can answer Thai stiffly or mix languages. Always test with real Thai text
Thai-tuned modelsBoth Thai-developed models and Southeast-Asia-focused ones exist, and they often beat international models of the same size on Thai. Always worth benchmarking against
Thai official and business documentsThai numerals, Buddhist-era dates and Thai address formats usually need fine-tuning or rule support. Do not expect an international model to handle them unaided

6.6 Self-host or use an API

AspectSelf-hosted (open-weight)API
DataNever leaves the machineGoes to a provider; needs an agreement behind it
CostOne large payment plus electricityPay as you go, starting near zero
Peak qualityBelow the top closed modelsImmediate access to the strongest models
StabilityThe model does not change until you change itThe provider updates it; behaviour can shift
CustomisationFine-tune freelyLimited to what the provider exposes
Maintenance timeHigh — drivers, updates, incidentsAlmost none

What actually works for a small team

Start on an API to prove the idea works and to learn what the job really demands. Once you know the volume and the quality bar, move the high-volume, easy portion in-house and keep the hard, low-volume portion on the API. Most systems that work well are hybrids, not a choice of side.

6.7 Licences — check before commercial use

Licence typeWhat it means in practice
Apache 2.0 / MITFull commercial use, modification allowed. The safest for business
Developer’s own licenceUsually commercial-friendly, but with conditions: user-count ceilings, attribution requirements, or prohibited use cases. Read it properly
Non-commercial / research onlyNo revenue-generating use, including internal use at a company that makes money indirectly. Image models are often like this
Gated (approval required)You must accept terms on the site before downloading, and those terms bind you

The check people forget: the licence on a modified model — fine-tuned, merged or quantized by a third party — always inherits the restrictions of its base. An uploader may write Apache 2.0, but if the base was restricted, the restriction stands. Trace it to the source before putting it near revenue.

What this chapter settles

Constraints eliminate more than 90% of the field before scores enter the conversation. Choose the smallest model that passes your own test set, not the leaderboard winner. And trace a licence back to the base model before you earn money with it.

The next chapter covers where models come from, and how to read a repository before you download from it.