Metadata-Version: 2.4
Name: modelmakerlibrary
Version: 0.1.2
Summary: Python tools for dataset preparation and neural-network experiments
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/IshaanShivalli/modelMakerLibrary
Project-URL: Repository, https://github.com/IshaanShivalli/modelMakerLibrary
Project-URL: Issues, https://github.com/IshaanShivalli/modelMakerLibrary/issues
Project-URL: Documentation, https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/index.md
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: numpy
Requires-Dist: transformers
Requires-Dist: tokenizers
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: safetensors
Requires-Dist: tsv
Dynamic: license-file

# ModelMakerLibrary

ModelMakerLibrary is a Python library for dataset preparation, neural-network
construction, and small byte-level text-generation experiments built on
PyTorch.

## Install

```shell
python -m pip install modelmakerlibrary
```

The package installs its required runtime dependencies, including PyTorch,
Torchvision, Transformers, pandas, and Matplotlib. The standard PyTorch wheels
are suitable for CPU use; consult the official PyTorch installation selector
for GPU-specific builds. TPU support is optional and requires a compatible
PyTorch/XLA installation in a supported environment.

## Quick start

```python
import modelMakerLibrary as mml

dataset = mml.load_dataset("data/text", model_type="text")
train_set, test_set = mml.split_dataset(dataset, train_ratio=80)
train_batches = mml.data_loader(train_set, batch_size=8, shuffle=True)

result = mml.train_text_generator(
    dataset_path="data/text",
    output_path="output/text_generator.pt",
    epochs=2,
    device="cpu",
)
model = mml.load_text_generator(result["checkpoint_path"])
print(mml.generate_text(model, "A short prompt", max_new_tokens=40))
```

For text generation, the input path can contain UTF-8 `.txt`, `.json`, `.csv`,
or `.tsv` files. JSON records use a `text` field; CSV and TSV files need a
`text` column. See the [Dataset guide](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/datasets.md)
for directory layouts and supported media types.

Training saves the checkpoint after each epoch. To continue training a
previous checkpoint, pass its path as `resume_from`; see the
[model guide](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/models.md).

## Documentation

- [Documentation index](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/index.md)
- [Installation and compatibility](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/installation.md)
- [Quickstart and examples](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/quickstart.md)
- [Public API reference](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/api.md)
- [Dataset loading and conversion](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/datasets.md)
- [Models, training, and checkpoints](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/models.md)
- [Accelerator setup](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/accelerators.md)
- [Source module guide](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/source-modules.md)
- [Development and testing](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/development.md)
- [PyPI publishing and releases](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/docs/publishing.md)

The self-contained [Python example](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/examples/api_quickstart.py)
creates its own small dataset. The
[Jupyter notebook](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/examples/modelmaker_quickstart.ipynb)
also includes local Jupyter, Google Colab, and Kaggle setup instructions.

## License

This project is licensed under the Apache License 2.0. See the
[LICENSE](https://github.com/IshaanShivalli/modelMakerLibrary/blob/main/LICENSE)
for the full text.
