monusharma21's picture
Upload README.md with huggingface_hub
91f986b verified
metadata
license: apache-2.0
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
tags:
  - trl
  - sft
  - generated_from_trainer
  - lora
  - python-coder
model-index:
  - name: TinyLlama-Python-Coder
    results: []

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'])