gpt_bpe
gpt_bpe copied to clipboard
Update transpiler and allow creation of gobs
Summary
gpt_bpe is intended to be transpiled into JavaScript via GopherJS to be used with goose_web. This PR adds function to allow serialization to and from gobs, which are faster than json or other native JS formats.
Sister PR found here: https://github.com/gooseai/goose-web/pull/139
Changes
- Added functions for the serialization and de-serialization of encoders to gobs.
- Added tests testing # 1
- Removed the go-humanize package in favor of a locally written function that doesn't use
math.powas it transpiles strangely in GopherJS - Added a makefile instruction for building GopherJS and updated readme with a short related blurb.
- Added gobs for 5 encoders into the
resources/embeddedfolder and embedded said gobs intogpt_bpe.js - Update js.go to work with the current iteration of
goose-weband provide some utilties to check the load state of encoders.