Model Card for Model ID

Model Details

Model Description

Model Based in Amazon music instruments dataset Reccomendation by prompt task

T5-recs

T5 with prompt Tuning PEFT finetuned on Amazon purchased data

Model source: https://huggingface.co/Fidlobabovic/T5-recs

Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import get_peft_config, get_peft_model, LoraConfig, TaskType

model = AutoModelForSeq2SeqLM.from_pretrained("t5-base")
model = PeftModel.from_pretrained(model, "Fidlobabovic/T5-recs")

tokenizer = AutoTokenizer.from_pretrained("Fidlobabovic/T5-recs")

input_text = "Purchases: { Guitar, Stradivary notes, synthesizer} Candidates: {Violin; Thrombon; Refrigirator; Sex toy;} - RECCOMENDATION :"
inputs = tokenizer(input_text, return_tensors="pt")

outputs = model.generate(input_ids=inputs["input_ids"], max_new_tokens=5)

print("input user hitory: ", input_text) ## output rec:  ['Guitar']
print(" output rec: ", tokenizer.batch_decode(outputs.detach().cpu().numpy(), skip_special_tokens=True))
Downloads last month
2
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for Fidlobabovic/T5-recs

Base model

google-t5/t5-base
Adapter
(38)
this model