YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
AmkyawDev-LLM-V3
Burmese Language Model Fine-tuning Project using LoRA/QLoRA with Unsloth
๐ฒ๐ฒ AmkyawDev-LLM-V3
Burmese Language Model | Qwen2.5-1.5B | Unsloth Fine-tuned
Model: HuggingFace | Space: Gradio
Drive Progress With Intelligent Systems
๐ Table of Contents
- Project Structure
- Quick Start
- Model Details
- Training
- Deployment
- API Usage
- Limitations
- License
- Acknowledgments
๐ Project Structure
AmkyawDev-LLM-V3/
โโโ ๐ data/ # Dataset แแญแฏแแบแธ
โ โโโ raw/ # แแแผแฏแแผแแบแแแฑแธแแฑแฌ data แแปแฌแธ (Wiki, Social, Books)
โ โโโ processed/ # Clean แแฏแแบแแผแฎแธแแฌแธ (Unicode normalized)
โ โโโ chat_format/ # ShareGPT แแญแฏแทแแแฏแแบ Alpaca format
โโโ ๐ training/ # Training scripts แแปแฌแธ
โ โโโ config.yaml # LoRA/QLoRA hyperparameters
โ โโโ train_lora.py # Standard PEFT training
โ โโโ train_unsloth.py # Unsloth memory-efficient training
โ โโโ requirements.txt # Dependencies
โโโ ๐ model/ # Output แแญแฏแแบแธ
โ โโโ adapter/ # Trained LoRA weights
โ โโโ merged/ # Base + LoRA merged version
โโโ ๐ deployment/ # API แแพแแทแบ UI แแญแฏแแบแธ
โ โโโ ๐ api/ # FastAPI แแญแฏแทแแแฏแแบ LiteLLM Proxy
โ โโโ ๐ web_ui/ # Gradio Chat Interface
โโโ ๐ scripts/ # Utility scripts
โ โโโ convert_to_unicode.py
โ โโโ push_to_hub.py # Push to HuggingFace Hub
โ โโโ push_space.py # Push to HuggingFace Spaces
โโโ README.md
๐ Quick Start
1. Install Dependencies
cd training
pip install -r requirements.txt
2. Prepare Data
# Convert raw data to normalized Unicode
python scripts/convert_to_unicode.py data/raw --output data/processed
3. Configure Training
Edit training/config.yaml:
model:
name: "Qwen/Qwen2.5-1.5B-Instruct"
lora:
r: 16
lora_alpha: 32
training:
num_train_epochs: 3
learning_rate: 2e-4
bf16: true
4. Train Model
# Unsloth (Recommended - Memory Efficient)
python training/train_unsloth.py
# Standard PEFT
python training/train_lora.py
5. Deploy
# Push to HuggingFace Hub
python scripts/push_to_hub.py
# Create Gradio Space
python scripts/push_space.py
๐ Model Details
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-1.5B-Instruct |
| Architecture | Transformer (Decoder-only) |
| Training Method | Unsloth + QLoRA (4-bit) |
| Context Length | 2048 tokens |
| Parameters | 1.5B |
| Fine-tuning Framework | TRL + PEFT |
LoRA Configuration
lora:
r: 16
lora_alpha: 32
lora_dropout: 0.05
target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- gate_proj
- up_proj
- down_proj
๐ง Training
Requirements
torch>=2.0.0
transformers>=4.36.0
unsloth>=2024.1.0
peft>=0.8.0
trl>=0.7.0
datasets>=2.14.0
accelerate>=0.25.0
Data Format (ShareGPT)
{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "แแผแแบแแฌแ
แแฌแธแกแแผแฑแฌแแบแธแแซ"},
{"role": "assistant", "content": "แแฏแแบแแซแแแบแ"}
]
}
Data Format (Alpaca)
{
"prompt": "แแผแแบแแฌแ
แแฌแธแแแบแแซ",
"response": "แแฏแแบแแซแแแบแ"
}
๐ Deployment
HuggingFace Space (Live Demo)
๐ URL: https://huggingface.co/spaces/amkyawdev/AmkyawDev-LLM-V3
Features:
- ๐ฅ๏ธ Web UI Chat Interface
- โ๏ธ Adjustable Parameters (temperature, max_tokens)
- ๐ฑ Mobile-friendly
Local Deployment
pip install gradio transformers peft
python deployment/web_ui/app.py
๐ก API Usage
FastAPI
from fastapi import FastAPI
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
app = FastAPI()
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("amkyawdev/AmkyawDev-LLM-V3")
@app.post("/generate")
def generate(prompt: str):
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
return {"response": tokenizer.decode(outputs[0])}
โ ๏ธ Limitations
- Knowledge Cutoff - แแแแบแธแกแแปแแบแแแบแแปแฌแธแแแบ training data แแซแแปแญแแบแกแแญแแซแแแบแ
- Language Bias - แแผแแบแแฌแแฌแแฌแ แแฌแธแกแแฝแแบ แกแแผแแทแบแกแ แฏแถ แแแฏแแบแแซแแแบแ
- Hallucination - แแ แบแแซแแ แบแแฌ แแพแฌแธแแฝแแบแธแแฒแท แกแแฌแแปแฌแธแแซแแแบแ
๐ License
MIT License
Copyright (c) 2024 Amkyaw AI
๐ Acknowledgments
- Qwen Team - Base model
- Unsloth AI - Memory efficient training
- Hugging Face - Infrastructure
- TRL - SFTTrainer
- PEFT - LoRA implementation
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support