tensorless 0.7.0__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tensorless-0.7.0/tensorless.egg-info → tensorless-0.9.0}/PKG-INFO +1 -1
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/training.md +4 -3
- {tensorless-0.7.0 → tensorless-0.9.0}/pyproject.toml +1 -1
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/config.py +1 -1
- tensorless-0.9.0/tensorless/data/english_grammar.txt +1450 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/mlp.py +15 -2
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/transformer.py +30 -3
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/runtime.py +4 -1
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/early_stopping.py +1 -1
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/trainer.py +3 -3
- {tensorless-0.7.0 → tensorless-0.9.0/tensorless.egg-info}/PKG-INFO +1 -1
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_tabular.py +3 -2
- tensorless-0.7.0/tensorless/data/english_grammar.txt +0 -262
- {tensorless-0.7.0 → tensorless-0.9.0}/LICENSE +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/MANIFEST.in +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/README.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/api_reference.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/architecture.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/automatic_mode.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/checkpointing.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/cli.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/configuration.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/contributing.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/examples.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/inference.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/installation.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/limitations.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/quickstart.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/roadmap.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/tl_format.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/troubleshooting.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/docs/tutorial.md +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/examples/tabular_classification_example.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/examples/tabular_regression_example.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/examples/text_classification_example.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/examples/text_generation_example.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/setup.cfg +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/_version.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/api.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/detector.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/jax_backend.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/mlx_backend.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/checkpoint/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/checkpoint/manager.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/cli/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/cli/main.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/config.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/fingerprint.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/inspector.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/loader.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/tabular.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/device.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/memory.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/engine.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/errors.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/registry.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/serialization/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/serialization/tl_format.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/bpe_tokenizer.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/char_tokenizer.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/__init__.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/data_prep.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/SOURCES.txt +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/dependency_links.txt +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/entry_points.txt +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/requires.txt +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/top_level.txt +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_auto_detection.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_checkpoint_resume.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_cli.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_data_loading.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_end_to_end.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_fingerprint.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_jax_backend.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_mlx_backend.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_serialization.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_text_classification.py +0 -0
- {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_text_generation.py +0 -0
|
@@ -95,9 +95,10 @@ By default, Tensorless holds out `val_split` of the data (10% for
|
|
|
95
95
|
datasets with 50+ examples, 0% for smaller ones where a held-out split
|
|
96
96
|
wouldn't be meaningful) and tracks validation loss after each epoch. If
|
|
97
97
|
validation loss doesn't improve by at least `min_delta` for `patience`
|
|
98
|
-
consecutive epochs, training stops early. The automatic default is
|
|
99
|
-
consecutive epochs
|
|
100
|
-
|
|
98
|
+
consecutive epochs, training stops early. The automatic default is 5
|
|
99
|
+
consecutive epochs. Before the completed model is written to the `.tl` output
|
|
100
|
+
file, Tensorless restores the weights from the epoch with the best validation
|
|
101
|
+
loss. This applies equally to regular training and built-in pretraining.
|
|
101
102
|
|
|
102
103
|
## Checkpointing during training
|
|
103
104
|
|
|
@@ -125,7 +125,7 @@ def resolve_config(ds: Dataset, user: TrainConfig) -> ResolvedConfig:
|
|
|
125
125
|
grad_clip=user.grad_clip if user.grad_clip is not None else 1.0,
|
|
126
126
|
warmup_steps=user.warmup_steps if user.warmup_steps is not None else min(100, max(1, n // 10)),
|
|
127
127
|
val_split=user.val_split if user.val_split is not None else (0.1 if n >= 50 else 0.0),
|
|
128
|
-
patience=user.patience if user.patience is not None else
|
|
128
|
+
patience=user.patience if user.patience is not None else 5,
|
|
129
129
|
min_delta=user.min_delta if user.min_delta is not None else 1e-4,
|
|
130
130
|
device=device,
|
|
131
131
|
precision=precision,
|