Transformers
Safetensors
PEFT
code
coding
software-development
programming
llm
python
qwen
lora
finetuned
Instructions to use amkyawdev/mm-coder-agent-v1-combined with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amkyawdev/mm-coder-agent-v1-combined with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("amkyawdev/mm-coder-agent-v1-combined", dtype="auto") - PEFT
How to use amkyawdev/mm-coder-agent-v1-combined with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| tags: | |
| - code | |
| - coding | |
| - software-development | |
| - programming | |
| - llm | |
| - python | |
| - qwen | |
| - transformers | |
| - peft | |
| - lora | |
| - finetuned | |
| license: apache-2.0 | |
| # 🤖 MM Coder Agent v1 | |
| A professional AI coding assistant model fine-tuned from Qwen2.5-1.5B-Instruct for software development tasks. | |
| ## Model Overview | |
| | Property | Value | | |
| |----------|-------| | |
| | **Base Model** | Qwen/Qwen2.5-1.5B-Instruct | | |
| | **Architecture** | LoRA (PEFT Adapter) | | |
| | **Parameters** | 1.5B (base) + 37MB (adapter) | | |
| | **Task** | Code Generation / Software Development | | |
| | **Framework** | Transformers, Safetensors | | |
| ## Model Description | |
| MM Coder Agent v1 is a specialized coding assistant built on Qwen2.5-1.5B-Instruct. This model is optimized for: | |
| - **Code Generation** - Generate clean, efficient code in multiple languages | |
| - **Bug Detection** - Identify and fix common programming errors | |
| - **Algorithm Implementation** - Implement sorting, searching, and data structures | |
| - **Code Review** - Assist with code review and best practices | |
| ### Architecture Details | |
| ```json | |
| { | |
| "peft_type": "LORA", | |
| "base_model_name_or_path": "Qwen/Qwen2.5-1.5B-Instruct", | |
| "r": 16, | |
| "lora_alpha": 32, | |
| "lora_dropout": 0.0, | |
| "task_type": "CAUSAL_LM", | |
| "target_modules": ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"] | |
| } | |
| ``` | |
| ## Live Demo | |
| Try the model live at: [mm-coder-v1-space](https://huggingface.co/spaces/amkyawdev/mm-coder-v1-space) | |
| ## Quick Start | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| import torch | |
| from peft import PeftModel, PeftConfig | |
| # Load adapter config | |
| peft_config = PeftConfig.from_pretrained("amkyawdev/mm-coder-agent-v1-combined") | |
| # Load base model | |
| base_model = AutoModelForCausalLM.from_pretrained( | |
| peft_config.base_model_name_or_path, | |
| torch_dtype=torch.float16, | |
| device_map="auto", | |
| trust_remote_code=True | |
| ).eval() | |
| # Load tokenizer | |
| tokenizer = AutoTokenizer.from_pretrained( | |
| peft_config.base_model_name_or_path, | |
| trust_remote_code=True | |
| ) | |
| # Load LoRA adapter | |
| model = PeftModel.from_pretrained(base_model, "amkyawdev/mm-coder-agent-v1-combined") | |
| # Generate code | |
| prompt = "Write a Python function to calculate fibonacci numbers" | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| with torch.no_grad(): | |
| outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7) | |
| response = tokenizer.decode(outputs[0], skip_special_tokens=True) | |
| print(response) | |
| ``` | |
| ## Example Outputs | |
| | Prompt | Output | | |
| |--------|--------| | |
| | `python hello world` | `print("Hello, World!")` | | |
| | `reverse string python` | `s[::-1]` | | |
| | `fibonacci function python` | Full fibonacci implementation | | |
| | `bubble sort python` | Bubble sort algorithm | | |
| ## Training Data | |
| - **Dataset**: mm-llm-coder-dataset (4M rows) | |
| - **Additional**: mm-llm-coder-agent-dataset (4M rows) | |
| - **Source**: Quality coding prompts and responses | |
| ## Use Cases | |
| ### Ideal For | |
| - Code completion and generation | |
| - Bug detection and fixing | |
| - Algorithm implementation | |
| - Learning programming concepts | |
| - Quick prototyping | |
| ### Not Recommended For | |
| - Production-critical systems without evaluation | |
| - Security-sensitive applications without guardrails | |
| - Tasks beyond software development | |
| ## Limitations | |
| - 1.5B parameter model (smaller than GPT-4 class) | |
| - May produce incorrect code - always verify outputs | |
| - Limited context window | |
| - Fine-tuned primarily for English | |
| ## License | |
| Apache 2.0 | |
| ## Citation | |
| ```bibtex | |
| @model{amkyawdev/mm-coder-agent-v1-combined, | |
| title={MM Coder Agent v1}, | |
| author={amkyawdev}, | |
| year={2024}, | |
| url={https://huggingface.co/amkyawdev/mm-coder-agent-v1-combined} | |
| } | |
| ``` | |
| --- | |
| *Built with ❤️ using Transformers and PEFT* |