Your reading comfort
TRACK 2

⚙️ Local engine

Move from a design on paper to real inference in Portuguese.

2 modules 12 topics 70–100 min with practice 12 exercises
Understand Try Verify LAYA / INEMA · conceptual flow
Your progress

Track map

2.1 35–50 min

⚙️ Installation and first inference

Run real weights on your machine.

2.2 35–50 min

⚙️ Router, context, and processing

Avoid routing an input to the wrong model.

Detailed content

MODULE 2.1

Installation and first inference

Run real weights on your machine.

What it is

The clone includes the SDK and the practical application; the weights are downloaded separately from Hugging Face.

Why learn

Cloning the Git doesn’t automatically download the checkpoint.

Key concepts

Clone

versioned code

Venv

Python isolation

Checkpoint

trained weights

Cache

downloaded files

What it is

The app uses CPU by default, letting you experiment without a compatible GPU.

Why learn

Don’t copy the published 33 ms to describe your machine.

Key concepts

CPU

general execution

CUDA

NVIDIA acceleration

Fallback

alternate device

Environment

real versions

What it is

The adaptation preloads only multilingual, using the corresponding subdirectory from the model repository.

Why learn

Preloading all models may be suitable for mixed traffic, but increases resident memory.

Key concepts

Preload

preloading

Resident

model in memory

Subfolder

bundle variant

Memory

weights and intermediates

What it is

The triage command accepts an optional message and subject, runs the four questions, and prints JSON.

Why learn

The command must exit with an error when the input is invalid or the model fails.

Key concepts

CLI

command interface

Exit code

process result

Answers

predictions

Policy

operational decision

What it is

The fork starts from the upstream commit recorded in the documentation.

Why learn

If a result changes, compare these identities first.

Key concepts

Review

exact commit

Snapshot

weights version

Dependency

library

Reproduction

repeat conditions

What it is

Start by identifying the failure layer: import, download, loading, tokenization, or the forward pass.

Why learn

The lab exposes failures in the API and does not invent a substitute classification.

Key concepts

Diagnosis

find the layer

minimal fix

local intervention

Smoke test

short run

explicit error

recognizable failure

View Full →
MODULE 2.2

Router, context, and processing

Avoid routing an input to the wrong model.

What it is

Router.route can select a checkpoint without executing the neural network.

Why learn

The current code should take precedence over simplified diagrams.

Key concepts

Routing

pre-selection

Override

explicit indication

Script

writing system

Workflow

specialized scheme

What it is

Portuguese uses the Latin alphabet, like English, and very short messages provide little evidence for automatic detection.

Why learn

A simple rule based on reliable product information can beat a language heuristic.

Key concepts

Known language

reliable metadata

short text

little evidence

Heuristic

approximation

Linguistic contract

scope

What it is

The internal prompt reserves space for the question and options; the rest fits the state.

Why learn

The SDK may truncate the state.

Key concepts

Token

tokenizer unit

Head

question and options

State

ticket content

Truncation

input loss

What it is

Each alternative needs enough bullets and text to remain distinguishable.

Why learn

One alternative is hierarchy: pick a family first, then a subcategory.

Key concepts

Cardinality

number of classes

Hierarchy

selection stages

Propagation

chained error

Description

discriminative signal

What it is

The default Router keeps only a few hot models and can evict the least recently used one.

Why learn

Measurements must distinguish the hot path from the first load and the swaps.

Key concepts

LRU

eviction by use

Hot path

loaded model

Cold start

first load

Lock

serialized access

What it is

Laya groups questions from one state into a single call.

Why learn

Comparing milliseconds without declaring measurement boundaries leads to fragile conclusions.

Key concepts

Batch

batch of questions

p50

median

p95

latency tail

Throughput

units per second

View Full →
Module reading