Downloads · 30 days
15
100% of all-time downloads
GustavoMaltaGuimaraesBrasil/mistral-amazon-titles
mistral-amazon-titles is a machine learning model from GustavoMaltaGuimaraesBrasil. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Este modelo foi treinado a partir do Mistral-7B Instruct (bnb-4bit) usando LoRA (Low-Rank Adaptation) sobre o dataset Amazon Titles – Subset 200k.
Downloads · 30 days
15
100% of all-time downloads
All-time downloads
15
Public
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.pt672 MB · 57%
From the Hugging Face model README
Este modelo foi treinado a partir do Mistral-7B Instruct (bnb-4bit) usando LoRA (Low-Rank Adaptation) sobre o dataset Amazon Titles – Subset 200k.
O modelo é especializado em responder perguntas sobre produtos da Amazon, gerando descrições baseadas nos títulos.
Exemplo:
Pergunta: O que é "Girls Ballet Tutu Neon Pink"?
Resposta: High quality 3 layer ballet tutu. 12 inches in length
unsloth/mistral-7b-instruct-v0.2-bnb-4bitForam comparados Baseline (Mistral original) e Fine-Tuned em 200 exemplos de teste:
| Métrica | Baseline | Fine-Tuned | Ganho |
|---|---|---|---|
| ROUGE-1 | 0.245 | 0.380 | +55% |
| ROUGE-2 | 0.110 | 0.210 | +91% |
| ROUGE-L | 0.220 | 0.350 | +59% |
| BERTScore | 0.780 | 0.860 | +10% |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
# Carregar modelo
model_name = "GustavoMaltaGuimaraesBrasil/mistral7b_finetuned_amazon_titles"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
# Teste
pergunta = "O que é 'Girls Ballet Tutu Neon Pink'?"
resposta = generator(pergunta, max_new_tokens=50)
print(resposta[0]["generated_text"])