Instructions to use openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4
- SGLang
How to use openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4 with Docker Model Runner:
docker model run hf.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,88 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- kobkrit/rd-taxqa
|
| 5 |
+
- iapp_wiki_qa_squad
|
| 6 |
+
- Thaweewat/alpaca-cleaned-52k-th
|
| 7 |
+
- Thaweewat/instruction-wild-52k-th
|
| 8 |
+
- Thaweewat/databricks-dolly-15k-th
|
| 9 |
+
- Thaweewat/hc3-24k-th
|
| 10 |
+
- Thaweewat/gpteacher-20k-th
|
| 11 |
+
- Thaweewat/onet-m6-social
|
| 12 |
+
- Thaweewat/alpaca-finance-43k-th
|
| 13 |
+
language:
|
| 14 |
+
- th
|
| 15 |
+
- en
|
| 16 |
+
library_name: transformers
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
tags:
|
| 19 |
+
- openthaigpt
|
| 20 |
+
- llama
|
| 21 |
---
|
| 22 |
+
|
| 23 |
+
# 🇹🇭 OpenThaiGPT 1.0.0-alpha
|
| 24 |
+
<img src="https://1173516064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvvbWvIIe82Iv1yHaDBC5%2Fuploads%2Fb8eiMDaqiEQL6ahbAY0h%2Fimage.png?alt=media&token=6fce78fd-2cca-4c0a-9648-bd5518e644ce
|
| 25 |
+
https://openthaigpt.aieat.or.th/" width="200px">
|
| 26 |
+
|
| 27 |
+
OpenThaiGPT Version 1.0.0-alpha is the first Thai implementation of a 7B-parameter LLaMA v2 Chat model finetuned to follow Thai translated instructions below and makes use of the Huggingface LLaMA implementation.
|
| 28 |
+
|
| 29 |
+
** Full Huggingface Checkpoint Model **
|
| 30 |
+
|
| 31 |
+
## Upgrade from OpenThaiGPT 0.1.0-beta
|
| 32 |
+
- Using Facebook LLama v2 model 7b chat as a base model which is pretrained on over 2 trillion token.
|
| 33 |
+
- Context Length is upgrade from 2048 token to 4096 token
|
| 34 |
+
- Allow research and commerical use.a
|
| 35 |
+
|
| 36 |
+
## Pretrain Model
|
| 37 |
+
- [https://huggingface.co/meta-llama/Llama-2-7b-chat](https://huggingface.co/meta-llama/Llama-2-7b-chat)
|
| 38 |
+
|
| 39 |
+
## Support
|
| 40 |
+
- Official website: https://openthaigpt.aieat.or.th
|
| 41 |
+
- Facebook page: https://web.facebook.com/groups/openthaigpt
|
| 42 |
+
- A Discord server for discussion and support [here](https://discord.gg/rUTp6dfVUF)
|
| 43 |
+
- E-mail: kobkrit@iapp.co.th
|
| 44 |
+
|
| 45 |
+
## License
|
| 46 |
+
**Source Code**: License Apache Software License 2.0.<br>
|
| 47 |
+
**Weight**: Research and **Commercial uses**.<br>
|
| 48 |
+
|
| 49 |
+
## Code and Weight
|
| 50 |
+
**Colab Demo**: https://colab.research.google.com/drive/1kDQidCtY9lDpk49i7P3JjLAcJM04lawu?usp=sharing<br>
|
| 51 |
+
**Finetune Code**: https://github.com/OpenThaiGPT/openthaigpt-finetune-010beta<br>
|
| 52 |
+
**Inference Code**: https://github.com/OpenThaiGPT/openthaigpt<br>
|
| 53 |
+
**Weight (Lora Adapter)**: https://huggingface.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat<br>
|
| 54 |
+
**Weight (Huggingface Checkpoint)**: https://huggingface.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ckpt-hf<br>
|
| 55 |
+
**Weight (GGML)**: https://huggingface.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml<br>
|
| 56 |
+
**Weight (Quantized 4bit GGML)**: https://huggingface.co/openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ggml-q4
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## Sponsors
|
| 60 |
+
Pantip.com, ThaiSC<br>
|
| 61 |
+
<img src="https://1173516064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvvbWvIIe82Iv1yHaDBC5%2Fuploads%2FiWjRxBQgo0HUDcpZKf6A%2Fimage.png?alt=media&token=4fef4517-0b4d-46d6-a5e3-25c30c8137a6" width="100px">
|
| 62 |
+
<img src="https://1173516064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvvbWvIIe82Iv1yHaDBC5%2Fuploads%2Ft96uNUI71mAFwkXUtxQt%2Fimage.png?alt=media&token=f8057c0c-5c5f-41ac-bb4b-ad02ee3d4dc2" width="100px">
|
| 63 |
+
|
| 64 |
+
### Powered by
|
| 65 |
+
OpenThaiGPT Volunteers, Artificial Intelligence Entrepreneur Association of Thailand (AIEAT), and Artificial Intelligence Association of Thailand (AIAT)
|
| 66 |
+
|
| 67 |
+
<img src="https://1173516064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvvbWvIIe82Iv1yHaDBC5%2Fuploads%2F6yWPXxdoW76a4UBsM8lw%2Fimage.png?alt=media&token=1006ee8e-5327-4bc0-b9a9-a02e93b0c032" width="100px">
|
| 68 |
+
<img src="https://1173516064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvvbWvIIe82Iv1yHaDBC5%2Fuploads%2FBwsmSovEIhW9AEOlHTFU%2Fimage.png?alt=media&token=5b550289-e9e2-44b3-bb8f-d3057d74f247" width="100px">
|
| 69 |
+
|
| 70 |
+
### Authors
|
| 71 |
+
* Kobkrit Viriyayudhakorn (kobkrit@aieat.or.th)
|
| 72 |
+
* Sumeth Yuenyong (sumeth.yue@mahidol.edu)
|
| 73 |
+
* Thaweewat Rugsujarit (thaweewr@scg.com)
|
| 74 |
+
* Jillaphat Jaroenkantasima (autsadang41@gmail.com)
|
| 75 |
+
* Norapat Buppodom (new@norapat.com)
|
| 76 |
+
* Koravich Sangkaew (kwankoravich@gmail.com)
|
| 77 |
+
* Peerawat Rojratchadakorn (peerawat.roj@gmail.com)
|
| 78 |
+
* Surapon Nonesung (nonesungsurapon@gmail.com)
|
| 79 |
+
* Chanon Utupon (chanon.utupon@gmail.com)
|
| 80 |
+
* Sadhis Wongprayoon (sadhis.tae@gmail.com)
|
| 81 |
+
* Nucharee Thongthungwong (nuchhub@hotmail.com)
|
| 82 |
+
* Chawakorn Phiantham (mondcha1507@gmail.com)
|
| 83 |
+
* Patteera Triamamornwooth (patt.patteera@gmail.com)
|
| 84 |
+
* Nattarika Juntarapaoraya (natt.juntara@gmail.com)
|
| 85 |
+
* Kriangkrai Saetan (kraitan.ss21@gmail.com)
|
| 86 |
+
* Pitikorn Khlaisamniang (pitikorn32@gmail.com)
|
| 87 |
+
|
| 88 |
+
<i>Disclaimer: Provided responses are not guaranteed.</i>
|