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.
The official codes for "PMC-LLaMA: Towards Building Open-source Language Models for Medicine"
| Date | Stars |
|---|---|
| 2026-07-31 | 679 |
| 2026-08-03 | 679 |
| 2026-08-06 | 679 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# PMC-LLaMA
The official codes for "PMC-LLaMA: Towards Building Open-source Language Models for Medicine".
<!-- vim-markdown-toc GFM -->
* [Latest News](#latest-news)
* [Environment](#environment)
* [Quick Start](#quick-start)
* [Training](#training)
* [Results](#results)
* [QA Benchmark](#qa-benchmark)
* [Zero-shot Cases](#zero-shot-cases)
* [Acknowledge](#acknowledge)
* [Contact](#contact)
<!-- vim-markdown-toc -->
[**Arxiv Version**](https://arxiv.org/abs/2304.14454)
We prove that medical LLM should be first pretrained with domain corpus, and then tuned with instructions following dataset.
We have released The latest model **PMC_LLaMA_13B** finetuned on our instructions the following dataset.
It has shown a better ability to follow user instructions than MedLLaMA_13B.
<img src=./figures/teaser.png width="50%">
Similarly, it can be easily loaded with:
```python
import transformers
import torch
tokenizer = transformers.LlamaTokenizer.from_pretrained('axiong/PMC_LLaMA_13B')
model = transformers.LlamaForCausalLM.from_pretrained('axiong/PMC_LLaMA_13B')
```
Hereby we present PMC_LLaMA's versions and briefs.
[MedLLaMA_13B](https://huggingface.co/chaoyi-wu/MedLLaMA_13B) is pretrained on medical corpus, and [PMC_LLaMA_13B](https://huggingface.co/axiong/PMC_LLaMA_13B) is further finetuned based on that.
| Version | Link | Brief | Release Date |
| --- | --- | --- | --- |
|MMed-Llama-3  | https://huggingface.co/Henrychur/MMed-Llama-3-8B | Latest Pretrained Multilingual LLM on Llama-3 | 2024/05/22 |
| MMedLM | https://github.com/MAGIC-AI4Med/MMedLM | Further Pretrained Multilingual LLM | 2024/02/21 |
| PMC_LLaMA_13B | https://huggingface.co/axiong/PMC_LLaMA_13B | Instruction Tuned | 2023/09/01 |
| MedLLaMA_13B | https://huggingface.co/chaoyi-wu/MedLLaMA_13B | Pre-training LLaMA on 4.8M PubmedCentral papers and Medical Books | 2023/05/01 |
| PMC_LLaMA_7B_10_epoch | https://huggingface.co/chaoyi-wu/PMC_LLAMA_7B_10_epoch | Similar to PMC_LLaMA_7B but trained 10 epochs | 2023/05/01 |
| PMC_LLaMA_7B | https://huggingface.co/chaoyi-wu/PMC_LLAMA_7B | LLaMA-7b finetuned with PMC papers for 5 epochs | 2023/04/25 |
## Latest News
We have released a new report genration metrics [RaTEScore](https://arxiv.org/abs/2406.16845). We strongly believe to promote the develop a generative-based medical foundation models, developing a robust and reliable metric is a critical and foundation step.
## Environment
Simply set up the required environment as following:
```bash
conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 pytorch-cuda=11.6 -c pytorch -c nvidia
pip install transformers=4.28.1, sentencepiece, datasets
```
## Quick Start
Check `simple_test.py` for quickly use PMC-LLaMA or you can follow this folowing simple sample.
```python
import transformers
import torch
tokenizer = transformers.LlamaTokenizer.from_pretrained('axiong/PMC_LLaMA_13B')
model = transformers.LlamaForCausalLM.from_pretrained('axiong/PMC_LLaMA_13B')
model.cuda() # move the model to GPU
prompt_input = (
'Below is an instruction that describes a task, paired with an input that provides further context.'
'Write a response that appropriately completes the request.\n\n'
'### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:'
)
example = {
"instruction": "You're a doctor, kindly address the medical queries according to the patient's account. Answer with the best option directly.",
"input": (
"###Question: A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination. "
"She states it started 1 day ago and has been worsening despite drinking more water and taking cranberry extract. "
"She otherwise feels well and is followed by a doctor for her pregnancy. "
"Her temperature is 97.7°F (36.5°C), blood pressure is 122/77 mmHg, pulse is 80/min, respirations are 19/min, and oxygen saturation is 98% on room air."
"Physical eExcerpt of 7,657 characters
Read on GitHub37
11
Ikko Eltociear Ashimine · Japan
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:493751c62a7e8188, llm:Repository description: 'The official codes for "PMC-LLaMA: Towards Building Open-source Language Models for Medicine"' (medical domain-specific LLM).
matched fp:493751c62a7e8188, llm:Repository description: 'The official codes for "PMC-LLaMA: Towards Building Open-source Language Models for Medicine"' (medical domain-specific LLM).
matched fp:493751c62a7e8188, llm:Repository description: 'The official codes for "PMC-LLaMA: Towards Building Open-source Language Models for Medicine"' (medical domain-specific LLM).