Skip to content

The best ChatGPT that $100 can buy.

Python
1.3 KB
Raw Blame
[project]
name = "nanochat"
version = "0.1.0"
description = "the minimal full-stack ChatGPT clone"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
    "filelock>=3.19.0",
    "kernels>=0.11.7",
    "numpy>=1.26.0",
    "psutil>=7.1.0",
    "pyarrow>=21.0.0",
    "rustbpe>=0.1.0",
    "tiktoken>=0.11.0",
    "torch==2.9.1",
    "wandb>=0.21.3",
]

[dependency-groups]
dev = [
    "ipykernel>=7.1.0",
    "matplotlib>=3.10.8",
    "pytest>=8.0.0",
    "python-dotenv>=1.2.1",
]

[tool.pytest.ini_options]
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]

# target torch to cuda 12.8 or CPU
[tool.uv.sources]
torch = [
    { index = "pytorch-cpu", extra = "cpu" },
    { index = "pytorch-cu128", extra = "gpu" },
]

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true

[project.optional-dependencies]
cpu = [
    "setuptools>=65.0.0",
    "torch==2.9.1",
]
gpu = [
    "torch==2.9.1",
]

[tool.uv]
default-groups = []
conflicts = [
    [
        { extra = "cpu" },
        { extra = "gpu" },
    ],
]