Downloads · 30 days
6
35% of all-time downloads
Tanaybh/my-first-lora-trash-model
my-first-lora-trash-model is a machine learning model from Tanaybh. 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 peft. The card lists the license as apache-2.0.
This is my very first attempt at LoRA fine-tuning, shared for educational purposes. The model generates mostly gibberish, making it a perfect example of what can go wrong when learning parameter-efficient fine-tuning.
Downloads · 30 days
6
35% of all-time downloads
All-time downloads
17
Public
Repo size
3.3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors3.3 MB · 100%
From the Hugging Face model README
This is my very first attempt at LoRA fine-tuning, shared for educational purposes. The model generates mostly gibberish, making it a perfect example of what can go wrong when learning parameter-efficient fine-tuning.
Q: "What is deep learning?"
A: "Deep learning is a way to understand the data that is being collected. It is a way to display the data that is used to analyze the data..."
Q: "How do you debug a Python program?"
A: "The debug code is :"
Q: "Explain overfitting"
A: "Overfitting the size of the car is a very common technique for removing a car from the vehicle..."
Yes, it really thinks overfitting is about cars! 🚗
This beautiful failure taught me:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load the trash model
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small")
base_model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small")
model = PeftModel.from_pretrained(base_model, "Tanaybh/my-first-lora-trash-model")
# Generate hilariously bad responses
def generate_trash(prompt):
inputs = tokenizer.encode(f"Instruction: {prompt}\nResponse:", return_tensors="pt")
outputs = model.generate(inputs, max_length=100, temperature=0.7, do_sample=True)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Try it out!
print(generate_trash("What is machine learning?"))
# Expect something like: "Machine learning is when computers learn to computer the learning..."
After this failure, I learned to:
This model is perfect for:
#LoRA #EducationalFailure #MachineLearning #LearningJourney #InstructionTuning
Remember: Every expert was once a beginner who made mistakes like this! Share your failures, they're often more valuable than your successes. 🌟