Downloads · 30 days
0
nimeth02/tea-gpt2-lora-sft
tea-gpt2-lora-sft is a text generation model from nimeth02. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This model is a LoRA fine-tuned GPT-2 model using the PEFT library. It was trained on a domain-specific dataset related to [insert topic here, e.g., "tea conversations", "Sri Lankan literature", etc.].
Downloads · 30 days
0
Access
Public
Updated Jul 19, 2025
Repo size
1.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 MB · 100%
From the Hugging Face model README
This model is a LoRA fine-tuned GPT-2 model using the PEFT library. It was trained on a domain-specific dataset related to [insert topic here, e.g., "tea conversations", "Sri Lankan literature", etc.].
gpt2You can use this model for:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("gpt2")
lora_model = PeftModel.from_pretrained(base_model, "nimeth02/tea-gpt2-lora-sft")
tokenizer = AutoTokenizer.from_pretrained("gpt2")
input_text = "Once upon a time in a tea garden"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
output = lora_model.generate(input_ids, max_new_tokens=50)
print(tokenizer.decode(output[0], skip_special_tokens=True))