BryanTegomoh commited on
Commit
86873f3
Β·
verified Β·
1 Parent(s): de53d35

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +163 -3
README.md CHANGED
@@ -1,3 +1,163 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - medical
7
+ - epidemiology
8
+ - public-health
9
+ - CDC
10
+ - MMWR
11
+ - llama-3.1
12
+ - lora
13
+ base_model: meta-llama/Llama-3.1-8B
14
+ datasets:
15
+ - custom
16
+ library_name: transformers
17
+ pipeline_tag: text-generation
18
+ ---
19
+
20
+ # EpiBrief-MMWR-LM: AI Epidemiologist
21
+
22
+ **A specialized language model fine-tuned for CDC-style epidemiological reasoning and public health analysis.**
23
+
24
+ [![Live Demo](https://img.shields.io/badge/πŸ€—-Live%20Demo-blue)](https://huggingface.co/spaces/BryanTegomoh/EpiBrief-MMWR-LM)
25
+ [![GitHub](https://img.shields.io/badge/GitHub-Repository-green)](https://github.com/BryanTegomoh/EpiBrief-MMWR-LM)
26
+
27
+ ## Model Description
28
+
29
+ EpiBrief-MMWR-LM is a fine-tuned Llama 3.1 8B model trained on **11,632 instruction-response pairs** derived from 9 years (2016-2025) of CDC Morbidity and Mortality Weekly Reports (MMWR). The model specializes in:
30
+
31
+ - πŸ“Š **Executive Summaries** - CDC-style structured summaries with "What is already known?", "What is added?", and "What are the implications?" sections
32
+ - πŸ“ˆ **Data Interpretation** - Quantitative analysis of surveillance data, outbreak metrics, and epidemiological trends (35% of training data)
33
+ - πŸ”¬ **Outbreak Analysis** - Reasoning about disease transmission, risk factors, and outbreak dynamics
34
+ - πŸ’‘ **Public Health Recommendations** - Evidence-based guidance following CDC communication standards
35
+
36
+ ## Training Data
37
+
38
+ - **Source**: CDC MMWR Weekly Reports (2016-2025)
39
+ - **Training Pairs**: 11,632 high-quality instruction-response pairs
40
+ - **Quantitative Focus**: 85% of training data involves numerical reasoning (data interpretation, statistics, trends)
41
+ - **Quality Control**: Manually curated to ensure accuracy and CDC-style formatting
42
+
43
+ ### Task Distribution
44
+ - Executive Summaries: 25%
45
+ - Data Interpretation & Analysis: 35%
46
+ - Outbreak Investigation: 20%
47
+ - Public Health Implications: 20%
48
+
49
+ ## Training Details
50
+
51
+ - **Base Model**: meta-llama/Llama-3.1-8B
52
+ - **Method**: LoRA (Low-Rank Adaptation)
53
+ - Rank: 32
54
+ - Alpha: 64
55
+ - Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
56
+ - **Training Infrastructure**: Tinker AI distributed training platform
57
+ - **Training Duration**: ~8 hours (3 epochs)
58
+ - **Final Checkpoint**: Epoch 3
59
+
60
+ ## Usage
61
+
62
+ ### Installation
63
+
64
+ ```bash
65
+ pip install transformers peft torch
66
+ ```
67
+
68
+ ### Basic Usage
69
+
70
+ ```python
71
+ from transformers import AutoModelForCausalLM, AutoTokenizer
72
+ from peft import PeftModel
73
+ import torch
74
+
75
+ # Load base model and tokenizer
76
+ base_model = AutoModelForCausalLM.from_pretrained(
77
+ "meta-llama/Llama-3.1-8B",
78
+ torch_dtype=torch.bfloat16,
79
+ device_map="auto"
80
+ )
81
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B")
82
+
83
+ # Load LoRA adapter
84
+ model = PeftModel.from_pretrained(base_model, "BryanTegomoh/EpiBrief-MMWR-LM")
85
+
86
+ # Generate
87
+ prompt = """Based on this MMWR article excerpt, generate an executive summary following CDC format with 'What is already known about this topic?', 'What is added by this report?', and 'What are the implications for public health practice?' sections.
88
+
89
+ Measles cases have increased 300% in the United States during 2024, with 97% occurring among unvaccinated individuals. The outbreak was concentrated in communities with vaccination rates below 85%.
90
+
91
+ Generate the CDC-style executive summary:"""
92
+
93
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
94
+ outputs = model.generate(**inputs, max_new_tokens=400, temperature=0.7)
95
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
96
+ ```
97
+
98
+ ### Example Output
99
+
100
+ **Input**: "Explain the measles outbreak scenario with new SARS-CoV-2 variants"
101
+
102
+ **Output**:
103
+ > Measles is a highly contagious vaccine-preventable viral disease. Increasing U.S. measles cases have been driven by unvaccinated persons who are exposed while traveling internationally. U.S. health officials should coordinate response activities to prevent and limit the spread, assess and improve vaccination coverage, and ensure MMR vaccination for all eligible children and adults.
104
+
105
+ ## Model Performance
106
+
107
+ The model demonstrates strong capabilities in:
108
+ - βœ… CDC-style formatting and structure
109
+ - βœ… Quantitative reasoning with epidemiological data
110
+ - βœ… Evidence-based public health recommendations
111
+ - βœ… Professional medical terminology usage
112
+
113
+ ## Limitations
114
+
115
+ - **Domain-Specific**: Optimized for epidemiology and public health; not a general-purpose model
116
+ - **Training Data**: Limited to MMWR reports (2016-2025); may not reflect future disease patterns or guidelines
117
+ - **Not for Clinical Use**: This model is for research and educational purposes only. Not intended for clinical decision-making
118
+ - **Hallucination Risk**: Like all LLMs, may generate plausible but incorrect information. Always verify with authoritative sources
119
+
120
+ ## Intended Use
121
+
122
+ βœ… **Appropriate Uses**:
123
+ - Epidemiology education and training
124
+ - Draft generation for public health communications
125
+ - Research on AI in public health
126
+ - Understanding MMWR report structures
127
+
128
+ ❌ **Not Intended For**:
129
+ - Clinical diagnosis or treatment decisions
130
+ - Real-time outbreak response without human oversight
131
+ - Replacing qualified epidemiologists or public health professionals
132
+
133
+ ## Citation
134
+
135
+ ```bibtex
136
+ @model{tegomoh2025epibrief,
137
+ author = {Bryan Tegomoh},
138
+ title = {EpiBrief-MMWR-LM: A Specialized Language Model for CDC-Style Epidemiological Reasoning},
139
+ year = {2025},
140
+ publisher = {HuggingFace},
141
+ url = {https://huggingface.co/BryanTegomoh/EpiBrief-MMWR-LM}
142
+ }
143
+ ```
144
+
145
+ ## Model Card Authors
146
+
147
+ Bryan Tegomoh, MD, MPH
148
+
149
+ ## Contact
150
+
151
+ - Email: bryan.tegomoh@berkeley.edu
152
+ - GitHub: [@BryanTegomoh](https://github.com/BryanTegomoh)
153
+ - Website: [bryantegomoh.com](https://bryantegomoh.com)
154
+
155
+ ## License
156
+
157
+ Apache 2.0
158
+
159
+ ## Acknowledgments
160
+
161
+ - **CDC MMWR Program**: For publishing comprehensive epidemiological reports
162
+ - **Tinker AI**: For distributed training infrastructure
163
+ - **Meta AI**: For the Llama 3.1 base model