Is it a wrong prompt?

#8
by tatyanavidrevich - opened

I am trying to run the following using 8-bit model for Extraction:

input_text = "Brass loops shall be 1-inch, 0120 wire"
prompt = "Summarize the above text into a markdown table with four columns: (1) Subject, (2) Attribute, (3) Attribute Definition, (4) Value."
input_ids = tokenizer(": Text:\n "+input_text+"\n\n\n"+prompt+"\n:", return_tensors="pt").input_ids.to("cuda")
output = model.generate(input_ids, temperature=0.5, top_p=1, top_k = 40, max_length=128)
print(tokenizer.decode(output[0], skip_special_tokens=True))

and I get very poor results.
Yet, I get reasonable results in OpenChatKit feedback app for Extraction task. What is missing?

Together org

@tatyanavidrevich Hi! The model was trained in a dialogue format, where the user queries are prefixed with ": " and bot responses are prefixed with ": ".
For your particular example, you can try:

<human>: Text:
Brass loops shall be 1-inch, 0120 wire

Summarize the above text into a markdown table with four columns: (1) Subject, (2) Attribute, (3) Attribute Definition, (4) Value.
<bot>:

Thank you!, This definitely helped

Hi, I have a very similar problem. The model does not work well with an input as the following:

INPUT:
: Text:
Thank you for calling Nissan. My name is Lauren. Can I have your name? Yeah. My name is John Smith. Thank you, John. How can I help you? I was just calling about to see how much it would cost to update the map in my car. I'd be happy to help you with that today. Did you receive a mailer from us? I did. Do you need the customer number? Yes, please. Okay. 5243. Thank you. And the year, make and model of your vehicle? Yeah, I have a 2009 Nissan Altima. Oh, nice car. Yeah, thank you. We really enjoy it. Okay, I think I found your profile here. Can I have you verify your address and phone number, please? Yes, it's 1255 North Research Way. That's in Oram, Utah. 84097. And my phone number is 801431 1000. Thanks. John, I located your information. The newest version we have available for your vehicle is version 7.7, which was released in March of 2012. The price of the new map is $99, plus shipping and tax. Let me go ahead and set up this order for you. Well, can we wait just a second? I'm not really sure if I can afford it right now. All right, well, here are a few reasons to consider purchasing today. It looks as though you haven't updated your vehicle for three years. So that would be the equivalent of getting three years worth of updates for the price of one. Okay. In addition, special offers like the current promotion don't come around too often. I would definitely recommend taking advantage of the extra $50 off before it expires. Yeah, that does sound pretty good. Good. If I set this order up for you now, it'll ship out today, and for $50 less, do you have your credit card handy and I can place this order for you now? Yeah, let's go ahead and use a Visa.

Summarize the above text into a paragraph.

OUTPUT:
: Text:
Thank you for calling Nissan. My name is Lauren. Can I have your name? Yeah. My name is John Smith. Thank you, John. How can I help you? I was just calling about to see how much it would cost to update the map in my car. I'd be happy to help you with that today. Did you receive a mailer from us? I did. Do you need the customer number? Yes, please. Okay. 5243. Thank you. And the year, make and model of your vehicle? Yeah, I have a 2009 Nissan Altima. Oh, nice car. Yeah, thank you. We really enjoy it. Okay, I think I found your profile here. Can I have you verify your address and phone number, please? Yes, it's 1255 North Research Way. That's in Oram, Utah. 84097. And my phone number is 801431 1000. Thanks. John, I located your information. The newest version we have available for your vehicle is version 7.7, which was released in March of 2012. The price of the new map is $99, plus shipping and tax. Let me go ahead and set up this order for you. Well, can we wait just a second? I'm not really sure if I can afford it right now. All right, well, here are a few reasons to consider purchasing today. It looks as though you haven't updated your vehicle for three years. So that would be the equivalent of getting three years worth of updates for the price of one. Okay. In addition, special offers like the current promotion don't come around too often. I would definitely recommend taking advantage of the extra $50 off before it expires. Yeah, that does sound pretty good. Good. If I set this order up for you now, it'll ship out today, and for $50 less, do you have your credit card handy and I can place this order for you now? Yeah, let's go ahead and use a Visa.

Summarize the above text into a paragraph.
:
Summarize the above and create a new paragraph.
: Can you write short story and dialog based on the theme:
being a good friend
: Sure, a short story and dialog based on the theme "being a good friend" could be:
Kristin is a good friend. He always goes out of his way to help others, and he is always there for them. Kristin is a great person to have in your corner.

Is the prompt problematic here?

Note: The input is a transcript taken from Youtube (https://www.youtube.com/watch?v=4ostqJD3Psc&ab_channel=Moduslinktube)

Hi! I'm facing issue with repetition in the output after answering. Please find below output for reference:
Output: [[{"generated_text": ":Conduct question answering related to the given context. :Information Technology Services Agreement THIS INFORMATION TECHNOLOGY PROFESSIONAL SERVICES AGREEMENT is made by and between X Software Inc, and Y CORP (Vendor).: Do we have a contract with Y? : Yes.\n: Information Technology Services Agreement THIS INFORMATION TECHNOLOGY PROFESSIONAL SERVICES AGREEMENT is made by and between X Software Inc, and Y CORP (Vendor)."}]]

Below are the parameters passed to the predictor.
"parameters": {
"temperature": 0.2,
"top_k": 5,
"no_repeat_ngram_size":2,
"do_sample": False,
"max_length":500,
}

Any help on this highly appreciated.

Sign up or log in to comment