Papers › HuatuoGPT-II, One-stage Training for Medical Adaption of LLMs

HuatuoGPT-II, One-stage Training for Medical Adaption of LLMs

16 Nov 2023arXiv:2311.09774archive 2025-07-28

Junying Chen, Xidong Wang, Ke Ji, Anningzhe Gao, Feng Jiang, Shunian Chen, Hongbo Zhang, Dingjie Song, Wenya Xie, Chuyi Kong, Jianquan Li, Xiang Wan, Haizhou Li, Benyou Wang

Adapting a language model into a specific domain, a.k.a `domain adaption', is a common practice when specialized knowledge, e.g. medicine, is not encapsulated in a general language model like Llama2. The challenge lies in the heterogeneity of data across the two training stages, as it varies in languages, genres, or formats. To tackle this and simplify the learning protocol, we propose to transform heterogeneous data, from the both pre-training and supervised stages, into a unified, simple input-output pair format. We validate the new protocol in the domains where proprietary LLMs like ChatGPT perform relatively poorly, such as Traditional Chinese Medicine. The developed model, HuatuoGPT-II, has shown state-of-the-art performance in Chinese medicine domain on a number of benchmarks, e.g. medical licensing exams. It even outperforms proprietary models like ChatGPT and GPT-4 in some aspects, especially in Traditional Chinese Medicine. Expert manual evaluations further validate HuatuoGPT-II's advantages over existing LLMs. Notably, HuatuoGPT-II was benchmarked in a fresh Chinese National Medical Licensing Examination where it achieved the best performance, showcasing not only its effectiveness but also its generalization capabilities.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2311.09774")

Code

Syntology Ran 13 of 14 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · our draft was wrong; 11 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

freedomintelligence/huatuogpt-ii officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 13 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
11ran
1unverified

Licence: 14 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from freedomintelligence/huatuogpt-ii. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

deduplicate freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_inst.py official repository ran no licence file found · pointer only · 1c39574f5e470abf · report
filter_str freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py official repository ran no licence file found · pointer only · 13ebc20073fe384f · report
generate_prompt freedomintelligence/huatuogpt-ii/cli_demo.py official repository ran no licence file found · pointer only · baa2dd07a544df5c · report
get_data_query freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py official repository ran no licence file found · pointer only · dbd2112d465a82e2 · report
get_response freedomintelligence/huatuogpt-ii/evaluation/eval_qa.py official repository ran no licence file found · pointer only · 0cc6223401defc70 · report
match_choice freedomintelligence/huatuogpt-ii/evaluation/scorer.py official repository ran no licence file found · pointer only · 3da76bec93a6ae0c · report
match_choice2 freedomintelligence/huatuogpt-ii/evaluation/scorer.py official repository ran fingerprinted no licence file found · pointer only · 3e574889ab383717 · report
match_choice3 freedomintelligence/huatuogpt-ii/evaluation/scorer.py official repository ran no licence file found · pointer only · c0faf671597614bb · report
ngram_jaccard_score freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py official repository ran no licence file found · pointer only · 2af3169badbc6691 · report
parse_classification_cot freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_conv.py official repository ran fingerprinted no licence file found · pointer only · afe2c8247569f6e0 · report
remove_overlap freedomintelligence/huatuogpt-ii/cli_demo.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 3bc9437adf1d7ea1 · report
table_to_csv_string freedomintelligence/huatuogpt-ii/evaluation/eval_qa.py official repository ran · our draft was wrong no licence file found · pointer only · 4b9933d832571ead · report
transfer_conv freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_conv.py official repository ran no licence file found · pointer only · e420c2ab67f141f8 · report
load_model freedomintelligence/huatuogpt-ii/cli_demo.py official repository unverified no licence file found · pointer only · 719c8f0c667de29a · report

Tasks

Domain AdaptationLanguage ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections