Imam Abubakar AI Research

Experiment · EXP-007

What changes if I stop treating the LLM as an API?

Hands-on model work: data, tokens, embeddings, attention, inference, and serving constraints.

I experimented with building and studying a language model so the stack would stop being a black box. The result was not a product replacement for hosted models. The result was a change in questions: representation, cost, quantization, and why a text box is not the system.

Hypothesis: Understanding internals would mainly make me better at picking models. It actually made me better at not asking models to be products.

Research question

What changes in the way I design AI products if I stop treating the language model as a remote intelligence API and work directly with the components underneath it?

Work covered

The experiment covered the model stack at a practical level: preparing data, tokenization, embeddings, transformer behaviour, attention, training, inference, context, serving constraints, and the effect of deployment choices such as quantization.

  • How raw information becomes training data
  • What tokenization keeps and discards
  • How embeddings represent meaning
  • What attention is doing inside a context window
  • What fine-tuning actually changes
  • What inference costs in memory, latency, and money
  • What quantization trades away

From information to response

Raw information
  → Dataset preparation
  → Tokens
  → Embeddings
  → Transformer blocks / attention
  → Trained weights
  → Serving / inference
  → Interface

What appears to the user as a simple text box is the final interface to that chain. Tokenization is part of the intelligence boundary: the model never receives language as humans experience it. Inference is a product decision, not only a model-quality decision. Quantization makes intelligence an engineering tradeoff.

What changed

The biggest result was not a new model product. It was a different set of engineering questions. Instead of asking only which model was strongest, I started asking what representation reaches the model, which information belongs in context, how expensive a request becomes, what happens when the model is wrong, and which responsibilities should live outside the model.

Finding

Hosted model APIs became less mysterious and more useful once I treated them as components with an input representation, an output contract, latency, cost, failure modes, and deployment constraints. That shift influenced nearly every later experiment in this archive.

Limitations

The training code, checkpoints, datasets, and logs are not yet published here. Until those artefacts are released, this entry documents the engineering work and the conclusions it changed, not a reproducible model-training benchmark.

Abubakar, Imam. "What changes if I stop treating the LLM as an API?." Imam Abubakar AI Research, 2026. https://imamabubakar.com/research/exp-007-build-a-small-lm

Research archive

This archive contains independent research, experiments, architecture studies, and technical observations. Some findings are exploratory and should not be interpreted as peer-reviewed scientific conclusions unless explicitly stated. Architecture studies of third-party products are based on publicly observable behaviour, published technical information, and engineering analysis. They are not claims of access to private source code or infrastructure.