gpt-3-encoder
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,6 +10,6 @@ const {encode, decode} = require('./encoder.js') | ||
for(let token of encoded){ | ||
console.log('Token: ', token, ' String: ', encode([token])) | ||
console.log({token, string: decode([token])}) | ||
} | ||
const decoded = decode(encoded) | ||
console.log('We can decode it back into ', decoded) | ||
console.log('We can decode it back into:\n', decoded) |
{ | ||
"name": "gpt-3-encoder", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Javascript BPE Encoder Decoder for GPT-2 / GPT-3", | ||
@@ -11,3 +11,3 @@ "main": "encoder.js", | ||
"type": "git", | ||
"url": "git+https://github.com/AIDungeon/Javascript-GPT-3-Encoder.git" | ||
"url": "git+https://github.com/AIDungeon/GPT-3-Encoder.git" | ||
}, | ||
@@ -17,5 +17,5 @@ "author": "", | ||
"bugs": { | ||
"url": "https://github.com/AIDungeon/Javascript-GPT-3-Encoder/issues" | ||
"url": "https://github.com/AIDungeon/GPT-3-Encoder/issues" | ||
}, | ||
"homepage": "https://github.com/AIDungeon/Javascript-GPT-3-Encoder#readme" | ||
"homepage": "https://github.com/AIDungeon/GPT-3-Encoder#readme" | ||
} |
@@ -1,4 +0,12 @@ | ||
# Javascript-GPT-3-Encoder | ||
GPT-3-Encoder | ||
Javascript BPE Encoder Decoder for GPT-2 / GPT-3 | ||
## About | ||
GPT-2 and GPT-3 use byte pair encoding to turn text into a serires of integers to feed into the model. This is a javascript implementation of OpenAI's original python encoder/decoder which can be found [here](https://github.com/openai/gpt-2) | ||
## How to Use | ||
1. [Install Node](https://nodejs.org/en/download/package-manager/) | ||
2. `clone https://github.com/AIDungeon/GPT-3-Encoder.git` | ||
3. `cd GPT-3-Encoder.git` | ||
4. `npm install` | ||
5. `node example.js` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1504924
13