@jseeio/gpt2-tfjs
v0.0.1
Published
GPT2 with Tensorflow.js
Downloads
3
Readme
Load GPT2 in the browser with TensorFlow.js
This repository contains a demo of loading a GPT-2 model in the browser with TensorFlow.js. The model weights are loaded from Hugging Face, converted in real-time and then cached in IndexedDB.
Libraries used:
- tfjs - to run the model
- gpt-tfjs - to define the model architecture
- h5web - to load .h5 files dynamically
- gpt-tokenizer - to encode/decode text
- stats.js - to show stats