ONNX 模型库
返回模型

说明文档

DEEPSPARSE 上运行的 DISTILBERT 嗡嗡作响。🚀🚀🚀

这个模型是 👇

    ███████╗ ██████╗   █████╗  ██████╗  ███████╗ ███████╗
    ██╔════╝ ██╔══██╗ ██╔══██╗ ██╔══██╗  ██╔════╝ ██╔════╝
    ███████╗ ██████╔╝ ███████║ ██████╔╝  ███████╗ █████╗  
    ╚════██║ ██╔═══╝  ██╔══██║ ██╔══██╗ ╚════██║█ █╔══╝  
    ███████║ ██║      ██║  ██║ ██║  ██ ║███████║ ███████╗
    ╚══════╝ ╚═╝      ╚═╝  ╚═╝ ╚═╝  ╚═ ╝╚══════╝ ╚══════╝

Alt Text

看起来像这样 👇

Imgur

推理端点,除异常值外(4毫秒),在 2 个 vCPU 上的平均延迟:

Imgur

访问推理端点的处理器

class EndpointHandler:

    def __init__(self, path=""):

        self.pipeline = Pipeline.create(task="text-classification", model_path=path)

    def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
        """
        Args:
            data (:obj:): prediction input text
        """
        inputs = data.pop("inputs", data)

        start = perf_counter()
        prediction = self.pipeline(inputs)
        end = perf_counter()
        latency = end - start

        return {
            "labels": prediction.labels, 
            "scores": prediction.scores,
            "latency (secs.)": latency
        }

̷͈̍ ̵̳͒R̶̙̓i̸̟͘c̴̻̆k̸̑͜ÿ̷̳́ ̸̪̚ ̷͖̀

zeroshot/sst2-distilbert-sparse

作者 zeroshot

text-classification transformers
↓ 0 ♥ 0

创建时间: 2022-11-10 15:56:00+00:00

更新时间: 2022-12-19 14:22:02+00:00

在 Hugging Face 上查看

文件 (9)

.gitattributes
.gitignore
README.md
config.json
handler.py
model.onnx ONNX
requirements.txt
tokenizer.json
tokenizer_config.json