Skip to content

Repository files navigation

PyThor

A decoder-only transformer (GPT-like) for code generation, trained from scratch using open datasets.

Project Structure

pythor/
├── src/pythor/          # Shared library package
│   ├── model.py         # Transformer architecture (CodeLLM)
│   ├── tokenizer.py     # Character-level tokenizer
│   ├── train.py         # Training loop & dataset utilities
│   └── config.py        # Configuration loading
├── api/                 # FastAPI web server
│   └── server.py
├── dashboard/           # CLI inference dashboard
│   └── app.py
├── scripts/             # Training & evaluation scripts
│   ├── train.py         # Train with question-answer dataset
│   ├── train_random.py  # Train with random/code dataset
│   └── eval.py          # Evaluate a trained model
├── web/                 # Frontend assets
│   └── index.html
├── configs/             # Configuration files
│   └── config.json
├── data/                # Datasets (gitignored)
├── models/              # Model checkpoints (gitignored)
└── outputs/             # Generated outputs (gitignored)

Quick Start

pip install -e .

# Train
python scripts/train_random.py

# Serve API
uvicorn api.server:app --reload

# Evaluate
python scripts/eval.py

Open web/index.html in a browser to use the frontend.

About

No description, website, or topics provided.

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages