50 lines
1.8 KiB
Markdown
50 lines
1.8 KiB
Markdown
```
|
|
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
|
|
``` |