How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "chrisnic/Python_Ass"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "chrisnic/Python_Ass",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/chrisnic/Python_Ass
Quick Links

Python Code Assistant based on LLaMA 3.1

This model is a specialized Python coding assistant, fine-tuned from LLaMA 3.1 8B Instruct using a two-stage training approach with carefully curated Python programming datasets.

Model Description

The model has been trained to assist with Python programming tasks through a progressive fine-tuning approach:

First Training Stage

Second Training Stage

  • Dataset: flytech/python-codes-25k
  • Focus: Enhancing code generation capabilities and understanding of advanced Python concepts

Training Methodology

The model employs several advanced training techniques to ensure optimal performance:

  • LoRA Fine-tuning Parameters:

    • Rank (r): 8
    • Alpha: 16
    • Dropout: 0.1
    • Target Modules: Query and Value Projections
  • Training Optimizations:

    • 4-bit quantization (NF4 format)
    • Gradient checkpointing
    • Dynamic learning rate adjustment
    • Early stopping with patience=3
    • Adaptive batch processing
    • Memory-efficient training with automated cleanup

Model Architecture

  • Base Architecture: LLaMA 3.1 8B Instruct
  • Training Format: 4-bit quantization with double quantization
  • Memory Efficient: Optimized for deployment with reduced memory footprint

Intended Uses

This model is designed for:

  • Generating Python code from natural language descriptions
  • Assisting with code completion and suggestions
  • Explaining Python concepts and best practices
  • Helping with code debugging and optimization
  • Supporting Python development tasks

Training Data

The model was trained on a combination of:

  1. 18,000 Python programming instructions and implementations from the Alpaca dataset
  2. 25,000 Python code examples and explanations

Performance and Limitations

Strengths

  • Specialized in Python programming tasks
  • Memory-efficient implementation
  • Trained with gradient stability monitoring
  • Optimized for practical coding assistance

Limitations

  • Limited to Python programming language
  • Based on LLaMA 3.1's knowledge cutoff
  • May require context for complex programming tasks

Usage Tips

To get the best results from this model:

  1. Provide clear and specific instructions
  2. Include relevant context when asking for code
  3. Specify any particular Python version or library requirements
  4. Mention any performance or style preferences

Training Hardware Requirements

The model was trained using:

  • GPU RTX4090 24GB VRAM
  • CUDA compatibility
  • Optimized for memory efficiency through 4-bit quantization

License and Usage Rights

  • Base model: LLaMA 3.1 license applies
  • Additional training: [Specify your license]

Citation and Contact

[christiannicoletti75@gmail.com]

Downloads last month
35
Safetensors
Model size
8B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for chrisnic/Python_Ass

Finetuned
(1,454)
this model