Instructions to use SathishKumar89/my-python-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SathishKumar89/my-python-coder with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "SathishKumar89/my-python-coder") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,26 +1,40 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- code
|
| 6 |
- python
|
| 7 |
- lora
|
| 8 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# my-python-coder
|
| 12 |
|
| 13 |
-
A LoRA fine-tune of Qwen2.5-Coder-1.5B-Instruct specialized for Python code generation.
|
|
|
|
|
|
|
| 14 |
|
| 15 |
## Training Details
|
| 16 |
-
- **Base model:** Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 17 |
-
- **Dataset:** iamtarun/python_code_instructions_18k_alpaca (first 1,500 examples)
|
| 18 |
-
- **Method:** LoRA (r=16, alpha=32, target_modules=all-linear)
|
| 19 |
-
- **Steps:** 200
|
| 20 |
-
- **Hardware:** Google Colab T4
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
Trained on a small subset; may not generalize to all Python tasks.
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 3 |
library_name: peft
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
tags:
|
| 8 |
- code
|
| 9 |
- python
|
| 10 |
- lora
|
| 11 |
+
- peft
|
| 12 |
+
- qwen2
|
| 13 |
+
- code-generation
|
| 14 |
+
datasets:
|
| 15 |
+
- iamtarun/python_code_instructions_18k_alpaca
|
| 16 |
---
|
| 17 |
|
| 18 |
# my-python-coder
|
| 19 |
|
| 20 |
+
A LoRA fine-tune of [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) specialized for Python code generation.
|
| 21 |
+
|
| 22 |
+
This model was fine-tuned as a learning project to demonstrate the full workflow of taking a base model, training it on a custom dataset, and publishing it to the Hugging Face Hub.
|
| 23 |
|
| 24 |
## Training Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
| Parameter | Value |
|
| 27 |
+
|---|---|
|
| 28 |
+
| **Base model** | `Qwen/Qwen2.5-Coder-1.5B-Instruct` |
|
| 29 |
+
| **Dataset** | `iamtarun/python_code_instructions_18k_alpaca` (first 1,500 examples) |
|
| 30 |
+
| **Method** | LoRA (r=16, alpha=32, target_modules=`all-linear`) |
|
| 31 |
+
| **Training steps** | 200 |
|
| 32 |
+
| **Learning rate** | 2e-4 |
|
| 33 |
+
| **Effective batch size** | 8 (batch=2 × grad_accum=4) |
|
| 34 |
+
| **Max sequence length** | 1024 |
|
| 35 |
+
| **Hardware** | Google Colab (NVIDIA T4, 16 GB VRAM) |
|
| 36 |
+
| **Training time** | ~33 minutes |
|
| 37 |
+
|
| 38 |
+
## Prompt Format
|
| 39 |
|
| 40 |
+
This model was trained with the following instruction format. Using the same format at inference time will give the best results:
|
|
|