Downloads · 30 days
0
Kelmeilia/llama1_1chat-dialogsum-finetuned
llama1_1chat-dialogsum-finetuned is a summarization model from Kelmeilia. Use it when you need a shorter version of a longer text. It is set up for transformers.
This model summarizes dialogues between two persons.
Downloads · 30 days
0
Access
Public
Updated Feb 16, 2025
Repo size
98.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors24.5 MB · 98%
From the Hugging Face model README
This model summarizes dialogues between two persons.
This is a sample input for the model:
<PRE> Instruct: Summarize the following conversation. #Person1#: Happy Birthday, this is for you, Brian. #Person2#: I'm so happy you remember, please come in and enjoy the party. Everyone's here, I'm sure you have a good time. #Person1#: Brian, may I have a pleasure to have a dance with you? #Person2#: Ok. #Person1#: This is really wonderful party. #Person2#: Yes, you are always popular with everyone. and you look very pretty today. #Person1#: Thanks, that's very kind of you to say. I hope my necklace goes with my dress, and they both make me look good I feel. #Person2#: You look great, you are absolutely glowing. #Person1#: Thanks, this is a fine party. We should have a drink together to celebrate your birthday </PRE>This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Format dialogue in accord to the sample prompt and you get a summary of the dialogue
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "Kelmeilia/llama1_1chat-dialogsum-finetuned"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map='auto', torch_dtype=torch.float16, is_trainable=False)
eval_tokenizer = AutoTokenizer.from_pretrained(base_model_id, add_bos_token=True, trust_remote_code=True, use_fast=False)
eval_tokenizer.pad_token = eval_tokenizer.eos_token
dialogue = """ Joona: Can I have a banana, Ivana?
Ivana: No, I am out of bananas.
Joona: Give me an apple then?
Ivana: Sure, here you go
"""
prompt = f"Instruct: Summarize the following conversation.\n{dialogue}\nOutput:\n"
tokens = eval_tokenizer(p, return_tensors="pt")
result = model.generate(**tokens.to("cuda"), max_new_tokens=100, do_sample=True,num_return_sequences=1,temperature=0.1,num_beams=1,top_p=0.95,).to('cpu')
output = eval_tokenizer.batch_decode(result, skip_special_tokens=True)
dialogue_summary_str = output[0].split('Output:\n')[1]
print(dialogue_summary_str)
500 steps of Lora Finetuning
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]