tractjs icon indicating copy to clipboard operation
tractjs copied to clipboard

NNEF integration

Open bminixhofer opened this issue 3 years ago • 2 comments

tract now supports NNEF in https://github.com/snipsco/tract/pull/340.

  • [x] Check size reduction by replacing ONNX and TF with NNEF and building the package.
  • [ ] If the size reduction is significant (@kali sees 25%!) we should create a separate package @tractjs/nnef for NNEF support. It follows that ONNX and TF should also be split this way into @tractjs/onnx and @tractjs/tf. See the way TF.js does splitting into packages.

This and https://github.com/bminixhofer/tractjs/issues/12 should get us below 1MB!

bminixhofer avatar Aug 15 '20 15:08 bminixhofer

@kali I got around to checking this now:

Current WASM size: 4.7MB, 1.0MB gzipped WASM size with tract_onnx and tract_tensorflow replaced by tract_nnef: 2.8MB, 680KB gzipped!

So a huge decrease, and definitely worth implementing in tractjs.

bminixhofer avatar Aug 17 '20 12:08 bminixhofer

Ha thanks, that's great news :) Working on the scan op support right now.

kali avatar Aug 17 '20 12:08 kali