CJ-Medical
English
English | 中文
CJ-Medical is the medical-domain checkpoint of Chinese-Jev. Given context, a question, and a set of candidates, it assigns probabilities to the candidates. It supports multiple-choice decisions (choice), proposition judgments (noul), and ordered ratings (score). It does not generate free-form answers.
Training and validation data are available in CJ-Dataset, with held-out evaluation data in CJ-Bench, both under medical/.
Use
The checkpoint uses the Laya decision-model runtime. A standard Transformers text-classification pipeline does not expose its candidate-based interface.
pip install -r requirements.txt
from huggingface_hub import snapshot_download
from laya import Agent
path = snapshot_download("bbldCVer-hf/CJ-Medical")
model = Agent(path, device="cpu") # use "cuda" on a supported GPU
result = model.system_one(
state="用户问:体检报告里的这个指标是什么意思?",
questions={
"intent": {
"type": "choice",
"instructions": "判断用户的问题主要属于哪类意图。",
"criteria": {
"A": "检查报告解读",
"B": "预约挂号",
"C": "费用咨询",
},
}
},
)
print(result["answers"]["intent"])
state accepts text, an object, or a list. Each question provides its own candidates:
| Type | criteria |
Returned decision |
|---|---|---|
choice |
Object mapping candidate keys to descriptions | Selected key and candidate probabilities |
noul |
Object with false and true descriptions |
noul, the probability of true |
score |
Ordered list of level descriptions | Level probabilities and expected zero-based level index |
Score indices refer to the supplied levels, not a shared medical scale. When reading CJ-Dataset or CJ-Bench, pass only state and questions to the model; keep gold and _meta outside the input.
中文
English | 中文
CJ-Medical 是 Chinese-Jev 的医学领域 checkpoint。模型根据上下文、问题和候选项输出候选概率,支持选择题(choice)、命题判断(noul)和有序评分(score),不生成开放式回答。
训练与验证数据见 CJ-Dataset,独立测试数据见 CJ-Bench,均位于 medical/ 目录。
使用
运行上方示例即可加载模型。checkpoint 使用 Laya 的决策模型接口,不能直接通过普通 Transformers 文本分类 pipeline 调用候选判断功能。
state 可为文本、对象或列表。每个问题分别定义候选:
| 类型 | criteria |
输出 |
|---|---|---|
choice |
候选键与描述组成的对象 | 选中的键及候选概率 |
noul |
包含 false、true 描述的对象 |
noul 字段,即 true 的概率 |
score |
有序等级描述列表 | 等级概率及从 0 开始的等级索引期望 |
Score 的索引对应题目给出的等级,不代表统一医学量表。读取 CJ-Dataset 或 CJ-Bench 时,只把 state、questions 传给模型,gold 和 _meta 留在监督与分析侧。