Skip to main content

OpenThaiGPT

OpenThaiGPT focuses on developing a Thai Chatbot system to have capabilities equivalent to ChatGPT, as well as being able to connect to external systems and be able to retrieve data flexibly. Easily expandable and customizable and developed into Free open source software for everyone.

Versions

  • OpenThaiGPT chat inference library (this repository): version 0.1.1

  • Released models

    • kobkrit/openthaigpt-0.1.0-beta

      • Pretraining Model: Facebook Llama (7 billion params)
      • Dataset: 200,000 Various Translated Instruction Dataset
      • RLHF: None
      • Minimium Requirement: Nvidia T4 16GB
    • kobkrit/openthaigpt-0.1.0-alpha

      • Pretraining Model: ByT5-XL (3.74 billion params)
      • Dataset: 50,000 Thai SelfInstruct
      • RLHF: None
      • Minimium Requirement: Nvidia A100 40GB
    • kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4

      • Pretraining Model: GPT-2 Thai-base
      • InstructDataset: 300,000 Pantip + 5,000 Wiki QA => 12,920 Thai InstructGPT
      • RLHF: None
      • Minimium Requirement: CPU or Nvidia GTX 1060 6GB
    • kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.3

      • Pretraining Model: GPT-2 Thai-base
      • InstructDataset: 300,000 Pantip + 5,000 Wiki QA => 7,000 Thai InstructGPT
      • RLHF: None
      • Minimium Requirement: CPU or Nvidia GTX 1060 6GB
    • kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.2

      • Pretraining Model: GPT-2 Thai-base
      • InstructDataset: 7,000 Thai InstructGPT
      • RLHF: None
      • Minimium Requirement: CPU or Nvidia GTX 1060 6GB
    • kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.1

      • Pretraining Model: GPT-2 Thai-base
      • InstructDataset: 298,678 QA Pairs getting from 70,000 Pantip katoos + Wikipedia QA by iApp
      • RLHF: None
      • Minimium Requirement: CPU or Nvidia GTX 1060 6GB

Installation

Python>=3.6

CPU-Only

$ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cpu

With GPU

CUDA 11.6 $ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cu116

CUDA 11.7 $ pip install openthaigpt torch

Using 0.1.0-beta model

import openthaigpt

print(openthaigpt.generate(instruction="แปลภาษาอังกฤษเป็นภาษาไทย", input="We want to reduce weight.", model_name = "kobkrit/openthaigpt-0.1.0-beta", min_length=50, max_length=300, top_p=0.75, top_k=40, num_beams=1, no_repeat_ngram_size=0, temperature=0.1, early_stopping=True, load_8bit=False))

Using 0.1.0-alpha model

import openthaigpt

print(openthaigpt.generate(instruction="แปลภาษาอังกฤษเป็นภาษาไทย", input="We want to reduce weight.", model_name = "kobkrit/openthaigpt-0.1.0-alpha", min_length=50, max_length=300,  top_k=20, num_beams=5, no_repeat_ngram_size=20, temperature=1, early_stopping=True))

Usage 0.0.1-0.0.4 model

import openthaigpt

print(openthaigpt.generate("Q: อยากลดความอ้วนทำไง\n\nA:", model_name = "kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4"))
print(openthaigpt.zero("การลดน้ำหนักเป็นเรื่องที่ต้องพิจารณาอย่างละเอียดและรอบคอบเพื่อให้ได้ผลลัพธ์ที่ดีและมีประสิทธิภาพมากที่สุด"))

Sponsored by

  • Pantip.com
  • ThaiSC

Collaborated By

  • Artificial Intelligence Entrepreneur Association of Thailand (AIEAT)
  • Artificial Intelligence Association of Thailand (AIAT)

Supported By

  • NECTEC
  • iApp Technology
  • NVIDIA
  • Microsoft
  • Mahidol University
  • Gitbook

History

0.1.1 (2023-05-26)

0.1.0 (2023-04-23)

0.0.9 - 0.0.10 (2023-03-19)

  • Release OpenThaiGPT Zero

0.0.8 (2023-03-12)

  • Update Readme

0.0.7 (2023-03-12)

0.0.6 (2023-03-05)

  • Update README

0.0.5 (2023-02-28)

  • First release on PyPI.

Metadata

Release files for openthaigpt 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openthaigpt 0.1.1
File Size Uploaded Provenance
openthaigpt-0.1.1.tar.gz 11.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openthaigpt 0.1.1
File Interpreter ABI Platform
openthaigpt-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 17.9 kB

Release files / openthaigpt-0.1.1.tar.gz

Download URL openthaigpt-0.1.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c648f4afbb276da5207eb1ab428f5bf0c1576801787c8232698026cdde47b33
BLAKE2b-256 checksum
How to use checksums
4a719aa6ea50470c6e5154cc736a2b65f4a488b21c3f59d890543f3ce3b4357b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.9.6 requests/2.27.1 setuptools/61.2.0 requests-toolbelt/0.10.1 tqdm/4.64.0 CPython/3.9.12

Release files / openthaigpt-0.1.1-py2.py3-none-any.whl

Download URL openthaigpt-0.1.1-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d5f128ed1f768cef2b93af0329ef6e7e38c5fb3a9b2cd65141e82e1d1aa0267d
BLAKE2b-256 checksum
How to use checksums
e220eaaeed6d9d083aa6c4d2a42cd14327d5b040652f043fdde26c5ae5d5385f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.9.6 requests/2.27.1 setuptools/61.2.0 requests-toolbelt/0.10.1 tqdm/4.64.0 CPython/3.9.12

Security for openthaigpt 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page