|
Some checks are pending
Python Code Quality / lock_file (push) Waiting to run
Python Code Quality / linting (push) Blocked by required conditions
Python Code Quality / formatting (push) Blocked by required conditions
Python Code Quality / type_consistency (push) Blocked by required conditions
Python Code Quality / tests (push) Blocked by required conditions
Python Code Quality / build (push) Blocked by required conditions
|
||
|---|---|---|
| .gitea | ||
| src | ||
| .gitignore | ||
| configure.ac | ||
| Makefile.am | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
⚙️ Requerimentos
Antes de começar, certifique-se de ter instaladas as dependências principais:
🧱 Sistema e Build
sudo apt update
sudo apt install -y \
autoconf automake libtool \
build-essential pkg-config \
git python3 python3-venv python3-pip \
make
Passos
- Execute
aclocalpara criar aclocal.m4 e o diretório autom4te.cache/. - Execute
autoconfpara gerar o script configure. - Execute
automake --add-missingpara criar os ficheiros Makefile.in. - Execute
./configurepara gerar os ficheiros Makefile. - Execute
makepara compilar e criar o executável. - Execute
src/neuropara correr o executável.
Alvos Extras
make git # commit + push automático
make tarball # gera dist/neoricalex-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