ru_med_gpt3sm_based_on_gpt2
anechaevIntroduction
The RU_MED_GPT3SM_BASED_ON_GPT2 model is designed to assist medical staff in completing patient medical histories. It is a text generation model that leverages the pretrained capabilities of sberbank-ai's RuGPT-3Small, which is based on the GPT-2 architecture.
Architecture
The model is built on the GPT-2 architecture and utilizes the PyTorch library. It employs the Transformers framework to facilitate text generation tasks. The model supports inference endpoints for deployment and execution.
Training
The RU_MED_GPT3SM model is pretrained using the sberbank-ai/rugpt3small_based_on_gpt2 as its base. This pretrained model inherits capabilities from its predecessor to efficiently generate text relevant to medical history documentation.
Guide: Running Locally
To run the model locally, follow these steps:
-
Install Dependencies: Ensure you have Python and PyTorch installed. Additionally, install the
transformers
library from Hugging Face.pip install torch transformers
-
Download Model: Use Hugging Face's model hub to download the RU_MED_GPT3SM model.
from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("anechaev/ru_med_gpt3sm_based_on_gpt2") model = AutoModelForCausalLM.from_pretrained("anechaev/ru_med_gpt3sm_based_on_gpt2")
-
Run Inference: Generate text by passing in relevant prompts.
input_text = "Пациент поступил в больницу с" inputs = tokenizer(input_text, return_tensors="pt") outputs = model.generate(**inputs) generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True) print(generated_text)
-
Cloud GPUs: For enhanced performance, consider using cloud-based GPUs from services like AWS, Google Cloud, or Azure to run large-scale inference tasks.
License
The RU_MED_GPT3SM_BASED_ON_GPT2 model is released under the MIT License, allowing for flexible use and redistribution with minimal restrictions.