Giter Club home page Giter Club logo

cache-t5's Introduction

基于bert4keras和mt5模型的cache实现

cacheT5.py是其底层实现
demo.py是一个简单的演示demo
https://zhuanlan.zhihu.com/p/75796168 关于cache技术的介绍
总体来说cache是一种无损的提速方法,这个仓库主要开源我通过bert4keras实现的mt5版cache

性能演示

测试环境是1660gpu和i5-9400Fcpu
cpu环境下512-512的输入输出
整体性能提升了四倍左右
R@Q_IV}H8MJA584_`KG1EPJ
cpu环境下768-768的输入输出

image
image
提速在九倍左右
gpu环境下512-512的输入输出
整体速度提升了两倍左右
@CA}91O7{3E))LY2496D3D2

gpu环境下768-768的输入输出
XJMA5A2~{2 IDR_JB9)Y(2M
不难发现更长的输入输出能让加速比有所提升。
另外gpu和cpu的提速比差异较大,个人怀疑是并行能力导致的。不过笔者硬件知识堪忧,希望大佬指教

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.