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.
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 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.
1from transformers import pipeline
2
3pipe = pipeline(\"text-generation\", model=\"monusharma21/TinyLlama-Python-Coder\")
4prompt = \"<|system|>\nYou are an expert Python programmer.\n<|user|>\nWrite a function to calculate Fibonacci numbers.\n<|assistant|>\"
5print(pipe(prompt, max_new_tokens=200)[0]['generated_text'])