Spaces:
Running
Running
adds support for hermes format
Browse files
data.py
CHANGED
|
@@ -107,6 +107,11 @@ class SmolLM3Dataset:
|
|
| 107 |
{"role": "user", "content": example["prompt"]},
|
| 108 |
{"role": "assistant", "content": example["completion"]}
|
| 109 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
else:
|
| 111 |
# Fallback: treat as plain text
|
| 112 |
return {"text": str(example)}
|
|
|
|
| 107 |
{"role": "user", "content": example["prompt"]},
|
| 108 |
{"role": "assistant", "content": example["completion"]}
|
| 109 |
]
|
| 110 |
+
elif "prompt" in example and "accepted_completion" in example:
|
| 111 |
+
messages = [
|
| 112 |
+
{"role": "user", "content": example["prompt"]},
|
| 113 |
+
{"role": "assistant", "content": example["accepted_completion"]}
|
| 114 |
+
]
|
| 115 |
else:
|
| 116 |
# Fallback: treat as plain text
|
| 117 |
return {"text": str(example)}
|