Metadata-Version: 2.4
Name: llmcompoz
Version: 0.1.0
Summary: Compose a language model from scratch — and learn how it works. PySide6 educational GUI + CLI.
Author: Bayram Kotan
License-Expression: MIT
Project-URL: Homepage, https://github.com/bayramkotan/LLMcompoz
Project-URL: Repository, https://github.com/bayramkotan/LLMcompoz
Project-URL: Issues, https://github.com/bayramkotan/LLMcompoz/issues
Keywords: llm,gpt,transformer,education,pyside6,from-scratch
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Education
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.1
Requires-Dist: PySide6>=6.6
Provides-Extra: bpe
Requires-Dist: tiktoken>=0.5; extra == "bpe"
Dynamic: license-file

# LLMcompoz

**Compose a language model from scratch — and learn how it works.**

LLMcompoz is a PySide6 desktop app (with a matching Qt-free CLI) that walks you
through building a GPT-style language model from nothing: a tokenizer you can
watch split text, a transformer you assemble block by block, a training loop
that draws its own loss curve, and a generation panel where you scrub
`temperature` and `top-k` and watch tokens appear one at a time.

Nothing is hidden behind a framework `Trainer`. Every core file is meant to be
read top to bottom — the attention math, the training step, the sampling loop.

## The six stages (tabs)

1. **📄 Veri** — load text; see character/token counts and vocab size
2. **🔤 Tokenizer** — char vs BPE; live view of a sentence splitting into ids
3. **🧠 Model** — set layers/heads/embedding; live parameter count
4. **🏋️ Eğitim** — live loss curve, step logs, checkpoints
5. **✨ Üretim** — prompt in, tokens out, live; play with temperature/top-k
6. **📚 Öğren** — concept notes explaining what happens under each stage

## Layout

```
src/llmcompoz/
├── core/          # the actual ML — readable, framework-free
│   ├── tokenizer.py   # CharTokenizer + from-scratch BPE
│   ├── attention.py   # multi-head causal self-attention
│   ├── model.py       # GPT: embeddings -> blocks -> head
│   ├── trainer.py     # explicit training loop with callbacks
│   ├── sampler.py     # generation helper
│   └── config.py      # ModelConfig / TrainConfig dataclasses
├── gui/           # PySide6 UI (panels wire into core via callbacks)
├── learn/         # educational content
└── cli.py         # Qt-free llmcompoz command
```

## Quick start

**Windows (PowerShell)**
```powershell
cd C:\Github\LLMcompoz
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
llmcompoz info
llmcompoz train .\data\tiny.txt --steps 500
llmcompoz-gui
```

**Linux / CachyOS (Bash)**
```bash
cd ~/Github/LLMcompoz
python -m venv .venv
source .venv/bin/activate
pip install -e .
llmcompoz info
llmcompoz train ./data/tiny.txt --steps 500
llmcompoz-gui
```

## Status

`v0.1.0` — scaffold: working core (tokenizer, model, trainer, sampler), CLI,
and a six-tab GUI shell. Panels are placeholders to be filled in next.

## License

MIT
