Text Generation
Transformers
Safetensors
Burmese
English
qwen2
code
qwen
Generated from Trainer
myanmar-nlp
ai-agent
conversational
text-generation-inference
Instructions to use amkyawdev/amk-coder-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amkyawdev/amk-coder-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amkyawdev/amk-coder-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amkyawdev/amk-coder-v2") model = AutoModelForCausalLM.from_pretrained("amkyawdev/amk-coder-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use amkyawdev/amk-coder-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amkyawdev/amk-coder-v2" # 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/amk-coder-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amkyawdev/amk-coder-v2
- SGLang
How to use amkyawdev/amk-coder-v2 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/amk-coder-v2" \ --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/amk-coder-v2", "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/amk-coder-v2" \ --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/amk-coder-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amkyawdev/amk-coder-v2 with Docker Model Runner:
docker model run hf.co/amkyawdev/amk-coder-v2
Update README.md with model details
Browse files
README.md
CHANGED
|
@@ -17,197 +17,122 @@ language:
|
|
| 17 |
metrics:
|
| 18 |
- accuracy
|
| 19 |
---
|
| 20 |
-
# Model Card for
|
| 21 |
-
|
| 22 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
## Model Details
|
| 27 |
|
| 28 |
### Model Description
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
- **
|
| 35 |
-
- **
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
- **
|
| 39 |
-
- **
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
### Out-of-Scope Use
|
| 67 |
-
|
| 68 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 69 |
-
|
| 70 |
-
[More Information Needed]
|
| 71 |
-
|
| 72 |
-
## Bias, Risks, and Limitations
|
| 73 |
-
|
| 74 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 75 |
-
|
| 76 |
-
[More Information Needed]
|
| 77 |
-
|
| 78 |
-
### Recommendations
|
| 79 |
-
|
| 80 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 81 |
-
|
| 82 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 83 |
-
|
| 84 |
-
## How to Get Started with the Model
|
| 85 |
-
|
| 86 |
-
Use the code below to get started with the model.
|
| 87 |
-
|
| 88 |
-
[More Information Needed]
|
| 89 |
|
| 90 |
## Training Details
|
| 91 |
|
| 92 |
### Training Data
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
#### Preprocessing [optional]
|
| 103 |
-
|
| 104 |
-
[More Information Needed]
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
#### Training Hyperparameters
|
| 108 |
-
|
| 109 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 110 |
-
|
| 111 |
-
#### Speeds, Sizes, Times [optional]
|
| 112 |
-
|
| 113 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
## Evaluation
|
| 118 |
-
|
| 119 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 120 |
-
|
| 121 |
-
### Testing Data, Factors & Metrics
|
| 122 |
-
|
| 123 |
-
#### Testing Data
|
| 124 |
-
|
| 125 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 126 |
-
|
| 127 |
-
[More Information Needed]
|
| 128 |
-
|
| 129 |
-
#### Factors
|
| 130 |
-
|
| 131 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 132 |
-
|
| 133 |
-
[More Information Needed]
|
| 134 |
-
|
| 135 |
-
#### Metrics
|
| 136 |
-
|
| 137 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
|
| 141 |
-
|
|
|
|
| 142 |
|
| 143 |
-
|
|
|
|
|
|
|
| 144 |
|
| 145 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
|
|
|
| 148 |
|
| 149 |
-
##
|
|
|
|
| 150 |
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
## Environmental Impact
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
#### Hardware
|
| 178 |
-
|
| 179 |
-
[More Information Needed]
|
| 180 |
-
|
| 181 |
-
#### Software
|
| 182 |
-
|
| 183 |
-
[More Information Needed]
|
| 184 |
-
|
| 185 |
-
## Citation [optional]
|
| 186 |
-
|
| 187 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 188 |
-
|
| 189 |
-
**BibTeX:**
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
**APA:**
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Glossary [optional]
|
| 198 |
-
|
| 199 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
## More Information [optional]
|
| 204 |
-
|
| 205 |
-
[More Information Needed]
|
| 206 |
-
|
| 207 |
-
## Model Card Authors [optional]
|
| 208 |
-
|
| 209 |
-
[More Information Needed]
|
| 210 |
-
|
| 211 |
-
## Model Card Contact
|
| 212 |
-
|
| 213 |
-
[More Information Needed]
|
|
|
|
| 17 |
metrics:
|
| 18 |
- accuracy
|
| 19 |
---
|
| 20 |
+
# Model Card for amk-coder-v2
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Model Details
|
| 23 |
|
| 24 |
### Model Description
|
| 25 |
+
Myanmar-localized coding agent model fine-tuned from Qwen/Qwen2.5-Coder-1.5B using LoRA (PEFT). Designed for code generation and coding assistance in Myanmar language context.
|
| 26 |
+
|
| 27 |
+
- **Developed by:** amkyawdev
|
| 28 |
+
- **Model type:** Language Model (LLM)
|
| 29 |
+
- **Language(s) (NLP):** Myanmar (my), English (en)
|
| 30 |
+
- **License:** Apache-2.0
|
| 31 |
+
- **Finetuned from model:** Qwen/Qwen2.5-Coder-1.5B
|
| 32 |
+
|
| 33 |
+
### Model Sources
|
| 34 |
+
- **Repository:** [amkyawdev/amk-coder-v2](https://huggingface.co/amkyawdev/amk-coder-v2)
|
| 35 |
+
- **Dataset:** [amkyawdev/mm-llm-coder-agent-dataset](https://huggingface.co/datasets/amkyawdev/mm-llm-coder-agent-dataset)
|
| 36 |
+
|
| 37 |
+
## Model Configuration
|
| 38 |
+
|
| 39 |
+
| Parameter | Value |
|
| 40 |
+
|-----------|-------|
|
| 41 |
+
| Base Model | Qwen/Qwen2.5-Coder-1.5B |
|
| 42 |
+
| Fine-tuning Method | LoRA (PEFT) |
|
| 43 |
+
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
|
| 44 |
+
| Optimizer | paged_adamw_8bit |
|
| 45 |
+
| Precision | FP16 Mixed Precision |
|
| 46 |
+
| Learning Rate | 3e-5 |
|
| 47 |
+
| Training Infrastructure | Kaggle Cloud (Dual NVIDIA T4 GPUs) |
|
| 48 |
+
|
| 49 |
+
## Chat Template
|
| 50 |
+
|
| 51 |
+
This model uses the ChatML structure:
|
| 52 |
+
|
| 53 |
+
```xml
|
| 54 |
+
<|im_start|>system
|
| 55 |
+
You are an expert Myanmar AI coding agent with tool access.<|im_end|>
|
| 56 |
+
<|im_start|>user
|
| 57 |
+
{Instruction}
|
| 58 |
+
Tools available: {Tools}<|im_end|>
|
| 59 |
+
<|im_start|>assistant
|
| 60 |
+
Thought & Code:
|
| 61 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
## Training Details
|
| 64 |
|
| 65 |
### Training Data
|
| 66 |
+
- **Dataset:** amkyawdev/mm-llm-coder-agent-dataset
|
| 67 |
+
- **Description:** Myanmar localized coding agent dataset for instruction-tuned code generation
|
| 68 |
|
| 69 |
+
### Training Hyperparameters
|
| 70 |
+
| Parameter | Value |
|
| 71 |
+
|-----------|-------|
|
| 72 |
+
| Precision | FP16 Mixed Precision |
|
| 73 |
+
| Optimizer | paged_adamw_8bit |
|
| 74 |
+
| Learning Rate | 3e-5 |
|
| 75 |
+
| Hardware | Kaggle Cloud (Dual NVIDIA T4 GPUs) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
## How to Get Started with the Model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
```python
|
| 80 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 81 |
|
| 82 |
+
model_name = "amkyawdev/amk-coder-v2"
|
| 83 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 84 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 85 |
|
| 86 |
+
# Chat prompt format
|
| 87 |
+
prompt = """<|im_start|>system
|
| 88 |
+
You are an expert Myanmar AI coding agent with tool access.<|im_end|>
|
| 89 |
+
<|im_start|>user
|
| 90 |
+
Write a Python function to add two numbers
|
| 91 |
+
Tools available: python<|im_end|>
|
| 92 |
+
<|im_start|>assistant
|
| 93 |
+
Thought & Code:
|
| 94 |
+
"""
|
| 95 |
|
| 96 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 97 |
+
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 98 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 99 |
+
```
|
| 100 |
|
| 101 |
+
## Uses
|
| 102 |
|
| 103 |
+
### Direct Use
|
| 104 |
+
This model can be used for code generation tasks with Myanmar language instructions. Suitable for building coding assistants that understand Burmese/Myanmar language prompts.
|
| 105 |
|
| 106 |
+
### Out-of-Scope Use
|
| 107 |
+
- Not intended for production deployment without fine-tuning
|
| 108 |
+
- Not tested for safety-critical applications
|
| 109 |
+
- May generate incorrect code; always verify outputs
|
| 110 |
|
| 111 |
+
## Bias, Risks, and Limitations
|
| 112 |
+
- Model may generate syntactically incorrect code
|
| 113 |
+
- May not follow security best practices
|
| 114 |
+
- Training data quality affects output quality
|
| 115 |
+
- Myanmar language support may be limited compared to English
|
| 116 |
|
| 117 |
## Environmental Impact
|
| 118 |
+
- **Hardware Type:** NVIDIA T4 GPUs (Dual)
|
| 119 |
+
- **Cloud Provider:** Kaggle
|
| 120 |
+
- **Training Time:** ~3-5 hours
|
| 121 |
+
|
| 122 |
+
## Citation
|
| 123 |
+
|
| 124 |
+
If you use this model, please cite:
|
| 125 |
+
|
| 126 |
+
```
|
| 127 |
+
@misc{amk-coder-v2,
|
| 128 |
+
author = {amkyawdev},
|
| 129 |
+
title = {amk-coder-v2: Myanmar Coding Agent Model},
|
| 130 |
+
year = {2025},
|
| 131 |
+
publisher = {HuggingFace},
|
| 132 |
+
url = {https://huggingface.co/amkyawdev/amk-coder-v2}
|
| 133 |
+
}
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
## More Information
|
| 137 |
+
- Dataset: [amkyawdev/mm-llm-coder-agent-dataset](https://huggingface.co/datasets/amkyawdev/mm-llm-coder-agent-dataset)
|
| 138 |
+
- Base Model: [Qwen/Qwen2.5-Coder-1.5B](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|