承接 rahul900day/gpt-3-encoder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rahul900day/gpt-3-encoder

最新稳定版本:1.1.0

Composer 安装命令:

composer require rahul900day/gpt-3-encoder

包简介

GPT-3-Encoder is a PHP implementation of OpenAI's original python encoder/decoder.

README 文档

README

StyleCI Status Build Status Version PHP Version Require

PHP BPE Encoder Decoder for GPT-2/GPT-3

About

GPT-2 and GPT-3 use byte pair encoding to turn text into a series of integers to feed into the model. This is a PHP implementation of OpenAI's original python encoder/decoder which can be found here.

Get Started

Requires PHP 7.4+

Install GPT-3-Encoder via the Composer package manager

composer require rahul900day/gpt-3-encoder

Usage

Encoding a text to tokens

use Rahul900day\Gpt3Encoder\Encoder;

Encoder::encode("Your prompt.");

Decoding to text from tokens

use Rahul900day\Gpt3Encoder\Encoder;

Encoder::decode([8582, 242, 98]);

Credits

This packages has some codes and test inspiration from node's gpt-3-encoder

License

This package is released under the MIT License.

统计信息

  • 总下载量: 30.87k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-10