connectthapa84 commited on
Commit
1a0d6b3
·
verified ·
1 Parent(s): ec79a5c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -3
README.md CHANGED
@@ -1,3 +1,50 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
7
+ pipeline_tag: text-classification
8
+ tags:
9
+ - medical
10
+ ---
11
+
12
+ <div align="center">
13
+ <h1>
14
+ Disentangling Reasoning and Knowledge in Medical Large Language Models
15
+ </h1>
16
+ </div>
17
+
18
+ We provide our reasoning vs. knowledge classifier, which can be loaded as shown below:
19
+ ```python
20
+ import torch
21
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
22
+
23
+ model_name = "zou-lab/BioMedBERT-Knowledge-vs-Reasoning"
24
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
25
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
26
+
27
+ question = "What is the full form of RBC?"
28
+ threshold = 0.75
29
+
30
+ inputs = tokenizer(question, return_tensors="pt", truncation=True, max_length=512)
31
+ model.eval()
32
+ with torch.no_grad():
33
+ outputs = model(**inputs)
34
+ logits = outputs.logits
35
+ probs = torch.nn.functional.softmax(logits, dim=1).cpu().numpy()
36
+ positive_prob = probs[:, 1]
37
+ prediction = (positive_prob >= threshold).astype(int)
38
+ ```
39
+
40
+ ## 📖 Citation
41
+
42
+ ```
43
+ @article{thapa2025disentangling,
44
+ title={Disentangling Reasoning and Knowledge in Medical Large Language Models},
45
+ author={Thapa, Rahul and Wu, Qingyang and Wu, Kevin and Zhang, Harrison and Zhang, Angela and Wu, Eric and Ye, Haotian and Bedi, Suhana and Aresh, Nevin and Boen, Joseph and Reddy, Shriya and Athiwaratkun, Ben and Song, Shuaiwen Leon and Zou, James},
46
+ journal={arXiv preprint arXiv:2505.11462},
47
+ year={2025},
48
+ url={https://arxiv.org/abs/2505.11462}
49
+ }
50
+ ```