"""
# Create model in Ollama
ollama create mm-llm-coder -f Modelfile
# Run
ollama run mm-llm-coder
```
## ๐ Evaluation
### Myanmar Code Evaluation
```python
# Example evaluation for Myanmar code generation
myanmar_prompts = [
"Python แแฒแท list แแญแฏ sort แแฏแแบแแแบแธแแฑแธแแซแ",
"JavaScript แแฒแท function แแฑแธแแฑแธแแซแ",
"แแผแแบแแฌ Unicode แแญแฏ Zawgyi แแผแฑแฌแแบแธแแฒแท code แแฑแธแแซแ",
]
# Run generation and evaluate
def evaluate_model(prompts):
results = []
for prompt in prompts:
# Generate code
output = generate(prompt)
results.append({
"prompt": prompt,
"generated": output,
"success": check_syntax(output)
})
return results
# Calculate pass rate
success_rate = sum(1 for r in results if r["success"]) / len(results)
print(f"Success Rate: {success_rate * 100:.2f}%")
```
### Benchmark Adaptation
For Myanmar-specific evaluation, consider:
1. Translating MBPP/MathEval prompts to Myanmar
2. Creating Myanmar coding benchmarks
3. Using BLEU/ROUGE for translation quality
## ๐ Requirements
```
torch>=2.0.0
transformers>=4.35.0
peft>=0.7.0
trl>=0.7.0
accelerate>=0.25.0
datasets>=2.14.0
```
## ๐ง Configuration
```python
from transformers import TrainingArguments
training_args = TrainingArguments(
output_dir="./mm-llm-output",
num_train_epochs=3,
per_device_train_batch_size=4,
learning_rate=2e-4,
fp16=True,
save_steps=500,
eval_steps=500,
save_total_limit=2,
)
```
## ๐ License
This project is licensed under the **MIT License**.
See [LICENSE](LICENSE) for details.
## ๐ค Author
**Amkyaw Dev**
- GitHub: [@amkyawdev](https://github.com/amkyawdev)
- Hugging Face: [amkyawdev](https://huggingface.co/amkyawdev)
## ๐ Acknowledgments
- Microsoft for the phi-2 model
- Hugging Face for Transformers and PEFT
- The Myanmar NLP community
---
Made with โค๏ธ for Myanmar AI Community