Views
No views yet

hf_ptq.py:from modelopt.torch.utils import dataset_utils
dataset_utils.SUPPORTED_DATASET_CONFIG["distilled-roleplay"] = {
"config": {
"path": "agentlans/distilled-roleplay",
"split": ["train"],
},
"preprocess": lambda sample: "".join(
f"<|im_start|>{ {'system':'system','human':'user','gpt':'assistant'}[turn['from']] }\n"
f"{turn['value'].strip()}<|im_end|>\n"
for turn in sample["conversations"]
),
}<|im_start|>system
You're a masterful storyteller and gamemaster. Write in second person present tense (You are), crafting vivid, engaging narratives with authority and confidence.<|im_end|>
<|im_start|>user
> You peer into the darkness.<|im_end|>
<|im_start|>assistant
You have been eaten by a grue.<|im_end|>