
# MyanmarGPT-Chat

```
User: MyanmarGPT-Chat ဆိုတာဘာလဲ?

Assistant: သမိုင်းကြောင်းတွေ, နိုင်ငံရေးတွေအကြောင်းရှင်းပြပေးမည်။ 
ဒီ model အပေါ်မှာ fine tuning လုပ်ပြီး model အသစ်တွေတည်ဆောက်နိုင်တဲ့ foundational model ဖြစ်သည်။
Long live burmese language
```

Myanmar AI Tutor ပြီးကတည်းက Chat Model လေး open source ပေးပါအုန်းဆိုလို့ အလုပ်ကလည်း ဇယ်ဆက်နေတာနဲ့ မတင်ပေးဖြစ်သေးတာ။
မြန်မာသမိုင်းတော့ အငြင်းပွားစရာများလို့ နိုင်ငံခြားသမိုင်းတွေပဲ များများထည့်ထားတယ်။ မည်သူမဆို အခမဲ့ရယူစမ်းသုံးကြည့်လို့ရပါတယ်။
Myanmar GPT Movement ရဲ့ အခြား project တွေပါဝင်ဖို့ စိတ်ဝင်စားတယ်ဆိုရင်လည်း [LinkedIn](https://www.linkedin.com/in/min-si-thu/) မှာ ဆက်သွယ်လို့ရပါတယ်။

ChatGPT က မြန်မာစာ support ပေးတာကို မစောင့်နိုင်တော့လို့ ကိုယ်ဟာကိုယ်ပဲလုပ်ပြီးသုံးလိုက်ပါတော့တယ်။ မြန်မာ Developer တွေ, reseacher တွေ, စမ်းသပ်ခုံမင်သူတွေ သုံးစွဲလို့ရပါတယ်။
MyanmarGPT-Chat က MyanmarGPT ပေါ်မှာ တင်ပြီး finetuned ထားတဲ့ open source text generation chat model တခုဖြစ်ပါတယ်။
Wikipedia မှာတင်ထားတဲ့ ဘက်မလိုက်တဲ့သမိုင်းကြောင်းတွေ, အဖြစ်အပျက်တွေကို ထိန်းသိမ်းပြောဆိုပေးဖို့ဖြစ်ပါတယ်။

မြန်မာစာ(ဗမာစာ)ဟာ low resource language တခုဖြစ်ပါတယ်။ MyanmarGPT ရဲ့ သက်ရောက်မှုကြောင့် အမျိုးမျိုးသော Burmese language based models တွေထွက်လာကြပါတယ်။
သို့ပေမဲ့ ကျွန်တော်တို့ ဗမာစာနှင့်ပတ်သတ်ပြီး ဆက်သွားစရာတွေရှိပါသေးတယ်။ 
MyanmarGPT movement က မြန်မာနိုင်ငံတွင်းမှာရှိတဲ့အမျိုးမျိုးသော Artificial Intelligence လှုပ်ရှားမှုတွေ ဆောင်ရွက်သွားမှာဖြစ်ပါတယ်။


MyanmarGPT-Chat is a question-answering model available in the Burmese language. It is fine-tuned via the foundational model called [MyanmarGPT](https://huggingface.co/jojo-ai-mst/MyanmarGPT).

The dataset used is called "A Brief History of the World" curated by the creator, Min Si Thu.
It can answer general knowledge about world history.
The dataset is based on summarization of Wikipedia pages.

## Model Details

MyanmarGPT-Chat is based on the MyanmarGPT model. 
As MyanmarGPT is a frontier model for the Burmese language and is getting used by lots of people around Myanmar,
Thus, MyanmarGPT-Chat is required to build a foundational model for question-answering language model.


### Model Description

<!-- Provide a longer summary of what this model is. -->



- **Developed by:** [Min Si Thu](https://huggingface.co/jojo-ai-mst)
- **Funded by [self]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** GPT2
- **Language(s) (NLP):** Burmese, English
- **License:** CreativeML OpenRAIL-M
- **Finetuned from model [MyanmarGPT]:** [MyanmarGPT](https://huggingface.co/jojo-ai-mst/MyanmarGPT)

### Model Sources [optional]

<!-- Provide the basic links for the model. -->

- **Repository:** [https://github.com/MinSiThu/MyanmarGPT]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->

### Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

Originally crafted for text completion in Burmese, this model functions as a fundamental asset for various Natural Language Processing (NLP) tasks. Although its primary role is presently centered on aiding in text generation and completion, it harbors considerable potential for broader applications. Researchers and developers have the option to refine this model using specialized datasets, thereby expanding its utility to other NLP domains, including summarization and instruction-based tasks. Nevertheless, it is crucial to acknowledge that when dealing with high-stakes decisions or comprehending domain-specific terminology, additional specialized training for the model is advised to ensure optimal accuracy and reliability.

### Out-of-Scope Use

Users need to recognize the inherent limitations and biases present in language models. Responsible usage is crucial, particularly in sensitive contexts, as this model is not designed to generate misleading or harmful content.

[More Information Needed]

## Bias, Risks, and Limitations

While the MyanmarGPT-Chat excels in handling general Burmese text about history of countires around the world, its effectiveness might be limited when dealing with daily-life spoken burmese words. Users are encouraged to perform comprehensive testing tailored to their specific use cases.

[More Information Needed]

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

## How to Get Started with the Model

```shell
!pip install transformers
```

```python
from transformers import GPT2LMHeadModel, GPT2Tokenizer

# Load MyanmarGPT-Chat model and tokenizer
model = GPT2LMHeadModel.from_pretrained("jojo-ai-mst/MyanmarGPT-Chat")
tokenizer = GPT2Tokenizer.from_pretrained("jojo-ai-mst/MyanmarGPT-Chat")

def generate_text(prompt, max_length=300, temperature=0.8, top_k=50):
    input_ids = tokenizer.encode(prompt, return_tensors="pt").cuda() # remove .cude() if only cpu
    output = model.generate(
        input_ids,
        max_length=max_length,
        temperature=temperature,
        top_k=top_k,
        pad_token_id=tokenizer.eos_token_id,
        do_sample=True
    )
    for result in output:
      generated_text = tokenizer.decode(result, skip_special_tokens=True)
      print(generated_text)

generate_text("User: မြန်မာနိုင်ငံအကြောင်းရှင်းပြပါ။\n Assistant: ")

```



## Citation [optional]

- MinSithu, MyanmarGPT, https://huggingface.co/jojo-ai-mst/MyanmarGPT, 1.1-SweptWood

## Model Card Contact

[More Information Needed]
{"language": ["my", "en"], "license": "creativeml-openrail-m", "library_name": "transformers", "tags": ["chat", "myanmar", "burmese", "llm"], "widget": [{"text": "User: \u1019\u103c\u1014\u103a\u1019\u102c\u1014\u102d\u102f\u1004\u103a\u1004\u1036\u1021\u1000\u103c\u1031\u102c\u1004\u103a\u1038\u101b\u103e\u1004\u103a\u1038\u1015\u103c\u1015\u102b\u104b\nAssistant: ", "example_title": "Example 1"}, {"text": "User: \u101b\u102f\u101b\u103e\u102c\u1038\u1014\u102d\u102f\u1004\u103a\u1004\u1036\u1021\u1000\u103c\u1031\u102c\u1004\u103a\u1038\u1015\u103c\u1031\u102c\u1015\u103c\u1015\u102b\nAssistant: ", "example_title": "Example 2"}, {"text": "User: \u1000\u103d\u1014\u103a\u1019\u103c\u1030\u1014\u1005\u103a\u1006\u102d\u102f\u1010\u102c\u1018\u102c\u101c\u1032\nAssistant: ", "example_title": "Example 3"}]}
transformers tensorboard safetensors gpt2 text-generation chat myanmar burmese llm my en license:creativeml-openrail-m autotrain_compatible endpoints_compatible text-generation-inference region:us