Downloads · 30 days
0
howtomakepplragequit/phi2-lora-instruct
phi2-lora-instruct is a machine learning model from howtomakepplragequit. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a LoRA fine-tuned version of Microsoft’s Phi-2 model trained on 500 examples from the yahma/alpaca-cleaned instruction dataset.
Downloads · 30 days
0
Access
Public
Updated May 28, 2025
Repo size
10.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors10.5 MB · 68%
From the Hugging Face model README
This is a LoRA fine-tuned version of Microsoft’s Phi-2 model trained on 500 examples from the yahma/alpaca-cleaned instruction dataset.
howtomakepplragequit — working on scalable, efficient LLM training for real-world instruction-following.
bitsandbytes for efficient memory useyahma/alpaca-cleanedTrainer)Instruction: Give three tips to improve time management.
To use this model in your own project:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("howtomakepplragequit/phi2-lora-instruct")
tokenizer = AutoTokenizer.from_pretrained("howtomakepplragequit/phi2-lora-instruct")
input_text = "### Instruction:\nExplain how machine learning works.\n\n### Response:"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
output = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))