markmo / qandaxfmrartifact

BentoML artifact framework for Q&A Transformers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qandaxfmrartifact

BentoML artifact framework for Q&A Transformers.

Installation:

pip install qandaxfmrartifact

Usage example (decorate service):

from qandaxfmrartifact.QandaTransformersModelArtifact import QandaTransformersModelArtifact

@artifacts([QandaTransformersModelArtifact('albert')])
class MyBentoService(BentoService):

Usage example (package model):

svc = MyBentoService()

opts = {
    'embedder_model_path': my_embedder_model_path,
}

svc.pack('albert', my_transformer_model_path, opts)

Alternatively, during training:

svc.pack('albert', {'model': my_trained_model, 'tokenizer': my_tokenizer, 'embedder': my_embedder})

About

BentoML artifact framework for Q&A Transformers.


Languages

Language:Python 96.4%Language:Shell 3.6%