ml-pretrained


Nameml-pretrained JSON
Version 0.0.46 PyPI version JSON
download
home_pagehttps://github.com/codekansas/ml-pretrained
SummaryML project template repository
upload_time2023-10-31 19:01:45
maintainer
docs_urlNone
authorBenjamin Bolte
requires_python>=3.10
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# ML Pretrained

[![python](https://img.shields.io/badge/-Python_3.10-blue?logo=python&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![pytorch](https://img.shields.io/badge/PyTorch_2.0+-ee4c2c?logo=pytorch&logoColor=white)](https://pytorch.org/get-started/locally/)
<br />
[![black](https://img.shields.io/badge/Code%20Style-Black-black.svg?labelColor=gray)](https://black.readthedocs.io/en/stable/)
[![ruff](https://img.shields.io/badge/Linter-Ruff-red.svg?labelColor=gray)](https://github.com/charliermarsh/ruff)
<br />
[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray)](https://github.com/codekansas/ml-pretrained/blob/master/LICENSE)

</div>

<br />

```bash
$ pip install ml-pretrained
# Try out the RWKV model. This requires the `tokenizers` package.
$ pip install tokenizers
$ python -m pretrained.rwkv 430m 'Scientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry. Upon further investigation,'
Scientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry. Upon further investigation, in fact, researchers discovered that they were members of an ancestral, living species. When this research was published in 2009 in the journal Current Biology, there was widespread praise for their research.

So what do we make of the current understanding of what happens to these amazing creatures when they no longer exist on a cold planet? Much of the literature on the matter seems to conclude that there’s no hope of coming to grips with this question, that everything we know about this species, or even any of the non-human species that may be out there in space, is simply a human’s or animal’s invention.
# Try out the Tacotron2 model. This requires the `sounddevice`, `inflect` and `ftfy` packages.
$ pip install sounddevice inflect ftfy
$ python -m pretrained.tacotron2 'Scientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry.'
# Chain these together.
$ python -m pretrained.tacotron2 "$(python -m pretrained.rwkv 430m 'Scientists recently discovered an island populated entirely by cats. To their surprise,' --tsz 64)"
```

## What is this?

This is a collection of pre-trained model implementations, which can be used in down-stream packages.

### Goal

The goal of this repository is to make it as easy as possible to try out a pre-trained model, and eventually incorporate it into a new project. To that end, each implementation is a self-contained file, so that you can just copy-paste it wholesale into whatever project your using or use it directly without adding a bunch of dependencies. Additionally, the implementations use high-quality, modern Python syntax to be as easy to follow as possible.

This also includes some custom Triton kernels for certain operations which may benefit from GPU acceleration.

### License

Note that while this particular code is MIT licensed, but that does not mean that all of the model weights are. You should comply with the upstream licenses for models that you use.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/codekansas/ml-pretrained",
    "name": "ml-pretrained",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "Benjamin Bolte",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/fc/f2/3dec66ab2d7a6ecbff6a4b14ea68f7f77783eaf9922a279ef2c84cb179ca/ml-pretrained-0.0.46.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# ML Pretrained\n\n[![python](https://img.shields.io/badge/-Python_3.10-blue?logo=python&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![pytorch](https://img.shields.io/badge/PyTorch_2.0+-ee4c2c?logo=pytorch&logoColor=white)](https://pytorch.org/get-started/locally/)\n<br />\n[![black](https://img.shields.io/badge/Code%20Style-Black-black.svg?labelColor=gray)](https://black.readthedocs.io/en/stable/)\n[![ruff](https://img.shields.io/badge/Linter-Ruff-red.svg?labelColor=gray)](https://github.com/charliermarsh/ruff)\n<br />\n[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray)](https://github.com/codekansas/ml-pretrained/blob/master/LICENSE)\n\n</div>\n\n<br />\n\n```bash\n$ pip install ml-pretrained\n# Try out the RWKV model. This requires the `tokenizers` package.\n$ pip install tokenizers\n$ python -m pretrained.rwkv 430m 'Scientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry. Upon further investigation,'\nScientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry. Upon further investigation, in fact, researchers discovered that they were members of an ancestral, living species. When this research was published in 2009 in the journal Current Biology, there was widespread praise for their research.\n\nSo what do we make of the current understanding of what happens to these amazing creatures when they no longer exist on a cold planet? Much of the literature on the matter seems to conclude that there\u2019s no hope of coming to grips with this question, that everything we know about this species, or even any of the non-human species that may be out there in space, is simply a human\u2019s or animal\u2019s invention.\n# Try out the Tacotron2 model. This requires the `sounddevice`, `inflect` and `ftfy` packages.\n$ pip install sounddevice inflect ftfy\n$ python -m pretrained.tacotron2 'Scientists recently discovered an island populated entirely by cats. To their astonishment, none of the cats were hungry.'\n# Chain these together.\n$ python -m pretrained.tacotron2 \"$(python -m pretrained.rwkv 430m 'Scientists recently discovered an island populated entirely by cats. To their surprise,' --tsz 64)\"\n```\n\n## What is this?\n\nThis is a collection of pre-trained model implementations, which can be used in down-stream packages.\n\n### Goal\n\nThe goal of this repository is to make it as easy as possible to try out a pre-trained model, and eventually incorporate it into a new project. To that end, each implementation is a self-contained file, so that you can just copy-paste it wholesale into whatever project your using or use it directly without adding a bunch of dependencies. Additionally, the implementations use high-quality, modern Python syntax to be as easy to follow as possible.\n\nThis also includes some custom Triton kernels for certain operations which may benefit from GPU acceleration.\n\n### License\n\nNote that while this particular code is MIT licensed, but that does not mean that all of the model weights are. You should comply with the upstream licenses for models that you use.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "ML project template repository",
    "version": "0.0.46",
    "project_urls": {
        "Homepage": "https://github.com/codekansas/ml-pretrained"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a725d47affaa95fed0370a031f530f866a6950503666375cf1222c02456a7d2d",
                "md5": "65856f86e54818fc421838a72dbfce5c",
                "sha256": "c5dd657e10ac72269a268309ef3a620a78bac454b89d7c28454afcf9d132206f"
            },
            "downloads": -1,
            "filename": "ml_pretrained-0.0.46-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65856f86e54818fc421838a72dbfce5c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 105082,
            "upload_time": "2023-10-31T19:01:43",
            "upload_time_iso_8601": "2023-10-31T19:01:43.179304Z",
            "url": "https://files.pythonhosted.org/packages/a7/25/d47affaa95fed0370a031f530f866a6950503666375cf1222c02456a7d2d/ml_pretrained-0.0.46-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcf23dec66ab2d7a6ecbff6a4b14ea68f7f77783eaf9922a279ef2c84cb179ca",
                "md5": "10d9ae2d4574091e15395cf5fc27408b",
                "sha256": "620efa237b5d1284564a07f7204c895c9c32ba97fd794e37f5638438aebbf880"
            },
            "downloads": -1,
            "filename": "ml-pretrained-0.0.46.tar.gz",
            "has_sig": false,
            "md5_digest": "10d9ae2d4574091e15395cf5fc27408b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 98841,
            "upload_time": "2023-10-31T19:01:45",
            "upload_time_iso_8601": "2023-10-31T19:01:45.207075Z",
            "url": "https://files.pythonhosted.org/packages/fc/f2/3dec66ab2d7a6ecbff6a4b14ea68f7f77783eaf9922a279ef2c84cb179ca/ml-pretrained-0.0.46.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-31 19:01:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "codekansas",
    "github_project": "ml-pretrained",
    "github_not_found": true,
    "lcname": "ml-pretrained"
}
        
Elapsed time: 0.14882s