TECHNOPKG BLOG / HANDS-ON TUTORIAL

AI architectures, explained through seven experiments

From tokens and sentence representations to refinement, compact states, and prediction.

By DhirajKumar Pathak · TechnoPKG · Tutorial version 1.0

Read this first: these are bounded educational algorithms, not seven trained models. The LLM page additionally supports an explicit real local Ollama call after sign-in. Simulations require no model downloads and do not establish speed, accuracy, quantum advantage, or research novelty.

What you will learn

  1. Distinguish a model family, a generation mechanism, and a small teaching example.
  2. Change one input and predict its effect before executing the example.
  3. Inspect intermediate stages and verify outputs against explicit expectations.
  4. Record limitations before drawing a research conclusion.

A plain-language glossary

TermMeaning in this lab
Model / architecture / weightsA model is a fitted computational system. Architecture specifies its structure. Weights are the numeric parameters learned in training.
Training / inferenceTraining adjusts weights from data. Inference uses those weights for a new input. This patch trains no neural models.
Token / autoregressiveA tokenizer maps text to learned units, often word pieces. Autoregressive generation predicts each next token from prior context. Whitespace chunks here are only a visual approximation.
Embedding / latent representationA numeric representation used inside a model. It need not be readable language. Similar representations can support comparison, but similarity alone does not prove truth.
ConceptA paper-specific representation, not proof of human-like understanding. NCM's learned codes differ from LCM's sentence embeddings.
VQ / autoencoderVector quantization maps representations to entries in a discrete codebook. An autoencoder learns to encode input and reconstruct it through a decoder.
Coarse-to-fine / parallelStart with broad representations, then add detail. Parallel positions are predicted together within a level; levels can still depend on earlier levels.
Cosine similarity / bag of wordsCosine compares vector directions. Bag of words counts vocabulary terms and ignores word order. It cannot reliably capture synonyms or negation.
Mask / denoising / diffusionA mask hides a position. A trained denoiser learns to infer or revise corrupted information. Our masked reveal demo already knows its target.
Dynamic programming / stateReuse intermediate solutions instead of repeating work. Here a state is a reachable sum; this is classical computation, not learned continuous thought.
JEPA / world modelJoint Embedding Predictive Architecture predicts representations. A world model predicts environmental evolution; the term does not guarantee correct physical understanding.
Convolution / attention / softmaxConvolution mixes nearby inputs with a filter. Attention weights relevant information. Softmax turns scores into positive weights totaling one. Our local average is only a simple filter.
Baseline / benchmark / reproducibilityA baseline is a comparison method. A benchmark is a defined evaluation. Reproducibility requires recorded inputs, software, model versions, settings, and hardware.
Latency / throughput / memoryLatency is elapsed response time; throughput is work per unit time; memory is peak storage used during execution. Only live wall time is recorded here. It includes loading and transport; memory and tokenizer throughput are not measured.
Invariant / expected resultAn invariant is a property that must hold, such as attention summing to one. An expected result is independently specified for a test input. Neither establishes architecture superiority.

Before the first test

  1. Open Portal → AI Demo. On a phone, use the visible AI Demo shortcut. The desktop AI Demo menu lists each architecture and this tutorial.
  2. Choose an example. The page explains its mechanism and its implementation boundary.
  3. Keep Educational simulation selected for reproducible tests. No sign-in is required for these bounded examples.
  4. Click Load default, inspect the JSON, and predict the result.
  5. Click Run example. Read the result and checks, then use Previous stage / Next stage or the slider.
  6. Download result JSON before changing inputs. Loading another case invalidates the old report.
  7. Click Load alternate and run again. Use Previous / Next demo to move both ways; All AI Demos and Portal return to the parent pages.

EXPERIMENT 01

LLM · Token generation

What the term means

Large Language Model. An autoregressive LLM estimates the next token from previous tokens. A token can be a word fragment, punctuation, or another learned unit.

What this example actually does

Offline mode splits a deterministic template into whitespace chunks, not actual tokenizer tokens. Optional live mode runs the configured local Ollama model; it does not expose hidden reasoning.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "ordered": 100,
  "received": 80
}

Expected: Default: shortage 20 units. Alternate: shortage 0 units.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "ordered": 75,
  "received": 75
}

Test C: investigate a boundary

Change received from 80 to 100. Does the summary keep the numbers correct? In live mode, compare wording while checking every factual claim.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

Offline mode splits a deterministic template into whitespace chunks, not actual tokenizer tokens. Optional live mode runs the configured local Ollama model; it does not expose hidden reasoning.

Primary paper or implementation →

EXPERIMENT 02

NCM · Coarse to fine

What the term means

Next-Concept Modeling. Research NCM learns hierarchical discrete codes with a multiscale residual vector-quantized autoencoder, then predicts each level with parallel positions within that level.

What this example actually does

Here the codes are hand-designed labels and the decoder is a text template. There is no trained VQ tokenizer or NCM transformer. Stage counts are not a speed benchmark.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "demand": 100,
  "supply": 80
}

Expected: Default: shortage 20 and EXPEDITE. Alternate: shortage 0 and NO_SHORTAGE.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "demand": 60,
  "supply": 90
}

Test C: investigate a boundary

Change supply across the demand boundary. Inspect how the coarse classification, detailed codes, and decoded sentence change together.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

Here the codes are hand-designed labels and the decoder is a text template. There is no trained VQ tokenizer or NCM transformer. Stage counts are not a speed benchmark.

Primary paper or implementation →

EXPERIMENT 03

LCM · Sentence representations

What the term means

Large Concept Model. Meta LCM predicts the next sentence embedding in a representation space, using sentence encoding and decoding. It is distinct from NCM.

What this example actually does

This example computes bag-of-words vectors and cosine similarity, then selects a sentence. It neither uses SONAR embeddings nor predicts a new sentence with a trained LCM.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "sentences": [
    "Supplier delivery is late.",
    "Supplier shipment is delayed.",
    "The machine needs maintenance."
  ],
  "query": "supplier delivery"
}

Expected: Default: sentence 1 ranks first. Alternate: sentence 2 ranks first.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "sentences": [
    "Supplier delivery is late.",
    "The machine needs maintenance."
  ],
  "query": "machine maintenance"
}

Test C: investigate a boundary

Replace the query with machine maintenance. Then try a synonym absent from the sentences: this exposes the lexical representation limitation.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

This example computes bag-of-words vectors and cosine similarity, then selects a sentence. It neither uses SONAR embeddings nor predicts a new sentence with a trained LCM.

Primary paper or implementation →

EXPERIMENT 04

Diffusion · Iterative refinement

What the term means

Diffusion Language Model. Masked diffusion language models iteratively predict or revise masked text positions. Different diffusion formulations use different corruption and sampling processes.

What this example actually does

The target sentence is already known here. A deterministic reveal schedule illustrates masking; no denoiser is trained, no text is inferred, and this is not a diffusion benchmark.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "target": "Review supplier delivery before releasing the order.",
  "passes": 3
}

Expected: All masks are resolved; the final text equals target. Requested passes are shown, including any no-op pass.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "target": "Stock is available.",
  "passes": 2
}

Test C: investigate a boundary

Change passes to 1 and then 5. Compare intermediate masks. More displayed passes here do not imply better model quality.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

The target sentence is already known here. A deterministic reveal schedule illustrates masking; no denoiser is trained, no text is inferred, and this is not a diffusion benchmark.

Primary paper or implementation →

EXPERIMENT 05

Latent reasoning · State analogy

What the term means

Latent / Continuous Reasoning. Latent reasoning research performs intermediate computation in learned hidden representations. Coconut is one research example of continuous thought.

What this example actually does

This is classical dynamic programming over integer sums. It is an analogy for compact internal states, not a neural latent reasoner or a view into a model's private thoughts.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "weights": [
    3,
    4,
    6
  ],
  "target": 7
}

Expected: Default: feasible, indices [0,1], weights [3,4], sum 7. Alternate: infeasible.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "weights": [
    4,
    6
  ],
  "target": 7
}

Test C: investigate a boundary

Try an unreachable target and repeated weights. Check that each item index is used at most once and that infeasibility is explicit.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

This is classical dynamic programming over integer sums. It is an analogy for compact internal states, not a neural latent reasoner or a view into a model's private thoughts.

Primary paper or implementation →

EXPERIMENT 06

JEPA · State prediction analogy

What the term means

Joint Embedding Predictive Architecture. JEPA predicts representations of missing or future information. V-JEPA applies this direction to video; action-conditioned world models can support planning.

What this example actually does

This demo extrapolates numeric positions at constant velocity. It has no images, learned encoder, physical understanding, or V-JEPA weights.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "positions": [
    0,
    2,
    4
  ],
  "actual_next": 6
}

Expected: Both predict 6. Default absolute error 0; alternate absolute error 3.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "positions": [
    0,
    2,
    4
  ],
  "actual_next": 9
}

Test C: investigate a boundary

Change actual_next to 9 or provide accelerating positions. Observe failure of the constant-velocity assumption.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

This demo extrapolates numeric positions at constant velocity. It has no images, learned encoder, physical understanding, or V-JEPA weights.

Primary paper or implementation →

EXPERIMENT 07

Hybrid · Local and global context

What the term means

Efficient Hybrid Model. Hybrid is a broad design category. For example, LFM2 combines gated short convolutions with attention; efficiency depends on implementation and hardware.

What this example actually does

A moving average and scalar dot-product softmax are teaching components, not LFM2, a trained model, or a hardware performance claim.

Open this interactive example →

Test A: default case

  1. Click Load default. Confirm the input below.
  2. Click Run example in Educational simulation mode.
  3. Read the result, inspect all stages, and check the stated expected outcome.
  4. Download the JSON result for your experiment record.
{
  "values": [
    2,
    4,
    6,
    8
  ],
  "window": 2,
  "query": 1
}

Expected: Default local features [2,3,5,7]; context about 6.675. With query 0, attention is uniform and context is 4.25.

Test B: alternate case

  1. Click Load alternate. The old output is invalidated.
  2. Confirm the alternate input below, then click Run example.
  3. Compare the outcome with Test A. Explain which input caused the difference.
{
  "values": [
    2,
    4,
    6,
    8
  ],
  "window": 2,
  "query": 0
}

Test C: investigate a boundary

Set query to 0 to get uniform attention, then change window. Observe how local smoothing changes the globally weighted context.

Validation test: change a required numeric value to a quoted word (or sentences/target to an empty value for a text example). Run it. Expect a validation message, no new result, and no downloadable stale report. Restore the default to continue.

Research boundary

A moving average and scalar dot-product softmax are teaching components, not LFM2, a trained model, or a hardware performance claim.

Primary paper or implementation →

Optional: run a real local LLM

  1. Sign in to your existing portal account.
  2. Open AI Demo → LLM. Select Real local LLM.
  3. Load the default input: ordered 100, received 80.
  4. Click Run example. The server calls only its configured loopback Ollama service with its configured default model. The provider picker elsewhere on the portal does not override this choice.
  5. Expect a short summary that should state a shortage of 20. Read it yourself; the UI deliberately does not auto-pass generated text.
  6. Check the displayed model name and elapsed milliseconds, and download the result.
  7. Wait at least 15 seconds before another run. Load alternate: ordered 75, received 75; expected shortage 0.
  8. If Ollama is unavailable, expect an explicit error. There is no fabricated output or cloud fallback. Educational simulation still works.

Defaults use a 3-second connect timeout and 45-second read timeout, at most two concurrent live requests per worker, and a 15-second per-user cooldown per worker. This is a demo guard, not a cluster-wide quota system. Configure proxy limits for public-scale deployment. No user-supplied model name, URL, or arbitrary prompt is accepted.

Common observations and how to interpret them

Turn the learning lab into actual R&D

Start with a narrow question: which supported model produces accurate technical summaries under a fixed resource limit? Obtain actual implementations and compatible weights, check their licenses, and record checkpoint hashes. The current simulations are not evidence for that question.

  1. Define a fixed dataset, expected facts, evaluation rubric, and holdout split before testing.
  2. Use a common task and report differences in model size, training data, decoding settings, and output length. A task comparison alone cannot isolate architecture effects.
  3. Record hardware, package versions, warm versus cold state, random seeds, and repeated measurements.
  4. Measure quality, median and tail latency, throughput using each real tokenizer, and peak CPU/GPU memory with appropriate instrumentation.
  5. Keep raw outputs, failed runs, and counterexamples. Report distributions and uncertainty, not a single best run.
  6. Separate prompt orchestration from architectural changes. A normal LLM prompted to think in concepts remains the original LLM.

A research contribution may come from a new controlled benchmark, an improved method, or a reproducible finding. Adding a model to this portal alone is not evidence of novelty.