A merged QLoRA fine-tuned CodeLlama-7B model optimized for Python programming tasks, available in GGUF format with multiple quantization options for efficient deployment.
A merged version of the QLoRA fine-tuned CodeLlama-7B model specifically optimized for Python programming assistance. The LoRA weights have been merged with the base model and converted to GGUF format for easy deployment across multiple platforms.
This model is based on Meta's CodeLlama-7B and has been fine-tuned using QLoRA (4-bit quantization with LoRA) on approximately 2,000 custom Python programming examples. The merged GGUF format provides a self-contained model that requires no separate adapter files.
Choose the quantization level based on your hardware constraints and quality requirements:
When using this model to assist with Python programming tasks, follow these steps:
First, determine which quantization level is appropriate based on available system resources:
Download the model from HuggingFace: `pranav-pvnn/codellama-7b-python-ai-assistant-full-gguf`
CRITICAL: Always use this exact prompt format for optimal results:
```
[Your instruction here]
```
The model has been specifically trained to recognize this format. Do not deviate from it.
#### For llama.cpp:
```bash
./llama-cli -m codellama-7b-merged-Q4_K_M.gguf -p "### Instruction:\n[task description]\n### Response:\n"
```
#### For Python (llama-cpp-python):
```python
from llama_cpp import Llama
llm = Llama(model_path="codellama-7b-merged-Q4_K_M.gguf")
prompt = "### Instruction:\n[task description]\n### Response:\n"
output = llm(prompt, max_tokens=256)
print(output['choices'][0]['text'])
```
#### For Ollama:
1. Create a Modelfile:
```
FROM ./codellama-7b-merged-Q4_K_M.gguf
```
2. Create and run the model:
```bash
ollama create my-codellama -f Modelfile
ollama run my-codellama "[task description]"
```
When generating code, use these recommended parameters:
1. **Be Specific**: Provide clear, detailed instructions about what the code should accomplish
2. **Include Context**: Mention any constraints (performance, libraries, Python version)
3. **Request Documentation**: Ask for docstrings and comments when needed
4. **Iterative Refinement**: For complex tasks, break them into smaller functions and build incrementally
5. **Validation**: Always review and test generated code before deployment
This model excels at:
**Task**: Create a function to calculate factorial
**Prompt**:
```
Write a Python function to calculate factorial of a number with input validation and docstring.
```
**Expected Output**: A complete Python function with proper error handling, type hints, and documentation.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/codellama-7b-python-ai-assistant/raw