Commit Graph

31 Commits

Author SHA1 Message Date
abhi-agg
12e9232066
Patch WASM artifacts to run optimized (wormhole enabled) inference (#68)
* A script to patch the wasm artifacts to use wormhole via
   APIs that instantiate WASM module
* Updated README
* Load just production ready models
* Shallow clone bergamot-models repo since it has such a large history
* Improved wasm test_page
 - test page can load all 5 language pairs
 - Use intgemm.alpha* models
* Refactor the code that patches wasm artifacts to enable wormhole

Co-authored-by: Andre Natal <anatal@gmail.com>
Co-authored-by: Motin <motin@motin.eu>
2021-03-24 17:10:42 +01:00
Abhishek Aggarwal
eb5284fb20 Removed erroneous '?' in example text in wasm test page 2021-02-23 18:43:51 +01:00
Abhishek Aggarwal
462a850d8a Changed Sentences to Paragraphs in test page of WASM
- Sentence Splitter works now => No more sentence splitting in
   test code
 - Changed example to include some paragraphs
2021-02-22 18:48:59 +01:00
Abhishek Aggarwal
fa4a1ed67d Adapted model config in test example of bergamot
- Replaced deprecated names with new names
      mini-batch-words and max-length-break
 - Set cpu-threads to 0
2021-02-22 18:29:26 +01:00
Abhishek Aggarwal
79571bada5 Improved wasm/README
- Clarified that the Demo and API usage section assumes
   bergamot models were packaged into wasm binary
 - Formatting changes
2021-02-18 12:48:45 +01:00
Abhishek Aggarwal
c2371dd771 Replaced "build-wasm-docker" with "build-wasm"
- Now things are consistent with the top level README
   instructions that suggest to build in "build-wasm"
   folder
2021-02-18 12:20:06 +01:00
Abhishek Aggarwal
9feebe5cb2 Allow using relative paths for packaging files
- PACKAGE_DIR cmake option can now accept relative paths
2021-02-17 20:06:04 +01:00
Motin
d907400a80 Updated test page to use the model structure from bergamot-models repo 2021-02-16 17:00:45 +02:00
Abhishek Aggarwal
921c2eedf8 Updated config for min inference time
- This combination gives min inference time (~ 200 WPS)
   on local machine
2021-02-16 14:39:42 +01:00
Motin
9a5ae9568e Turn of assertions and disable exception catching for wasm builds 2021-02-15 14:24:59 +02:00
Motin
91e45cb4f0 Prepend shortlist path with / 2021-02-15 13:59:49 +02:00
Motin
64d57d8aa0 Use yaml for modelConfig on test page 2021-02-15 13:50:59 +02:00
Motin
7d6346d3b0 Add model config used in pr6 benchmarks 2021-02-15 13:35:22 +02:00
Motin
f3ff1d29ae Make modelConfig an object instead of string (less likelihood of typos) 2021-02-15 13:30:46 +02:00
Motin
fcc998ffa4 Add 10 lines of esen benchmark sentences to test page 2021-02-15 13:30:07 +02:00
Motin
1e94d78c4d Formatting 2021-02-15 13:19:39 +02:00
Motin
da56501c4f Finally found the original typo that made it appear as if loading the model in the test page was faster than elsewhere - the lexical shortlist was not being included at the right place in the model config 2021-02-15 13:10:10 +02:00
Motin
70bdcd4365 Fix typo from when fixing typo 2021-02-15 12:54:32 +02:00
Motin
dbdcdab115 Avoid use of unsafe eval in glue code 2021-02-15 11:59:03 +02:00
Motin
77f39545f3 Add time it takes to arrive to preRun to test page 2021-02-15 11:30:45 +02:00
Motin
49ad6514ae Add reproducible docker-based builds + let test page use these by default 2021-02-15 11:27:47 +02:00
Motin
53e0b9fc5c Fix typo in lexical shortlist argument on test page 2021-02-15 11:22:23 +02:00
Motin
28c0ab2e04 Tweak words per second metric in the test page log 2021-02-15 10:38:36 +02:00
Motin
d3969bcd2d Add support for translating multiple sentences on the test page + report words per second metric in the log 2021-02-15 10:34:57 +02:00
Motin
26ea5bba7a Some cleanup 2021-02-15 10:26:04 +02:00
Motin
f7c86518cf Update test page package-lock.json 2021-02-15 10:04:49 +02:00
Motin
d27a96fc53 Updated wasm readme 2021-02-15 10:04:15 +02:00
Andre Natal
0dbc8612c2 Adding missing bergamot-httpserver.js 2021-02-14 09:55:29 -08:00
Andre Natal
1e413f71cd Including a more elaborated test page, a node webserver containing the proper cors headers and wasm mimetype 2021-02-13 18:23:25 -08:00
Abhishek Aggarwal
28dcf55b41 Improved cmake to use wasm compilation flags across project 2021-02-12 11:36:33 +01:00
Abhishek Aggarwal
de501e8f96 Added JS binding files and cmake infrastructure to build them
- Added "wasm" folder
 - Contains README file as well
2021-02-11 23:36:29 +01:00