mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-10-28 13:44:09 +08:00
* Change named 'KT-SFT' to 'kt-sft' * [docs]: update kt-sft name --------- Co-authored-by: ZiWei Yuan <yzwliam@126.com>
14 lines
520 B
Python
14 lines
520 B
Python
import json
|
|
|
|
converted_data = []
|
|
with open('/data/user23202791/lpl/LLaMA-Factory/examples/KT_used/translation.jsonl', 'r', encoding='utf-8') as f:
|
|
for line in f:
|
|
data = json.loads(line)
|
|
converted_data.append({
|
|
"instruction": "",
|
|
"input": data["问"],
|
|
"output": data["答"]
|
|
})
|
|
|
|
with open('/data/user23202791/lpl/LLaMA-Factory/examples/KT_used/sft_translation.json', 'w', encoding='utf-8') as f:
|
|
json.dump(converted_data, f, ensure_ascii=False, indent=4) |