Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willclarktech/transformer-implementations
Various implementations of transformers etc.
https://github.com/willclarktech/transformer-implementations
Last synced: 17 days ago
JSON representation
Various implementations of transformers etc.
- Host: GitHub
- URL: https://github.com/willclarktech/transformer-implementations
- Owner: willclarktech
- License: unlicense
- Created: 2024-01-29T11:56:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-07T12:03:26.000Z (12 months ago)
- Last Synced: 2024-02-07T14:55:14.140Z (12 months ago)
- Language: Python
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Transformer Implementations
Various implementations of transformers etc.
## Prerequisites
- Python3.11
## Installation
Using poetry:
```sh
poetry install
```Using pip:
```sh
pip install -r requirements.txt
```Using pip to install development dependencies too:
```sh
pip install -r requirements.dev.txt
```On Google Colab to avoid conflicts with preinstalled packages:
```sh
pip install -r requirements.colab.txt
```## Running code
### CLI
An executable is provided in `./bin`. From the root directory run:
```sh
./bin/transformer_implementations
```This will also pass on additional arguments.
### Programmatic API
Use the exposed `hello` function:
```py
import transformer_implementationstransformer_implementations.hello()
```### Notebooks
A notebook is provided in `./notebooks` which demonstrates how to use the programmatic API. The notebook provides a link to open in Google Colab. To run locally start a Jupyter notebook server and open the notebook in the browser window which should open automatically:
```sh
jupyter notebook
```## Development
The following scripts assume the requirements have been installed. If using poetry, they assume `poetry shell` has already been run or else they should be prefixed with `poetry run`.
### Lint
```sh
pylint ./transformer_implementations
```### Typecheck
```sh
mypy
```### Format
```sh
black ./transformer_implementations
```### Generating requirements files
```sh
./scripts/generate_requirements.sh
```