Views
No views yet
思考 推理链,再给出最终答案(o1 风格慢思考)。| bucket | 条数 | 说明 |
|---|---|---|
| hit | 33 | 命中 |
| wrong | 63 | 答错 |
| no_letter | 4 | 900 token 截断未给字母 |
| 口径 | 命中率 | vs 随机 25% |
|---|---|---|
| A (no_letter 算错) | 33.0% | +8.0 |
| B (剔除 no_letter) | 34.4% | +9.4 |
| C (no_letter 算对) | 37.0% | +12.0 |
pattern 干净抽取 93/100 条命中率 35.5%;fallback 裸字母 3 条全错(噪声);no_letter 截断 4 条。结论: rank64 checkpoint-2300 在 MedQA 上约高于随机基线 8-12 个百分点,未显著拉开。1.5B 底座容量为本阶段瓶颈,下一步需更大底座或更大/更对口训练数据。模型存在"偏 A/D、避 B"的兜底字母倾向,但答错题里 0 条在 answer 段提到正确 gold 字母——是真不会、非"会了没选对",故字母校准无法救。
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name="xjh666/medical-o1-qwen2.5-1.5b", # 自动加载本仓库 adapter + 对应基座
5 max_seq_length=2048,
6 load_in_4bit=True,
7)
8FastLanguageModel.for_inference(model)
9
10messages = [{"role": "user", "content": "What causes fever and productive cough 48h after ICU admission?"}]
11prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
12inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
13
14outputs = model.generate(**inputs, max_new_tokens=900, do_sample=False, pad_token_id=tokenizer.eos_token_id)
15print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))adapter/ 目录下为 LoRA adapter 权重与配置:adapter/adapter_config.json — LoRA 配置 (r=64, alpha=64, target_modules)adapter/adapter_model.safetensors — LoRA 权重 (~282 MB)基座不打包在本仓库。加载时由 unsloth/HF 自动按adapter_config.json的base_model_name_or_path从对应基座仓库拉取。
adamw_8bit (省显存)1@misc{chen2024huatuogpto1medicalcomplexreasoning,
2 title={HuatuoGPT-o1, Towards Medical Complex Reasoning with LLMs},
3 author={Junying Chen and Zhenyang Cai and Ke Ji and Xidong Wang and Wanlong Liu and Rongsheng Wang and Jianye Hou and Benyou Wang},
4 year={2024},
5 eprint={2412.18925},
6 archivePrefix={arXiv},
7}