Metadata-Version: 2.5
Name: psannlm
Version: 2.0.1
Summary: PSANN-LM: language modeling and training utilities for PSANN
Project-URL: Homepage, https://github.com/Nickm1128/psann
Project-URL: Repository, https://github.com/Nickm1128/psann
Project-URL: Issues, https://github.com/Nickm1128/psann/issues
Project-URL: Documentation, https://github.com/Nickm1128/psann/tree/main/docs
Author: Nicholas Milinkovich
License: MIT License
        
        Copyright (c) 2025 Nicholas Milinkovich
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
License-File: LICENSE
Keywords: language-modeling,psann,pytorch,sine,transformers
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: datasets>=2.14
Requires-Dist: huggingface-hub>=0.16.4
Requires-Dist: numpy>=1.23
Requires-Dist: psann>=2.0.1
Requires-Dist: pyyaml>=6.0
Requires-Dist: sentencepiece>=0.1.99
Requires-Dist: tokenizers>=0.13
Requires-Dist: torch>=2.1
Provides-Extra: evaluation
Requires-Dist: lm-eval>=0.4; extra == 'evaluation'
Provides-Extra: language-filter
Requires-Dist: langdetect>=1.0.9; extra == 'language-filter'
Provides-Extra: training-extras
Requires-Dist: bitsandbytes>=0.41; extra == 'training-extras'
Requires-Dist: transformers>=4.30; extra == 'training-extras'
Description-Content-Type: text/markdown

# PSANN-LM

Language-model tasks for PSANN, packaged separately as `psannlm`. Version **2.0.1** requires `psann>=2.0.1` and uses the typed task and architecture configuration API as its authoritative public surface.

Install core first, then this directory with `python -m pip install ./psannlm` from the repository root. PyTorch, NumPy, SentencePiece, tokenizers, datasets, Hugging Face Hub, and PyYAML are declared runtime dependencies.

Use `PSANNLM`, `PSANNLMDataPrep`, `LMConfig`, and `LMArchitectureConfig` from `psannlm`. Select one of four architecture kinds: transformer, residual, wave, or geometric-sparse. Spectral residual is a nested residual policy. Train with `model.fit(data, train=TrainConfig(...))`, generate with `model.generate(...)`, and persist with `save`/`load`.

```sh
python -m psannlm --help
python -m psannlm train --help
python -m psannlm generate --help
```

The [LM guide](https://github.com/Nickm1128/psann/blob/main/docs/lm.md) covers a complete small training example, YAML, tokenizer identity, and schema-v1 model/trainer checkpoints. The repository [migration guide](https://github.com/Nickm1128/psann/blob/main/docs/migration.md) documents compatibility routes for older applications and artifacts. Core-only installations do not contain this package; LM artifacts contain no core package files.
