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", dtype="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
| """ | |
| Upload Myanmar Ghost project to HuggingFace Hub. | |
| Usage: | |
| python upload_to_huggingface.py --repo_id amkyawdev/myanmar-ghost | |
| """ | |
| import argparse | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # Add src to path for imports | |
| sys.path.insert(0, str(Path(__file__).parent)) | |
| from huggingface_hub import HfApi, create_repo, upload_folder | |
| def upload_to_huggingface( | |
| repo_id: str, | |
| local_path: str = ".", | |
| commit_message: str = "Initial upload: Myanmar Ghost project", | |
| token: str = None, | |
| ): | |
| """Upload project to HuggingFace Hub.""" | |
| api = HfApi() | |
| # Get token from env if not provided | |
| if token is None: | |
| token = os.environ.get("HF_TOKEN") | |
| if token is None: | |
| raise ValueError( | |
| "HF_TOKEN not found. Please set HF_TOKEN environment variable:\n" | |
| "export HF_TOKEN=hf_xxxx\n" | |
| "Or get your token from: https://huggingface.co/settings/tokens" | |
| ) | |
| print(f"π Uploading to https://huggingface.co/{repo_id}") | |
| # Create repo if doesn't exist | |
| try: | |
| create_repo( | |
| repo_id=repo_id, | |
| repo_type="space", | |
| exist_ok=True, | |
| token=token, | |
| ) | |
| print(f"β Repository created/verified: {repo_id}") | |
| except Exception as e: | |
| print(f"β οΈ Could not create Space repo: {e}") | |
| print(" Creating as model repo instead...") | |
| create_repo( | |
| repo_id=repo_id, | |
| repo_type="model", | |
| exist_ok=True, | |
| token=token, | |
| ) | |
| # Files/folders to upload | |
| upload_items = [ | |
| ("src", "src"), | |
| ("configs", "configs"), | |
| ("scripts", "scripts"), | |
| ("docs", "docs"), | |
| ("tests", "tests"), | |
| ("notebooks", "notebooks"), | |
| ("deployment", "deployment"), | |
| ("README.md", "README.md"), | |
| ("README_my.md", "README_my.md"), | |
| ("requirements.txt", "requirements.txt"), | |
| ("requirements_dev.txt", "requirements_dev.txt"), | |
| ("setup.py", "setup.py"), | |
| ("pyproject.toml", "pyproject.toml"), | |
| (".gitignore", ".gitignore"), | |
| ] | |
| # Upload each folder/file | |
| for local_item, repo_item in upload_items: | |
| local_path_item = Path(local_path) / local_item | |
| if local_path_item.exists(): | |
| print(f"π€ Uploading: {local_item}") | |
| try: | |
| api.upload_folder( | |
| folder_path=str(local_path_item), | |
| repo_id=repo_id, | |
| repo_type="model", | |
| commit_message=f"Upload {local_item}", | |
| token=token, | |
| ) | |
| print(f" β Uploaded: {local_item}") | |
| except Exception as e: | |
| print(f" β Failed: {e}") | |
| print(f"\nπ Successfully uploaded to https://huggingface.co/{repo_id}") | |
| print(f"\nView your repo at: https://huggingface.co/{repo_id}/tree/main") | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description="Upload Myanmar Ghost to HuggingFace") | |
| parser.add_argument( | |
| "--repo_id", | |
| type=str, | |
| default="amkyawdev/myanmar-ghost", | |
| help="HuggingFace repository ID (default: amkyawdev/myanmar-ghost)" | |
| ) | |
| parser.add_argument( | |
| "--token", | |
| type=str, | |
| default=None, | |
| help="HuggingFace token (or set HF_TOKEN env variable)" | |
| ) | |
| args = parser.parse_args() | |
| upload_to_huggingface( | |
| repo_id=args.repo_id, | |
| token=args.token, | |
| ) | |