superduper_transformers
Transformers is a popular AI framework, and we have incorporated native support for Transformers to provide essential Large Language Model (LLM) capabilities.
Superduper allows users to work with arbitrary transformers pipelines, with custom input/ output data-types.
Installation​
pip install superduper_transformers
API​
Class | Description |
---|---|
superduper_transformers.model.TextClassificationPipeline | A wrapper for transformers.Pipeline . |
superduper_transformers.model.LLM | LLM model based on transformers library. |
Examples​
TextClassificationPipeline​
from superduper_transformers.model import TextClassificationPipeline
model = TextClassificationPipeline(
identifier="my-sentiment-analysis",
model_name="distilbert-base-uncased",
model_kwargs={"num_labels": 2},
device="cpu",
)
model.predict("Hello, world!")
LLM​
from superduper_transformers import LLM
model = LLM(identifier="llm", model_name_or_path="facebook/opt-125m")
model.predict("Hello, world!")
Training Example​
Read more about this here