Downloads · 30 days
11
9% of all-time downloads
Sameer2407/fine-tuned-distilgpt2
fine-tuned-distilgpt2 is a text generation model from Sameer2407. Use it when you need the model to write or continue text. It is set up for transformers.
This is a fine-tuned version of DistilGPT2 using a small dataset of restaurant reviews. The model is trained to generate human-like review completions given a text prompt.
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
126
Public
Parameters
81.9M
328 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors328 MB · 99%
From the Hugging Face model README
This is a fine-tuned version of DistilGPT2 using a small dataset of restaurant reviews. The model is trained to generate human-like review completions given a text prompt.
This model is a lightweight causal language model based on DistilGPT2, a distilled version of GPT2. It was fine-tuned on a small subset of restaurant reviews to help demonstrate how one can fine-tune and upload a model using Hugging Face and Google Colab with limited resources.
You can use this model to generate restaurant reviews or autocomplete a review sentence given a starting prompt like:
"The food was"
This model can be further fine-tuned on a larger corpus of restaurant, product, or service-related reviews to make it more robust and production-ready.
This model was trained on a tiny dataset of restaurant reviews and may reflect language biases or poor generation quality due to undertraining. It's only for educational/demo purposes.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("your-username/fine-tuned-distilgpt2")
model = AutoModelForCausalLM.from_pretrained("your-username/fine-tuned-distilgpt2")
prompt = "The restaurant was"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=50, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))