Downloads · 30 days
47
12% of all-time downloads
Jarvis1111/DoctorAgent-RL
DoctorAgent-RL is a text generation model from Jarvis1111. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains the DoctorAgent-RL model, which is a reinforcement learning (RL)-based multi-agent collaborative framework designed to revolutionize clinical dialogue. The model is presented in the paper Doct…
Downloads · 30 days
47
12% of all-time downloads
All-time downloads
392
Public
Parameters
7.6B
15.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
This repository contains the DoctorAgent-RL model, which is a reinforcement learning (RL)-based multi-agent collaborative framework designed to revolutionize clinical dialogue. The model is presented in the paper DoctorAgent-RL: A Multi-Agent Collaborative Reinforcement Learning System for Multi-Turn Clinical Dialogue.
Code: https://github.com/JarvisUSTC/DoctorAgent-RL
<div align="center"> <img width="1231" alt="DoctorAgent-RL Framework" src="https://github.com/user-attachments/assets/bd9f676e-01f9-406c-881d-c2b9f45e62f3" /> </div>DoctorAgent-RL addresses the critical limitations of static clinical dialogue systems by modeling medical consultations as dynamic decision-making processes under uncertainty. It enables:
Through continuous multi-turn interactions between doctor and patient agents, optimized via reinforcement learning, DoctorAgent-RL achieves significant improvements in diagnostic accuracy and interaction efficiency.
You can use the DoctorAgent-RL model with the Hugging Face transformers library for text generation in a multi-turn dialogue context.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load the model and tokenizer
model_id = "Jarvis1111/DoctorAgent-RL"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
# Prepare a sample conversation
messages = [
{"role": "user", "content": "Hello Doctor, I have a headache and feel tired."},
]
# Apply the chat template defined in the tokenizer_config.json
# This is crucial for proper multi-turn dialogue with Qwen models
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
# Generate response
input_ids = tokenizer(text, return_tensors="pt").input_ids.to(model.device)
output = model.generate(input_ids, max_new_tokens=256, do_sample=True, temperature=0.7, top_p=0.9)
response = tokenizer.decode(output[0], skip_special_tokens=True)
print(response)
If DoctorAgent-RL contributes to your research, please consider citing our work:
@article{feng2025doctoragent,
title={DoctorAgent-RL: A Multi-Agent Collaborative Reinforcement Learning System for Multi-Turn Clinical Dialogue},
author={Feng, Yichun and Wang, Jiawei and Zhou, Lu and Li, Yixue},
journal={arXiv preprint arXiv:2505.19630},
year={2025}
}