## βš™οΈ Requerimentos Antes de comeΓ§ar, certifique-se de ter instaladas as dependΓͺncias principais: ### 🧱 Sistema e Build ```bash sudo apt update sudo apt install -y \ autoconf automake libtool \ build-essential pkg-config \ git python3 python3-venv python3-pip \ make ``` ## Passos 1. Execute `aclocal` para criar **aclocal.m4** e o diretΓ³rio **autom4te.cache/**. 2. Execute `autoconf` para gerar o script **configure**. 3. Execute `automake --add-missing` para criar os ficheiros **Makefile.in**. 4. Execute `./configure` para gerar os ficheiros **Makefile**. 5. Execute `make` para compilar e criar o executΓ‘vel. 6. Execute `src/myhomelab` para correr o executΓ‘vel. ## Alvos Extras ``` make git # commit + push automΓ‘tico make tarball # gera dist/myhomelab-src.tar.gz make release # publica release e cria tag automΓ‘tica ``` ``` myhomelab/ β”œβ”€ configure.ac β”œβ”€ Makefile.am β”œβ”€ README.md β”œβ”€ pyproject.toml # uv + ruff + (pytest) β”œβ”€ uv.lock β”œβ”€ src/ β”‚ └─ neuro/ β”‚ β”œβ”€ __init__.py β”‚ β”œβ”€ cli.py # entrypoints (tui / bench / repl) β”‚ β”‚ β”‚ β”œβ”€ tui/ β”‚ β”‚ β”œβ”€ app.py # Textual App β”‚ β”‚ β”œβ”€ screens.py # screens/modals β”‚ β”‚ β”œβ”€ widgets.py # componentes reutilizΓ‘veis β”‚ β”‚ └─ state.py # estado e store (sem IA aqui) β”‚ β”‚ β”‚ β”œβ”€ engine/ β”‚ β”‚ β”œβ”€ __init__.py β”‚ β”‚ β”œβ”€ session.py # Session, Chat/Prompt state β”‚ β”‚ └─ runtime.py # β€œorquestraΓ§Γ£o” do loop (streaming, cancel) β”‚ β”‚ β”‚ β”œβ”€ ai/ β”‚ β”‚ β”œβ”€ __init__.py β”‚ β”‚ β”œβ”€ config.py # dataclasses: dims, vocab, layers, seed β”‚ β”‚ β”œβ”€ tokenizer.py # tokenize/detokenize β”‚ β”‚ β”œβ”€ embeddings.py # tok->vec, pos enc β”‚ β”‚ β”œβ”€ transformer.py # forward() (minimo) β”‚ β”‚ β”œβ”€ head.py # logits/probs β”‚ β”‚ β”œβ”€ sampling.py # greedy, top-k, top-p, temp β”‚ β”‚ └─ model.py # Model = cola tudo (tokenize->sample) β”‚ β”‚ β”‚ β”œβ”€ utils/ β”‚ β”‚ β”œβ”€ logging.py β”‚ β”‚ β”œβ”€ rng.py β”‚ β”‚ └─ perf.py β”‚ β”‚ β”‚ └─ data/ β”‚ β”œβ”€ vocab.json # opcional no MVP β”‚ └─ tiny_weights.npz # opcional (se quiseres pesos fixos) β”‚ β”œβ”€ tests/ β”‚ β”œβ”€ test_tokenizer.py β”‚ β”œβ”€ test_sampling.py β”‚ └─ test_transformer_shapes.py └─ tools/ β”œβ”€ bench.py # microbench do forward/sampling └─ export_vocab.py ```