-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
61 lines (51 loc) · 1.69 KB
/
Copy pathpyproject.toml
File metadata and controls
61 lines (51 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "gemma4-pt-claude"
description = "Canonical PyTorch implementation of Gemma 4"
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
dynamic = ["version"]
dependencies = [
"torch>=2.1",
"sentencepiece",
"safetensors",
# Backend for HuggingFace tokenizer.json, which is the documented path.
"tokenizers",
]
[project.optional-dependencies]
audio = ["torchaudio>=2.1"] # resampling only; mel extraction is pure torch
image = ["pillow"] # PIL input to the image preprocessor
convert = ["jax", "orbax-checkpoint", "numpy"]
all = ["gemma4-pt-claude[audio,image]"]
dev = ["pytest", "pytest-timeout", "pillow", "numpy", "torchaudio>=2.1", "ruff"]
[project.scripts]
gemma4-convert = "gemma4_pt_claude.convert:main"
[tool.pdm.version]
source = "file"
path = "src/gemma4_pt_claude/version.py"
[tool.pdm.build]
includes = ["src/gemma4_pt_claude", "src/gemma4_pt_claude/py.typed"]
package-dir = "src"
[tool.pdm.dev-dependencies]
test = ["pytest", "pytest-timeout"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: tests that take more than a second or two",
]
[tool.ruff]
line-length = 120
src = ["src", "tests"]
target-version = "py310"
[tool.ruff.lint]
# Correctness rules only; import ordering and pyupgrade rewrites are left off so
# linting never demands a codebase-wide reshuffle.
select = ["E", "F", "W", "B"]
ignore = [
"E741", # ambiguous names like `l` are conventional for sequence length
"B905", # zip(strict=) reads poorly where lengths are already validated
]
[tool.ruff.lint.per-file-ignores]
"src/gemma4_pt_claude/__init__.py" = ["F401"] # re-exports