medicine-instruction-augmented-corpora
收藏数据集概述
基本信息
- 许可: other
- 任务类别:
- 文本分类
- 表格问答
- 问答
- 零样本分类
- 语言: 英语
- 标签: 化学, 生物学
数据集描述
- 数据集名称: Instruction-Augmented Corpora in the Biomedicine Domain
- 数据来源: 使用 instruction-synthesizer 将 the Pile 的 PubMed 子集转换为指令增强语料库。
- 数据规模: 合成指令-响应对达到 500M。
- 数据格式: JSONL
数据集资源
- 上下文基础指令合成器: instruction-synthesizer
- 合成器微调数据: ft-instruction-synthesizer-collection
- 通用模型预训练:
- 特定领域模型预训练:
- 通用指令增强语料库: general-instruction-augmented-corpora
- 特定领域指令增强语料库: medicine-instruction-augmented-corpora
数据集使用
-
依赖设置: bash git clone https://github.com/microsoft/LMOps.git cd LMOps/instruction_pretrain pip install tqdm pip install "huggingface_hub[cli]"
-
文件下载: bash REPO="instruction-pretrain/medicine-instruction-augmented-corpora" LOCAL_DIR="/tmp/medicine-instruction-augmented-corpora/" huggingface-cli download --resume-download ${REPO} --local-dir ${LOCAL_DIR} --include "*00000.jsonl" --repo-type dataset
-
数据预处理: python from utils.read_compre import cook_pt_entries import glob from tqdm import tqdm import json
LOCAL_DIR = "/tmp/medicine-instruction-augmented-corpora/" data_paths=sorted(glob.glob(f{LOCAL_DIR}/part-/shard/))
all_entries = [] for path in tqdm(data_paths): with open(path, r, encoding=utf8) as f: jsonls = f.read().strip().split( ) for jsonl in jsonls: all_entries.append(json.loads(jsonl))
instruction_augmented_texts = [] for idx, entry in enumerate(all_entries): texts = cook_pt_entries(read_collection=entry, random_seed=idx) instruction_augmented_texts.extend(texts)
for idx, text in enumerate(instruction_augmented_texts[-2:]): print(f## Instruction-augmented Text {idx+1} {text} )
许可信息
- PubMed Central: MIT License




