# Method 1: Pipeline (Recommended for beginners)from transformers import pipeline pipe = pipeline("text-generation", model="amkyawdev/amk-coder-v2")messages = [ {"role": "user", "content": "Python function တစ်ခုရေးပါ။ list comprehension နဲ့ sorting လုပ်ပေးပါ။"}]result = pipe(messages, max_new_tokens=512, temperature=0.2)print(result[0]['generated_text']) # Method 2: Direct Model Loadingfrom transformers import AutoTokenizer, AutoModelForCausalLMimport torch tokenizer = AutoTokenizer.from_pretrained("amkyawdev/amk-coder-v2")model = AutoModelForCausalLM.from_pretrained( "amkyawdev/amk-coder-v2", torch_dtype=torch.bfloat16, device_map="auto") messages = [ {"role": "system", "content": "You are a helpful coding assistant."}, {"role": "user", "content": "Write a Python function to reverse a string"}] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt").to(model.device) outputs = model.generate(inputs, max_new_tokens=512, temperature=0.2)response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)print(response)