Metadata-Version: 2.1
Name: encoder-converter
Version: 0.1.1
Summary: Convert huggingface encoder to onnx format.
Author: aveitsme
Author-email: aveitsme@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: onnx (>=1.0.0,<2.0.0)
Requires-Dist: onnxruntime (>=1.0.0,<2.0.0)
Requires-Dist: tokenizers (>=0.2.0,<1.0.0)
Requires-Dist: torch (>=2.0.0,<3.0.0)
Requires-Dist: transformers (>=4.0.0,<5.0.0)
Description-Content-Type: text/markdown

# Encoder converter
:rocket: Easy way to convert huggingface encoder model to other formats.
## Description
Encoder converter is a package that allowes you to convert huggingface encoder model to other formats (e.g. onnx).
## Features
Unfinished features will be implemented in future versions.
- [x] Convert encoder model to onnx.
- [ ] Convert encoder model to openvino.
## Installation
```bash
pip install encoder-converter
```
## Usage
### Run
You can find the complied model at `output_dir`/t5_encoder.onnx
```bash
convertencoder --model project/repo --output-dir /my/output/dir --cache_dir /cache/dir
```
### Parameters
| Parameter      | Description                                               | Default   |
|----------------|-----------------------------------------------------------|-----------|
| `--model-name` | Huggingface model name                                    |           |
| `--output-dir` | Path to save compiled model and tokenizer artifacts.      |           |
| `--cache-dir`  | Path to a directory in which a downloaded pretrained model configuration should be cached while compiling.                                                 |  `/tmp`   |
