TinyLlama-Python-Coder

This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 on the iamtarun/python_code_instructions_18k_alpaca dataset using QLoRA.

Model description

This model is specialized in generating Python code based on natural language instructions. It was fine-tuned with 4-bit quantization to remain efficient while improving its ability to follow coding tasks.

Intended uses & limitations

  • Intended Use: Assisting with Python code generation, explaining algorithms, and boilerplate creation.

  • Limitations: As a 1.1B parameter model, it may struggle with highly complex logic compared to larger models like Llama-3 or GPT-4. \n## Training and evaluation data

  • Dataset: iamtarun/python_code_instructions_18k_alpaca (subset of 2,000 examples used for this demo).

  • Format: TinyLlama Chat Template.

Usage

from transformers import pipeline

pipe = pipeline(\"text-generation\", model=\"monusharma21/TinyLlama-Python-Coder\")
prompt = \"<|system|>\nYou are an expert Python programmer.\n<|user|>\nWrite a function to calculate Fibonacci numbers.\n<|assistant|>\"
print(pipe(prompt, max_new_tokens=200)[0]['generated_text'])
Downloads last month
-
Safetensors
Model size
1B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for monusharma21/TinyLlama-Python-Coder

Adapter
(1518)
this model