đ Typhoon-0219: Thai Large Language Model (Instruct)
Typhoon-0219 is an instruct Thai large language model with 7 billion parameters, based on Typhoon 7B. It's the second - generation instruct model for opentyphoon.ai. Trained on a diverse instruction - tuning dataset of over 1 million rows, similar to OpenHermes, it supports system prompts.
đ Quick Start
The model requires transformers 4.38.0 or newer. You can start using it following the steps below.
⨠Features
- It is a 7B instruct decoder - only model based on Mistral architecture.
- Supports Thai and English languages.
- Incorporates some guardrails, though it's still under development.
đĻ Installation
To run the model in production, we suggest using the OpenAI - compatible API server from the vLLM project. Use the following command:
python -m vllm.entrypoints.openai.api_server --port 8080 --model scb10x/typhoon-7b-instruct-02-19-2024 --max-num-batched-tokens 8192 --max-model-len 8192 --served-model-name typhoon-instruct
đģ Usage Examples
Basic Usage
We use the chatml chat - template. Here is the code example:
{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content']}}{% if (loop.last and add_generation_prompt) or not loop.last %}{{ '<|im_end|>' + '\n'}}{% endif %}{% endfor %}
{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{ '<|im_start|>assistant\n' }}{% endif %}
đ Documentation
Model Description
Property |
Details |
Model Type |
A 7B instruct decoder - only model based on Mistral architecture |
Requirement |
transformers 4.38.0 or newer |
Primary Language(s) |
Thai đšđ and English đŦđ§ |
License |
Apache - 2.0 |
Intended Uses & Limitations
This model is an instructional model and is still in development. It has some guardrails, but may produce inaccurate, biased, or objectionable answers. Developers should assess these risks according to their use cases.
Production Deployment
Use the OpenAI - compatible API server from the vLLM project as described in the Installation section.
Chat Template
We use the chatml chat - template as shown in the Usage Examples section.
đ License
This project is licensed under the Apache - 2.0 license.
đ Follow Us
- https://twitter.com/opentyphoon
đŦ Support
- https://discord.gg/us5gAYmrxw
đĨ SCB10X AI Team
- Kunat Pipatanakul, Potsawee Manakul, Sittipong Sripaisarnmongkol, Pathomporn Chokchainant, Kasima Tharnpipitchai
- If you find Typhoon useful for your work, please cite it using:
@article{pipatanakul2023typhoon,
title={Typhoon: Thai Large Language Models},
author={Kunat Pipatanakul and Phatrasek Jirabovonvisut and Potsawee Manakul and Sittipong Sripaisarnmongkol and Ruangsak Patomwong and Pathomporn Chokchainant and Kasima Tharnpipitchai},
year={2023},
journal={arXiv preprint arXiv:2312.13951},
url={https://arxiv.org/abs/2312.13951}
}
đ§ Contact Us