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
Add notebooks
Browse files- 01_data_exploration.ipynb +103 -0
01_data_exploration.ipynb
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {},
|
| 6 |
+
"source": [
|
| 7 |
+
"# 📊 Myanmar Ghost - Data Exploration\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"This notebook explores the Myanmar Ghost dataset."
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": null,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"import sys\n",
|
| 19 |
+
"sys.path.insert(0, '..')\n",
|
| 20 |
+
"\n",
|
| 21 |
+
"import pandas as pd\n",
|
| 22 |
+
"import matplotlib.pyplot as plt\n",
|
| 23 |
+
"import seaborn as sns\n",
|
| 24 |
+
"\n",
|
| 25 |
+
"sns.set_style('whitegrid')\n",
|
| 26 |
+
"%matplotlib inline"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"cell_type": "code",
|
| 31 |
+
"execution_count": null,
|
| 32 |
+
"metadata": {},
|
| 33 |
+
"outputs": [],
|
| 34 |
+
"source": [
|
| 35 |
+
"# Load sample data\n",
|
| 36 |
+
"df = pd.read_csv('../data/processed/splits/train.csv')\n",
|
| 37 |
+
"df.head()"
|
| 38 |
+
]
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"cell_type": "code",
|
| 42 |
+
"execution_count": null,
|
| 43 |
+
"metadata": {},
|
| 44 |
+
"outputs": [],
|
| 45 |
+
"source": [
|
| 46 |
+
"# Label distribution\n",
|
| 47 |
+
"plt.figure(figsize=(8, 5))\n",
|
| 48 |
+
"df['label'].value_counts().plot(kind='bar', color='steelblue')\n",
|
| 49 |
+
"plt.title('Sentiment Label Distribution')\n",
|
| 50 |
+
"plt.xlabel('Sentiment')\n",
|
| 51 |
+
"plt.ylabel('Count')\n",
|
| 52 |
+
"plt.xticks(rotation=45)\n",
|
| 53 |
+
"plt.tight_layout()\n",
|
| 54 |
+
"plt.show()"
|
| 55 |
+
]
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"cell_type": "code",
|
| 59 |
+
"execution_count": null,
|
| 60 |
+
"metadata": {},
|
| 61 |
+
"outputs": [],
|
| 62 |
+
"source": [
|
| 63 |
+
"# Text length distribution\n",
|
| 64 |
+
"df['text_length'] = df['text'].str.len()\n",
|
| 65 |
+
"\n",
|
| 66 |
+
"plt.figure(figsize=(10, 5))\n",
|
| 67 |
+
"sns.histplot(data=df, x='text_length', hue='label', kde=True)\n",
|
| 68 |
+
"plt.title('Text Length Distribution by Sentiment')\n",
|
| 69 |
+
"plt.xlabel('Text Length (characters)')\n",
|
| 70 |
+
"plt.show()"
|
| 71 |
+
]
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"cell_type": "code",
|
| 75 |
+
"execution_count": null,
|
| 76 |
+
"metadata": {},
|
| 77 |
+
"outputs": [],
|
| 78 |
+
"source": [
|
| 79 |
+
"# Sample texts\n",
|
| 80 |
+
"print(\"=== Positive Examples ===\")\n",
|
| 81 |
+
"for text in df[df['label']=='positive']['text'].head(3):\n",
|
| 82 |
+
" print(f\"- {text}\")\n",
|
| 83 |
+
"\n",
|
| 84 |
+
"print(\"\\n=== Negative Examples ===\")\n",
|
| 85 |
+
"for text in df[df['label']=='negative']['text'].head(3):\n",
|
| 86 |
+
" print(f\"- {text}\")"
|
| 87 |
+
]
|
| 88 |
+
}
|
| 89 |
+
],
|
| 90 |
+
"metadata": {
|
| 91 |
+
"kernelspec": {
|
| 92 |
+
"display_name": "Python 3",
|
| 93 |
+
"language": "python",
|
| 94 |
+
"name": "python3"
|
| 95 |
+
},
|
| 96 |
+
"language_info": {
|
| 97 |
+
"name": "python",
|
| 98 |
+
"version": "3.10.0"
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"nbformat": 4,
|
| 102 |
+
"nbformat_minor": 4
|
| 103 |
+
}
|