A lightweight Python coding assistant powered by Google's Gemma 2 2B model, optimized for code generation, debugging, and Python development tasks with 4-bit quantization for efficient inference.
A specialized coding assistant fine-tuned on Google's Gemma 2 2B model, optimized for Python development tasks. This model uses 4-bit GGUF quantization for efficient local inference while maintaining strong code generation capabilities.
This skill provides a lightweight, locally-runnable Python coding assistant that can:
The model is quantized to 4-bit precision using GGUF format, making it suitable for running on consumer hardware while delivering practical coding assistance.
When a user requests Python coding help, follow these steps:
1. **Understand the Request**
- Carefully read the user's coding question, bug report, or feature request
- Identify whether they need: code generation, debugging, explanation, or optimization
- Note any specific Python libraries, frameworks, or constraints mentioned
2. **Analyze Context**
- If the user provided existing code, analyze it for syntax, logic, and structure
- Identify the core problem or requirement
- Consider Python best practices and idiomatic patterns
3. **Generate Response**
- For code generation: Write clean, well-commented Python code that solves the problem
- For debugging: Identify the issue, explain the root cause, and provide a corrected version
- For explanations: Break down the code step-by-step in clear language
- For optimization: Suggest improvements with before/after examples
4. **Format Output**
- Use proper markdown code blocks with Python syntax highlighting
- Include inline comments for complex logic
- Add brief explanations before or after code blocks
- Provide example usage when appropriate
5. **Verify Quality**
- Ensure code follows PEP 8 style guidelines
- Check for common Python pitfalls (mutable defaults, scope issues, etc.)
- Validate that the solution addresses the original request
**Example 1: Code Generation**
```
User: "Write a function to find the longest palindrome in a string"
Assistant: [Generates a clean Python function with explanation]
```
**Example 2: Debugging**
```
User: "Why is my list comprehension not working? [code snippet]"
Assistant: [Identifies the issue, explains the problem, provides corrected code]
```
**Example 3: Optimization**
```
User: "How can I make this loop faster? [code snippet]"
Assistant: [Suggests vectorization, list comprehensions, or other optimizations]
```
This GGUF model can be run locally using:
Hardware recommendations:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/gemma-2-python-code-assistant/raw