# merge **Repository Path**: bjf-fhe/merge ## Basic Information - **Project Name**: merge - **Description**: 合并xls中的条目,形成用于微调的json文件 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-05-19 - **Last Updated**: 2023-09-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 将xlxs中的数据整合成json文件 将xlxs中的数据整合成json文件,用于大预言模型的数据精调 输出格式为 ``` json [ { "instruction": "instruction", "input": "input", "output": "output" }, ] ``` 或者jsonl格式 ``` json list [{"prompt":"系统操作员,","response":[[""]]}] [{"prompt":"系统操作员,","response":[[""]]}] [{"prompt":"系统操作员,","response":[[""]]}] ``` # 用法 ## 下载使用 [windows amd64版本](./bin/windows_amd64/merge.exe) ## 用go install安装 ``` go install gitee.com/bjf-fhe/merge@latest ``` # 命令参数 ``` Usage of merge.exe: -dest string 输出文件,默认是当前目录的sf.json -input-id int prompt的input对应xlsx的哪一列,默认是第2列 -instruction-id int prompt的instruction对应xlsx的哪一列,默认是第1列 -output-id int prompt的instruction对应xlsx的哪一列,默认是第3列 -output-template string promot的output是否要使用template生成,如果是,利用这个参数传入模板文件路径,如果template文件不存在,会默认从output-id指定列里读取output -source string 来源目录,读取目录中的所有xlsx文件,默认是./datas ``` #模板文件 output支持从多列数据中整合形成完整的output,方便不同的使用场景,以下是一个例子 ``` response: {{ .cell3}} command: {{ .cell4}} ``` 上述模板将会把第3列和第4列的数据按格式整合成一个完整的output # 百度千帆平台支持 如果需要生成面向千帆平台的jsonl文件,请附加参数: `-jsonl -model-type qianfan`