{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/medalpaca-an-open-source-collection-of","title":"MedAlpaca -- An Open-Source Collection of Medical Conversational AI Models and Training Data","arxiv_id":"2304.08247","date":"2023-04-14","proceeding":null,"authors":["Tianyu Han","Lisa C. Adams","Jens-Michalis Papaioannou","Paul Grundmann","Tom Oberhauser","Alexander Löser","Daniel Truhn","Keno K. Bressem"],"abstract":"As large language models (LLMs) like OpenAI's GPT series continue to make strides, we witness the emergence of artificial intelligence applications in an ever-expanding range of fields. In medicine, these LLMs hold considerable promise for improving medical workflows, diagnostics, patient care, and education. Yet, there is an urgent need for open-source models that can be deployed on-premises to safeguard patient privacy. In our work, we present an innovative dataset consisting of over 160,000 entries, specifically crafted to fine-tune LLMs for effective medical applications. We investigate the impact of fine-tuning these datasets on publicly accessible pre-trained LLMs, and subsequently, we juxtapose the performance of pre-trained-only models against the fine-tuned models concerning the examinations that future medical doctors must pass to achieve certification.","url_abs":"https://arxiv.org/abs/2304.08247v2","url_pdf":"https://arxiv.org/pdf/2304.08247v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"medalpaca-an-open-source-collection-of","repo_url":"https://github.com/tuneinsight/federated-llms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt","method_name":"GPT"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.08247","atlas_url":"https://app.syntology.ai/?focus=2304.08247","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.08247"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tuneinsight/federated-llms","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":10,"unverified":3},"by_repo_kind":{"listed":{"samples":13,"ran":10,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0d42872657378ac1","entry":"compute_bleu_score","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/privacy_benchmark.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/privacy_benchmark.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0d42872657378ac1"}},{"code_sha256_prefix":"1538a6ee2d50a0f1","entry":"compute_sigma","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/dp.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/dp.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1538a6ee2d50a0f1"}},{"code_sha256_prefix":"3d7b3a79249ce95c","entry":"count_PHI_memorization","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/privacy_benchmark.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/privacy_benchmark.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3d7b3a79249ce95c"}},{"code_sha256_prefix":"2371ab764f99f368","entry":"count_exact_prefix_match","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/privacy_benchmark.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/privacy_benchmark.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2371ab764f99f368"}},{"code_sha256_prefix":"962adc31294b40bf","entry":"get_auxiliary_dict","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/fed_utils.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/fed_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"962adc31294b40bf"}},{"code_sha256_prefix":"2128b33c10829870","entry":"get_clients_this_round","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/fed_global.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/fed_global.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2128b33c10829870"}},{"code_sha256_prefix":"9c102ddaa014f4d2","entry":"get_dataset_this_round","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/split_dataset.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/split_dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c102ddaa014f4d2"}},{"code_sha256_prefix":"38486baf4c608ec4","entry":"get_proxy_dict","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/fed_utils.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/fed_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38486baf4c608ec4"}},{"code_sha256_prefix":"8fef5b18a4b5d83b","entry":"global_aggregate","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/fed_global.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/fed_global.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8fef5b18a4b5d83b"}},{"code_sha256_prefix":"60c6c78eb9667d17","entry":"split_dataset","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"OpenFedLLM/federated_learning/split_dataset.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/OpenFedLLM/federated_learning/split_dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"60c6c78eb9667d17"}},{"code_sha256_prefix":"e77bc1b30afa4f86","entry":"create_PHI_injection_dataset","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/create_dataset.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/create_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e77bc1b30afa4f86"}},{"code_sha256_prefix":"940744e0891a1f3c","entry":"create_flashcard_dataset","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/create_dataset.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/create_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"940744e0891a1f3c"}},{"code_sha256_prefix":"824e25afa42c807a","entry":"duplicate_PHI_documents","repo":"tuneinsight/federated-llms","repo_kind":"listed","path":"src/create_dataset.py","file_url":"https://github.com/tuneinsight/federated-llms/blob/HEAD/src/create_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"824e25afa42c807a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}