Downloads · 30 days
7
23% of all-time downloads
Sameer2407/PriceLLaMAA-2025-04-28_07.20.50
PriceLLaMAA-2025-04-28_07.20.50 is a machine learning model from Sameer2407. 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 llama3.1.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
7
23% of all-time downloads
All-time downloads
30
Public
Repo size
126 MB
Likes
2
Public
Click a slice to open those files.
.safetensors109 MB · 86%
From the Hugging Face model README
This repository contains a fine-tuned LLaMa model for predicting product prices based on descriptions. It's trained using the ed-donner/pricer-data dataset and the trl library for Supervised Fine-Tuning (SFT) with LoRA (Low-Rank Adaptation).
The base model used is meta-llama/Meta-Llama-3.1-8B. It's quantized to 4 bits using bitsandbytes for memory efficiency. The model is fine-tuned using LoRA, targeting specific layers (q_proj, v_proj, k_proj, o_proj) for efficient adaptation.
Price Prediction:
The model is designed to predict or estimate the price of a product based on its textual description.
E-commerce Applications:
Can be used by online sellers, marketplaces, or catalog management systems to suggest initial pricing based on product descriptions.
Data Augmentation:
Helpful for generating synthetic price labels for datasets during training of other machine learning models.
Market Research:
Can assist analysts in comparing how similar product descriptions could correlate with price estimates.
Domain-Specific:
The model is trained primarily on e-commerce-style product descriptions. It may not perform well outside typical retail scenarios (e.g., luxury items, collectibles, services).
No Real-Time Market Awareness:
The model does not have access to real-time pricing, supply-demand factors, or current market trends.
Approximate Predictions:
Outputs are estimates based on learned patterns in the training data and are not guaranteed to be accurate for production financial decisions.
Bias from Training Data:
If the training dataset contains biases (e.g., certain product categories being overpriced/underpriced), the model may inherit those biases.
Language and Format Sensitivity:
Descriptions that are extremely short, poorly written, or in languages/formats very different from the training data may yield poor predictions.
The model was fine-tuned using Supervised Fine-Tuning (SFT) combined with LoRA for parameter-efficient adaptation. The base model meta-llama/Meta-Llama-3.1-8B was loaded in 4-bit precision to optimize memory usage.
The training steps were:
Model Preparation:
Meta-Llama-3.1-8B) in 4-bit NF4 quantization using bitsandbytes.q_projk_projv_projo_projDataset:
ed-donner/pricer-data dataset, which consists of product descriptions and corresponding prices.Training Setup:
trl library's SFTTrainer.PagedAdamW with betas=(0.9, 0.999) and epsilon=1e-08.Hyperparameters:
Monitoring:
Saving:
The entire training was optimized for fast prototyping and low GPU memory usage without sacrificing too much performance.
The following hyperparameters were used during training:
You can use the model for inference like this:
from transformers import AutoModelForCausalLM
from peft import PeftModel
import torch
# Load the base model (Meta-Llama-3.1-8B)
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B")
# Load the fine-tuned model with PEFT
model_name = "Sameer2407/PriceLLaMAA-2025-04-28_07.20.50" # Replace with your model path
model = PeftModel.from_pretrained(base_model, model_name)
# Load the tokenizer
tokenizer = base_model.get_tokenizer()
# Define a product description
product_description = "A sleek, modern stainless steel electric kettle with 1.5-liter capacity and auto shut-off feature."
# Prepare input
inputs = tokenizer(f"Predict the price: {product_description}", return_tensors="pt").to(model.device)
# Generate output
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=50)
# Decode and print the predicted price
predicted_price = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(predicted_price)