Metadata-Version: 2.4
Name: llm-research-lab
Version: 0.1.0
Summary: Reproducible local tooling for small language-model research
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/AlejandroSilvaMendez/llm-research-lab
Project-URL: Issues, https://github.com/AlejandroSilvaMendez/llm-research-lab/issues
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: numpy>=2.5.5
Requires-Dist: psutil>=7.2.2
Requires-Dist: pyarrow>=26.0.1
Requires-Dist: tokenizers>=0.23.3
Provides-Extra: model
Requires-Dist: torch<3,>=2.9.1; extra == "model"
Dynamic: license-file

# LLM Research Lab

LLM Research Lab is a local research codebase for building and evaluating small language models from randomly initialized weights. It makes corpus provenance, tokenizer behavior, checkpoint recovery, and held-out evaluation inspectable at each stage.

## What is here

- **Data processing** with revision-pinned inputs, provenance and license records, filtering, deduplication, and reproducible split manifests.
- **Tokenization and modeling** with byte-level BPE and a compact PyTorch decoder with rotary position embeddings and tied input and output weights.
- **Training and evaluation tooling** for reproducible configuration, checkpointing, inference, and explicit separation of held-out data.

The first experimental model, **GEN-00**, has approximately 6.9 million parameters. A documented local run completed 6,000 pretraining steps. Held-out evaluation measured 3.450 nats per target, and qualitative outputs included repetition and factual errors. The measurements describe a research prototype. [Training report](docs/reports/phase-06.md) · [Evaluation report](docs/reports/phase-07.md)

## Quick start

Python 3.12 on Linux or WSL is the reference environment. Follow [Installation](docs/installation.md) for the installable package and the separate contributor workflow, then run the small [offline examples](docs/examples.md). The examples build a tokenizer from hand-written fixtures and run a single inference pass with synthetic input. They require no corpus, checkpoint, GPU, or model service.

```bash
export PYTHONPATH="$PWD/src"
python -m pytest -q
python -m unittest discover -s scripts/data
```

The repository contains source code, configurations, and selected research reports. Corpus downloads, held-out examples, local caches, and model checkpoints are stored separately. See [Data governance](docs/07_data_governance.md) for asset-specific terms and [the project status](PROJECT_STATUS.md) for current experiments.

## Project guides

| Guide | Scope |
| --- | --- |
| [Installation](docs/installation.md) | Isolated CPU setup and local checks |
| [Examples](docs/examples.md) | Offline tokenizer round-trip and decoder inference |
| [Data engine](docs/data-engine.md) | Corpus workflow and local acquisition controls |
| [Model and training](docs/model.md) | Architecture, model contract, and research workflow |
| [Roadmap](ROADMAP.md) | Phase history and research gates |

## Contributing and licensing

Read [Contributing](CONTRIBUTING.md), the [Code of Conduct](CODE_OF_CONDUCT.md), and the [Security Policy](SECURITY.md). Project-owned source code and documentation are licensed under [Apache 2.0](LICENSE). The [NOTICE](NOTICE) describes the scope and third-party attributions.
