<|im_start|>system
You are an expert Myanmar AI coding agent with tool access.<|im_end|>
<|im_start|>user
{Instruction}
Tools available: {Tools}<|im_end|>
<|im_start|>assistant
Thought & Code:
Quick Start
Using Transformers (Python)
python
1# Method 1: Pipeline (Recommended for beginners)2from transformers import pipeline
34pipe = pipeline("text-generation", model="amkyawdev/amk-coder-v2")5messages =[6{"role":"user","content":"Python function တစ်ခုရေးပါ။ list comprehension နဲ့ sorting လုပ်ပေးပါ။"}7]8result = pipe(messages, max_new_tokens=512, temperature=0.2)9print(result[0]['generated_text'])1011# Method 2: Direct Model Loading12from transformers import AutoTokenizer, AutoModelForCausalLM
13import torch
1415tokenizer = AutoTokenizer.from_pretrained("amkyawdev/amk-coder-v2")16model = AutoModelForCausalLM.from_pretrained(17"amkyawdev/amk-coder-v2",18 torch_dtype=torch.bfloat16,19 device_map="auto"20)2122messages =[23{"role":"system","content":"You are a helpful coding assistant."},24{"role":"user","content":"Write a Python function to reverse a string"}25]2627inputs = tokenizer.apply_chat_template(28 messages,29 add_generation_prompt=True,30 return_tensors="pt"31).to(model.device)3233outputs = model.generate(inputs, max_new_tokens=512, temperature=0.2)34response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)35print(response)
1# Streaming chat2curl -X POST "http://localhost:8000/chat"\3 -H "Content-Type: application/json"\4 -d '{
5 "messages": [
6 {"role": "user", "content": "Write a Fibonacci function in Python"}
7 ],
8 "stream": true
9 }'
Docker Deployment
bash
1# Using Docker Model Runner2docker model run hf.co/amkyawdev/amk-coder-v2
34# Using vLLM Docker5docker run --gpus all \6 -v ~/.cache/huggingface:/root/.cache/huggingface \7 -p 8000:8000 \8 --rm \9 vllm/vllm-openai:latest \10 --model amkyawdev/amk-coder-v2
⚠️ Limitations
Context Length - Maximum 32,768 tokens
Code Quality - May generate incorrect code; verify outputs
Myanmar Unicode - Best results with proper Zawgyi-to-Unicode conversion
Domain Knowledge - Limited to common programming languages
Safety - May produce harmful content; use responsible AI practices