Prompt format (history)

#8
by tachyphylaxis - opened

Hey. I'm assuming that the example you give isn't actually supposed to look like that, but like the actual alpaca format (e.g. "### Instruction:" ...). But I haven't ever seen it with history before. Could you give me an example prompt? I mean, it's not too hard to guess, but I just want to be sure, because this model seems to be very particular about the prompt format. Also, is there a sillytavern macro that I can use to feed it the chat history? If not, which client(s) do you use? Thanks.

That is, I assume it doesn't actually look like this, as you said "alpaca", and that has the ###, etc.

{
"instruction": "user instruction (required)",
"input": "user input (optional)",
"output": "model response (required)",
"history": [
["user instruction in the first round (optional)", "model response in the first round (optional)"],
["user instruction in the second round (optional)", "model response in the second round (optional)"]
]
}
]

Also, do you know any clients which can make use of the history? Can SillyTavern? If so, I haven't found how in the docs yet. Does the history have ### Input: in it? Just paste an example, please. ;-)

It seems to be the reason why alpaca's instruction following effect is not very good. During the sft stage training, all the data is indeed in alpaca format. But there is indeed a certain probability that the output format is not the default alpaca. Next, I plan to open source the base version and retrain the v2 version using chatml format as sft stage data. Also, I'm looking for a Sillytarven macro to import history...

Oh, hi, I missed this response. How is the history represented in alpaca format? That is, I assume that this means:

Preamble.

'### Instruction:
User's instruction.

'### Input:
Additional information/context.

'### Response:
Model's response.

Now, for "history", does that mean just that these tuples are appended to this prompt, with up to two tuples? I'm fairly new to this, so I think maybe I don't understand the formatting convention you have used to represent the prompt. Is it just appended, or is there ### History, or what? The single quotes are there to keep this thing from picking it up as a formatting tag and emboldening it. I don't know how to tell it not to do that, lol. Oh, also, the Yi model was revised, renaming the layers (or whatever, not sure I remember lol) so it doesn't have to use the custom code. I have no idea why they did that in the first place, because there doesn't seem to be anything that they actually gained. It just made it incompatible. I was reading through some threads on the model page, and people really took them to task for this. Why rename them? What's the point? Just so people think it's a novel model or something? But who would think that? Lol, I don't understand. But there are some programs (well, at least KoboldAI) that can't deal with trust_remote_code. I've loaded it by adding trust_remote_code=True in every relevant call because I don't know how to properly fix it because I don't really know python haha. Anyway, the Yi people renamed them back to the standard names, so it doesn't need the custom code anymore. I really like the model, so if it's not too labor-intensive, please do update it. Thanks. I think you did a great job selecting the corpus to train it on; its output is unique.

In fact, I'm actually training version 2 for the reasons you mentioned. The biggest problem with this version is that Yi later changed the name of the layer... but I still pulled it when they were just released, which was very embarrassing. But anyway, thanks to 01, the nsfw finetune can work. The security mechanism of the previous qwen and other models was too messed up, and using the nsfw corpus for training will not have any effect.

Oh, OK, cool.

BTW, I don't know if you have any interest in this, but at tachyphylaxis/The-Mind-Is-A-Metaphor is a parquet conversion of http://metaphors.iath.virginia.edu/

"The Mind is a Metaphor, is an evolving work of reference, an ever more interactive, more solidly constructed collection of mental metaphorics. This collection of eighteenth-century metaphors of mind serves as the basis for a scholarly study of the metaphors and root-images appealed to by the novelists, poets, dramatists, essayists, philosophers, belle-lettrists, preachers, and pamphleteers of the long eighteenth century. While the database does include metaphors from classical sources, from Shakespeare and Milton, from the King James Bible, and from more recent texts, it does not pretend to any depth or density of coverage in literature other than that of the British eighteenth century."

Sign up or log in to comment