Text Generation
Transformers
Burmese
English
myanmar
burmese
llm
chat
instruction-following
conversational
autoregressive
Instructions to use amkyawdev/myanmar-ghost with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amkyawdev/myanmar-ghost with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amkyawdev/myanmar-ghost") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("amkyawdev/myanmar-ghost", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amkyawdev/myanmar-ghost with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amkyawdev/myanmar-ghost" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amkyawdev/myanmar-ghost", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amkyawdev/myanmar-ghost
- SGLang
How to use amkyawdev/myanmar-ghost 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 "amkyawdev/myanmar-ghost" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amkyawdev/myanmar-ghost", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "amkyawdev/myanmar-ghost" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amkyawdev/myanmar-ghost", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amkyawdev/myanmar-ghost with Docker Model Runner:
docker model run hf.co/amkyawdev/myanmar-ghost
Update model card with training info
Browse files
README.md
CHANGED
|
@@ -1,135 +1,79 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Myanmar Ghost
|
| 13 |
|
| 14 |
-
Advanced Myanmar Language Understanding Model
|
| 15 |
|
| 16 |
## π― Overview
|
| 17 |
|
| 18 |
-
Myanmar Ghost is a
|
| 19 |
|
| 20 |
-
|
| 21 |
-
- **Active Learning Pipeline**: Efficient annotation with uncertainty sampling
|
| 22 |
-
- **Federated Learning Ready**: Privacy-preserving distributed training
|
| 23 |
-
- **Explainable AI**: SHAP and LIME-based model interpretability
|
| 24 |
-
- **Adversarial Data Augmentation**: Robust training with synonym replacement and perturbation
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
βββ configs/ # Configuration files
|
| 31 |
-
βββ data/ # Data directory (raw, processed, augmented)
|
| 32 |
-
βββ src/
|
| 33 |
-
β βββ data_processing/ # Audio, text processing, multimodal fusion
|
| 34 |
-
β βββ annotation/ # Labeling tools, active learning
|
| 35 |
-
β βββ models/ # Model implementations
|
| 36 |
-
β βββ federated/ # Federated learning components
|
| 37 |
-
β βββ xai/ # Explainable AI modules
|
| 38 |
-
β βββ augmentation/ # Data augmentation
|
| 39 |
-
β βββ utils/ # Utilities
|
| 40 |
-
βββ outputs/ # Model outputs, results, logs
|
| 41 |
-
βββ tests/ # Unit tests
|
| 42 |
-
βββ docs/ # Documentation
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
## π Quick Start
|
| 46 |
-
|
| 47 |
-
### Installation
|
| 48 |
-
|
| 49 |
-
```bash
|
| 50 |
-
pip install -r requirements.txt
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
### Data Processing
|
| 54 |
-
|
| 55 |
-
```bash
|
| 56 |
-
python src/data_processing/audio_processor.py
|
| 57 |
-
python src/data_processing/text_normalizer.py
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
### Training
|
| 61 |
-
|
| 62 |
-
```bash
|
| 63 |
-
python src/models/train.py --config configs/model/transformer_config.yaml
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
### Federated Learning
|
| 67 |
-
|
| 68 |
-
```bash
|
| 69 |
-
# Start server
|
| 70 |
-
python src/federated/server.py --config configs/federated/server_config.yaml
|
| 71 |
-
|
| 72 |
-
# Start client
|
| 73 |
-
python src/federated/client.py --config configs/federated/client_configs/hospital_a.yaml
|
| 74 |
-
```
|
| 75 |
-
|
| 76 |
-
## π Features
|
| 77 |
-
|
| 78 |
-
### 1. Data Versioning (DVC)
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
```bash
|
| 83 |
-
dvc add data/processed/v1.2
|
| 84 |
-
git add data/processed/v1.2.dvc
|
| 85 |
-
```
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
|
| 91 |
```python
|
| 92 |
-
from
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
```
|
| 97 |
|
| 98 |
-
##
|
| 99 |
-
|
| 100 |
-
Understand model decisions:
|
| 101 |
-
|
| 102 |
-
```python
|
| 103 |
-
from src.xai.shap_explainer import ThankingSHAPExplainer
|
| 104 |
|
| 105 |
-
explainer = ThankingSHAPExplainer(model, tokenizer)
|
| 106 |
-
shap_values = explainer.explain("αα»α±αΈαα°αΈαα«")
|
| 107 |
```
|
| 108 |
-
|
| 109 |
-
#
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
```
|
| 118 |
|
| 119 |
-
##
|
| 120 |
-
|
| 121 |
-
GitHub Actions workflows automatically:
|
| 122 |
-
|
| 123 |
-
- Validate data schemas
|
| 124 |
-
- Check label distributions
|
| 125 |
-
- Run model evaluations
|
| 126 |
-
- Deploy to HuggingFace
|
| 127 |
-
|
| 128 |
-
## π License
|
| 129 |
|
| 130 |
-
Apache 2.0
|
| 131 |
|
| 132 |
## π€ Author
|
| 133 |
|
| 134 |
-
Aung Myo Kyaw (amkyawdev)
|
| 135 |
-
https://huggingface.co/amkyawdev
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- my
|
| 4 |
+
- en
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-classification
|
| 8 |
+
tags:
|
| 9 |
+
- myanmar
|
| 10 |
+
- burmese
|
| 11 |
+
- nlp
|
| 12 |
+
- text-classification
|
| 13 |
+
- sentiment-analysis
|
| 14 |
+
- news-classification
|
| 15 |
+
- xlm-roberta
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# Myanmar Ghost π
|
| 19 |
|
| 20 |
+
Advanced Myanmar Language Understanding Model
|
| 21 |
|
| 22 |
## π― Overview
|
| 23 |
|
| 24 |
+
Myanmar Ghost is a transformer-based language model designed for Myanmar (Burmese) language understanding tasks.
|
| 25 |
|
| 26 |
+
### Features
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
- **Multi-task Learning**: Supports classification, translation, and NLI
|
| 29 |
+
- **Pre-trained on Myanmar corpus**: 10.6M Myanmar text samples
|
| 30 |
+
- **Fine-tuned datasets**: News classification, translation, instruction tuning
|
| 31 |
+
- **Multi-modal Ready**: Audio + text fusion for sentiment analysis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## π Training Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
| Dataset | Size | Purpose |
|
| 36 |
+
|---------|------|---------|
|
| 37 |
+
| Myanmar Written Corpus | 10.6M | Pre-training |
|
| 38 |
+
| Myanmar News Classification | 29K | Fine-tuning |
|
| 39 |
+
| Myanmar-English Translation | 22K | Translation |
|
| 40 |
+
| Instruction Tuning | 91K | Chat/QA |
|
| 41 |
|
| 42 |
+
## π Quick Start
|
| 43 |
|
| 44 |
```python
|
| 45 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 46 |
+
|
| 47 |
+
# Load model
|
| 48 |
+
model_name = "amkyawdev/myanmar-ghost"
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 50 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 51 |
+
|
| 52 |
+
# Predict
|
| 53 |
+
text = "ααΌααΊαα¬α
α¬ααααΊαΈ"
|
| 54 |
+
inputs = tokenizer(text, return_tensors="pt")
|
| 55 |
+
outputs = model(**inputs)
|
| 56 |
+
prediction = outputs.logits.argmax(dim=-1)
|
| 57 |
```
|
| 58 |
|
| 59 |
+
## π Project Structure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
|
|
|
|
|
|
| 61 |
```
|
| 62 |
+
Myanmar-Ghost/
|
| 63 |
+
βββ configs/ # Model & training configs
|
| 64 |
+
βββ data/ # Datasets
|
| 65 |
+
βββ src/
|
| 66 |
+
β βββ models/ # Model implementations
|
| 67 |
+
β βββ data_processing/
|
| 68 |
+
β βββ training/ # Training pipeline
|
| 69 |
+
β βββ evaluation/ # Metrics & benchmarking
|
| 70 |
+
βββ docs/ # Documentation
|
| 71 |
```
|
| 72 |
|
| 73 |
+
## π License
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
Apache 2.0
|
| 76 |
|
| 77 |
## π€ Author
|
| 78 |
|
| 79 |
+
Aung Myo Kyaw (amkyawdev)
|
|
|