SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.09774 · 2023

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 14 functions out of this paper's own repositories and ran 13 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
freedomintelligence/huatuogpt-ii canonical 13 of 14
FunctionStatusWhere it lives
deduplicate Ran freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_inst.py
pointer only (licence: NONE) · get_code("1c39574f5e470abf")
filter_str Ran freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py
pointer only (licence: NONE) · get_code("13ebc20073fe384f")
generate_prompt Ran freedomintelligence/huatuogpt-ii/cli_demo.py
pointer only (licence: NONE) · get_code("baa2dd07a544df5c")
get_data_query Ran freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py
pointer only (licence: NONE) · get_code("dbd2112d465a82e2")
get_response Ran freedomintelligence/huatuogpt-ii/evaluation/eval_qa.py
pointer only (licence: NONE) · get_code("0cc6223401defc70")
match_choice Ran freedomintelligence/huatuogpt-ii/evaluation/scorer.py
pointer only (licence: NONE) · get_code("3da76bec93a6ae0c")
match_choice2 Ran freedomintelligence/huatuogpt-ii/evaluation/scorer.py
pointer only (licence: NONE) · get_code("3e574889ab383717")
match_choice3 Ran freedomintelligence/huatuogpt-ii/evaluation/scorer.py
pointer only (licence: NONE) · get_code("c0faf671597614bb")
ngram_jaccard_score Ran freedomintelligence/huatuogpt-ii/adaption/data_unification/rewrite.py
pointer only (licence: NONE) · get_code("2af3169badbc6691")
parse_classification_cot Ran freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_conv.py
pointer only (licence: NONE) · get_code("afe2c8247569f6e0")
remove_overlap Ran freedomintelligence/huatuogpt-ii/cli_demo.py
pointer only (licence: NONE) · get_code("3bc9437adf1d7ea1")
table_to_csv_string Ran freedomintelligence/huatuogpt-ii/evaluation/eval_qa.py
pointer only (licence: NONE) · get_code("4b9933d832571ead")
transfer_conv Ran freedomintelligence/huatuogpt-ii/evaluation/eval_huatuo_conv.py
pointer only (licence: NONE) · get_code("e420c2ab67f141f8")
load_model Not yet run freedomintelligence/huatuogpt-ii/cli_demo.py
pointer only (licence: NONE) · get_code("719c8f0c667de29a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2311.09774")
get_code_for_paper("2311.09774")
have("2311.09774")

Connect an agent — have() is free.