Downloads · 30 days
0
kunjcr2/stackoverflow-flan-finetune
stackoverflow-flan-finetune is a machine learning model from kunjcr2. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This is a fine-tuned version of google/flan-t5-base on a curated dataset of Stack Overflow programming questions. It was trained using LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning, making it compact,…
Downloads · 30 days
0
Access
Public
Updated Aug 13, 2025
Repo size
582 MB
Likes
0
Public
Click a slice to open those files.
.pt2.8 MB · 42%
From the Hugging Face model README
google/flan-t5-base on a curated dataset of Stack Overflow programming questions. It was trained using LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning, making it compact, efficient, and effective at modeling developer-style Q&A tasks.The model is trained to:
google/flan-t5-basepeftadapter_model.safetensorsadapter_config.jsonr: 8lora_alpha: 16lora_dropout: 0.1bias: "none"task_type: "SEQ_2_SEQ_LM"from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from peft import PeftModel
# Load tokenizer and base model
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
base_model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-base")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "your-model-folder")
model.eval()
# Inference
prompt = "Rewrite this question more clearly: why is my javascript function undefined?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
🧪 Intended Use This model is best suited for: Code-aware chatbot assistants Prompt engineering for developer tools Developer-focused summarization / rephrasing Auto-moderation / clarification of tech questions
⚠️ Limitations Not trained for code generation or long-form answers May hallucinate incorrect or generic responses Finetuned only on Stack Overflow — domain-specific
✨ Acknowledgements Hugging Face Transformers LoRA (PEFT) Stack Overflow for open data FLAN-T5: Scaling Instruction-Finetuned Models
🛠️ Created with love by Kunj | Model suggestion & guidance by ChatGPT