Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs
| Date | Stars |
|---|---|
| 2026-07-31 | 280 |
| 2026-08-02 | 280 |
| 2026-08-06 | 280 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs
<p align="center">
📃 <a href="https://arxiv.org/abs/2504.00993" target="_blank">Paper</a> |🤗 <a href="https://huggingface.co/UCSC-VLAA/MedReason-8B" target="_blank">MedReason-8B</a> | 📚 <a href="https://huggingface.co/datasets/UCSC-VLAA/MedReason" target="_blank">MedReason Data</a>
</p>
## 📢 News
- [🏆 May 26, 2025]Our dataset wins 3rd prize on [Huggingface Reasoning Datasets Competition](https://huggingface.co/blog/bespokelabs/reasoning-datasets-competition)!
- [📄💥 Apr 1, 2025] Our [arXiv paper](https://arxiv.org/abs/2504.00993) is released.
Star 🌟 us if you think it is helpful!!
## ⚡Introduction
<img src="./assets/main.png" alt="main" style="zoom: 33%;" />
**MedReason** is a large-scale high-quality medical reasoning dataset designed to enable faithful and explainable medical problem-solving in large language models (LLMs).
- We utilize a structured medical knowledge graph (KG) to convert clinical QA pairs into logical chains of reasoning, or “thinking paths”.
- Our pipeline generates detailed reasoning for various medical questions from 7 medical datasets, resulting in a dataset of **32,682** question-answer pairs, each with detailed, step-by-step explanations.
- By finetuning with proposed [MedReason dataset](https://huggingface.co/datasets/UCSC-VLAA/MedReason), our best model [MedReason-8B](https://huggingface.co/UCSC-VLAA/MedReason-8B), achieves *state-of-the-art* performance.
We open-sourced our models, data, and code here.
## 📚 Data
- **Data Access**
| Data | Description | Link |
| --------- | --------------------------------- | ----------------------------------------------------------- |
| MedReason | Our quality filtered data for SFT | [Link](https://huggingface.co/datasets/UCSC-VLAA/MedReason) |
- **Data Generation**
We provide the code for generating Chain-of-Thought reasoning based on medical QA pairs and knowledge-graph (KG) in `./src/data_generation`
1. Set the file path of each datasets in `./configs/dataset_configs.yml`
2. Fill your Azure endpoint and API key in `./src/data_generation/utils.py`
3. Run the following script
```bash
python ./src/data_generation/Generate_Reasoning.py --dataset medqa --sample <number_of_samples> --start_idx 0 --batch_size 1&
```
## 👨⚕️ Model
- **Model Access**
| Model | Base Model | Link |
| ----------------- | ------------------------------------------------------------ | ---------------------------------------------------------- |
| MedReason-8B | [HuatuoGPT-o1-8B](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) | [Link](https://huggingface.co/UCSC-VLAA/MedReason-8B) |
| MedReason-Llama | [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) | [Link](https://huggingface.co/UCSC-VLAA/MedReason-Llama) |
| MedReason-Mistral | [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | [Link](https://huggingface.co/UCSC-VLAA/MedReason-Mistral) |
- **Deploy**: we provide a example code for direct inference with MedReason-8B.
Also, MedReason-8B can be deployed with tools like [vllm](https://github.com/vllm-project/vllm) or [Sglang](https://github.com/sgl-project/sglang), we provide code for model deployment using Sglang in `./src/evaluation/eval.py`
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('UCSC-VLAA/MedReason-8B',torch_dtype="auto",device_map="auto", use_safetensors= True)
model.eval()
tokenizer = AutoTokenizer.from_pretrained('UCSC-VLAA/MedReason-8B', trust_remote_code=True, padding_side='left')
input_text = "How to stop a cough?"
messages = [{"role": "user", "content": input_text}]
inputs = tokenizer(tokenizer.applExcerpt of 8,123 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:3d000e3402e0783b, llm:topics: medical-dataset, medical-large-language-models, reasoning, reasoning-models; description: 'MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs'
matched fp:3d000e3402e0783b, llm:topics: medical-dataset, medical-large-language-models, reasoning, reasoning-models; description: 'MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs'
matched fp:3d000e3402e0783b, llm:topics: medical-dataset, medical-large-language-models, reasoning, reasoning-models; description: 'MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs'
matched fp:3d000e3402e0783b, llm:topics: medical-dataset, medical-large-language-models, reasoning, reasoning-models; description: 'MedReason: Eliciting Factual Medical Reasoning Steps in LLMs via Knowledge Graphs'