← Blog

How to Make an LLM: A Realistic Developer's Guide

2026-09-18 · 5 min read · SubToAPI Team

If you're asking how to make an LLM, the honest answer depends on what you actually need: a model trained from scratch, a fine-tuned version of an existing model, or an application that behaves intelligently using a model someone else already built. These are three very different projects with wildly different costs, timelines, and skill requirements — and for 95% of developers, the third option is the right one.

This guide walks through all three paths so you can pick the one that matches your actual goal, not just the one that sounds impressive.

The Three Meanings of "Building an LLM"

1. Training a model from scratch

This means designing a transformer architecture, assembling a training corpus of hundreds of billions to trillions of tokens, and running distributed training on clusters of GPUs for weeks or months. It's how OpenAI, Anthropic, Google, and Meta build their frontier models.

Realistic requirements:

This path makes sense if you're a research lab, a well-funded startup with a genuinely novel architecture idea, or an organization with strict data sovereignty requirements that no existing provider can meet. It does not make sense if your goal is "an AI feature in my app."

2. Fine-tuning an existing open model

A more accessible middle ground: take an open-weight base model (Llama, Mistral, Qwen, and similar families) and adapt it to your domain using your own data.

Common approaches:

A basic LoRA fine-tune workflow looks like this:

from peft import LoraConfig, get_peft_model
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("base-model-name")
tokenizer = AutoTokenizer.from_pretrained("base-model-name")

lora_config = LoraConfig(
    r=16,
    lora_alpha=32,
    target_modules=["q_proj", "v_proj"],
    lora_dropout=0.05,
    task_type="CAUSAL_LM"
)

model = get_peft_model(model, lora_config)
# ... training loop on your dataset

Fine-tuning makes sense when you need consistent, specialized behavior — a support bot that must speak in a rigid tone, or a classifier that needs domain-specific accuracy a general model can't reach through prompting alone. It requires real ML skills (data preparation, evaluation, avoiding overfitting) but is orders of magnitude cheaper than training from scratch, often a few hundred to a few thousand dollars in compute.

3. Building an application on top of an existing LLM

This is what almost everyone actually needs, and it's the fastest path to something useful. Instead of building the model, you build the product: prompts, retrieval, tool calls, and orchestration logic around a model that's already trained and hosted.

A minimal example calling a hosted model:

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4",
    "max_tokens": 512,
    "messages": [
      {"role": "user", "content": "Summarize this support ticket in two sentences."}
    ]
  }'

This is "making an LLM-powered product," not "making an LLM," but it's what people mean 90% of the time they search for how to build one. You get frontier-level reasoning, streaming, and tool use without touching GPUs, training data pipelines, or evaluation harnesses.

How to Decide Which Path You Need

Ask these questions before writing any code:

  1. Do I need new knowledge or new behavior? New knowledge (facts, documents) is a retrieval problem, not a training problem — use RAG instead of fine-tuning.
  2. Do I need a specific style or format the model can't reliably produce via prompting? That's a fine-tuning case.
  3. Do I need the model to reason, summarize, extract, or converse using capabilities that already exist? That's an application-building case — connect to an existing model via API.
  4. Do I have a genuine reason no existing model can serve (data can never leave a private cluster, novel architecture research)? That's a from-scratch case.

Most teams land on option 3 and then discover the real engineering work isn't the model — it's authentication, rate limiting, streaming responses to the frontend, tracking usage per user or team, and giving teammates scoped API access without sharing one shared secret key. SubToAPI handles that layer: it turns your existing Claude access into application API keys (sub_live_...) with streaming, tool use, usage metadata, and team seats, so you can focus on the product logic instead of infrastructure plumbing. See the quickstart to get a key running in minutes, and the messages and streaming docs for the request formats.

A Practical Starting Point

If you're building an application rather than a model:

  1. Pick a use case narrow enough to test in a day (summarization, classification, extraction, chat).
  2. Get API access — sign up for a free trial and generate a key.
  3. Write a single, well-tested prompt before adding complexity like agents or tool chains.
  4. Add tool use once plain prompting hits a real limitation, not before.
  5. Monitor usage and cost per feature from day one — it's much harder to retrofit tracking later.

Compare the pricing tiers (Solo, Team, Scale) once you know your usage pattern; most solo projects start on Solo and move up as team size or request volume grows.

questions

Do I need to know machine learning to make an LLM-powered app? No. Building on top of an existing model via API requires software engineering skills — API calls, prompt design, handling streaming responses — not ML research. Training or fine-tuning a model does require ML knowledge.

How much does it cost to train an LLM from scratch? Costs range from hundreds of thousands to tens of millions of dollars depending on model size, driven mostly by GPU compute time and data curation. Fine-tuning an existing open model is far cheaper, often a few hundred to a few thousand dollars.

What's the fastest way to add LLM capabilities to a product? Call an existing hosted model's API rather than training one. You can have a working integration in under an hour using a service that provides API keys, streaming, and usage tracking on top of an existing model.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →