Downloads · 30 days
151
63% of all-time downloads
rahmaelnabarawy/gptneo125m-finetuned-generate-reviews
gptneo125m-finetuned-generate-reviews is a text generation model from rahmaelnabarawy. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
151
63% of all-time downloads
All-time downloads
238
Public
Parameters
125M
501 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors501 MB · 99%
From the Hugging Face model README
This model is a review-generation fine-tuned version of EleutherAI/gpt-neo-125M, trained using LoRA (Low-Rank Adaptation) on the Yelp Review Full dataset.
The model generates structured and natural-sounding restaurant and product reviews when prompted in a conversational format.
Fine-tuning was performed using parameter-efficient training, and LoRA weights were merged into the base model for standalone deployment.
This is a causal language model fine-tuned for review generation.
Expected prompt format:
User: Write a review about a new restaurant.
Assistant:
The model generates a realistic review continuation after Assistant:.
Causal Language Model (GPT-Neo architecture) fine-tuned using LoRA
English
EleutherAI/gpt-neo-125M
https://huggingface.co/EleutherAI/gpt-neo-125M
Low-Rank Adaptation (LoRA)
LoRA enables efficient fine-tuning by training a very small subset of parameters instead of updating the entire model.
After training:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(
"rahmaelnabarawy/gptneo125m-finetuned-generate-reviews"
).to(device)
tokenizer = AutoTokenizer.from_pretrained(
"rahmaelnabarawy/gptneo125m-finetuned-generate-reviews"
)
prompt = """User: Write a review about a nearby coffee shop.
Assistant:"""
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.8,
top_p=0.95,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Yelp Review Full
https://huggingface.co/datasets/yelp_review_full
Training subset used:
User: Write a review.
Assistant: <review text>
The conversational structure was intentionally used to guide generation behavior.
| Parameter | Value |
|---|---|
| Base Model | GPT-Neo-125M |
| LoRA Rank (r) | 16 |
| LoRA Alpha | 16 |
| LoRA Dropout | 0.05 |
| Epochs | 3 |
| Batch Size | 8 |
| Gradient Accumulation | 2 |
| Learning Rate | 2e-4 |
| Block Size | 128 |
| Optimizer | AdamW |
| Precision | FP16 (if GPU available) |
GPT-Neo Transformer
Hardware:
Software:
This model is NOT intended for: