Run this model with HF Jobs
Run SathishKumar89/my-python-coder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/SathishKumar89/my-python-coder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SathishKumar89/my-python-coder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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 files12335 unmodified lines39404142434421 unmodified lines666768697071727374757611 unmodified lines888990---base_model: Qwen/Qwen2.5-Coder-1.5B-Instructlibrary_name: peft35 unmodified linesThis model was trained with the following instruction format. Using the same format at inference time will give the best results:## Usage21 unmodified linesinputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=200, do_sample=False)print(tokenizer.decode(outputs[0], skip_special_tokens=True))### Instruction:Write a Python function that checks if a number is prime.### Response:def is_prime(num):# Check for 0 and 1if num <= 1:11 unmodified linesif num % i == 0:return Falsereturn True123435 unmodified lines4041424344454647484950515221 unmodified lines747576777879808182838485868788899091929311 unmodified lines105106107108109110111112113114115116117118119120121122123124125126127128---base_model: Qwen/Qwen2.5-Coder-1.5B-Instructlibrary_name: peft35 unmodified linesThis model was trained with the following instruction format. Using the same format at inference time will give the best results:```### Instruction:<your task description>### Response:<model's answer>```## Usage21 unmodified linesinputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=200, do_sample=False)print(tokenizer.decode(outputs[0], skip_special_tokens=True))```## Example Output**Prompt:**```### Instruction:Write a Python function that checks if a number is prime.### Response:```**Model output:**```pythondef is_prime(num):# Check for 0 and 1if num <= 1:11 unmodified linesif num % i == 0:return Falsereturn True```## Limitations- Trained on a **small subset** (1,500 of 18,612 examples) for only 200 steps — this is a proof-of-concept, not a production model.- May not generalize well to complex Python tasks (large refactors, multi-file projects, advanced libraries).- Inherits any biases or limitations present in the base model and training dataset.- Not evaluated against standard benchmarks.## Future Improvements- Train on the full dataset for multiple epochs- Increase LoRA rank for greater capacity- Evaluate on HumanEval or MBPP benchmarks## Acknowledgements- Base model: [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) by the Qwen team- Dataset: [iamtarun/python_code_instructions_18k_alpaca](https://huggingface.co/datasets/iamtarun/python_code_instructions_18k_alpaca)- Training framework: Hugging Face `transformers`, `peft`, `trl````
README.md+38