Spoken-English math to Typst math with a small from-scratch Transformer: synthetic data generator, BPE tokenizer, training, constrained/beam decoding, and evaluation against a hand-written test set. The trained model is not tracked; ./run.sh produces it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
51 lines
1.1 KiB
TOML
51 lines
1.1 KiB
TOML
[project]
|
|
name = "isotope-typst"
|
|
version = "0.1.0"
|
|
description = "Spoken-English math -> Typst math with a small Transformer"
|
|
readme = "README.md"
|
|
authors = [
|
|
{ name = "Paul Tal", email = "[email protected]" }
|
|
]
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"numpy>=2.5.5",
|
|
"tokenizers>=0.23.3",
|
|
"torch>=2.15.0",
|
|
"tqdm>=4.70.1",
|
|
]
|
|
|
|
[project.scripts]
|
|
isotope = "isotope_typst.translate:main"
|
|
isotope-gen = "isotope_typst.generate:main"
|
|
isotope-tokenizer = "isotope_typst.tokenizer:main"
|
|
isotope-train = "isotope_typst.train:main"
|
|
isotope-eval = "isotope_typst.evaluate:main"
|
|
isotope-pipeline = "isotope_typst.pipeline:main"
|
|
isotope-pathb = "isotope_typst.pathb:main"
|
|
isotope-paraphrase = "isotope_typst.paraphrase:main"
|
|
|
|
[build-system]
|
|
requires = ["uv_build>=0.13.9,<0.14.0"]
|
|
build-backend = "uv_build"
|
|
|
|
[dependency-groups]
|
|
byt5 = [
|
|
"accelerate>=1.16.0",
|
|
"datasets>=5.2.0",
|
|
"transformers>=5.24.1",
|
|
]
|
|
dev = [
|
|
"pytest>=9.2.0",
|
|
"ruff>=0.17.6",
|
|
]
|
|
pathb = [
|
|
"mlx-lm>=0.32.2",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 130
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
filterwarnings = ["ignore:enable_nested_tensor"]
|