본문 바로가기

IT/paper report

Apollo: Lightweight Multilingual Medical LLMs

반응형

https://arxiv.org/abs/2311.09774

 

 

HuatuoGPT-II, One-stage Training for Medical Adaption of LLMs

Adapting a language model into a specific domain, a.k.a `domain adaption', is a common practice when specialized knowledge, e.g. medicine, is not encapsulated in a general language model like Llama2. The challenge lies in the heterogeneity of data across t

arxiv.org

 

GOAL : Aims to develop medical LLMs across the six most widely spoken languages.


Launched in a variety of relatively small sizes (e.g., 0.5B, 1.8B, 2B, 6B, 7B) on multilingual healthcare benchmarks, Apollo models achieve the best performance among same size models.

pip install bitsandbytes
pip install accelerate
 
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation.utils import GenerationConfig
tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/HuatuoGPT-2-7b", use_fast=True, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT-2-7b", device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
model.generation_config = GenerationConfig.from_pretrained("FreedomIntelligence/HuatuoGPT-2-7b")
messages = []
messages.append({"role": "user", "content": "肚子疼怎么办?"})
response = model.HuatuoChat(tokenizer, messages)
print(response)

 

Currently, my laptop is equipped with torch, TensorFlow, and AI environment, but there is no free space, so I decided to use colab.

 used colab to implement quick code but I couldn't use it with a free version.

https://colab.research.google.com/drive/1Q-Dnrs8pqIgwfn4YFqH6ETzvy0N14e_H

 

Google Colaboratory Notebook

Run, share, and edit Python notebooks

colab.research.google.com

 

So I found a proxy server that could use that model and tried it.

https://www.huatuogpt.cn/#/

 

Review of use:

weakness : The questions were well recognized in six languages. However, they answered only in Chinese.

strength : It can improve the multilingual healthcare capabilities of larger models without fine-tuning.

opportunity : Increased access to healthcare worldwide

Threats: If the model has a technical fault, the patient will have a problem

 

반응형

'IT > paper report' 카테고리의 다른 글

StreamingT2V  (0) 2024.04.11
Shap-E  (0) 2024.04.03
Self-Rectifying Diffusion Sampling with Perturbed-Attention Guidance  (0) 2024.03.28
Mixture-of-Experts  (0) 2024.03.21
OOTDiffusion  (0) 2024.03.14